0

I'm trying to use zfs-fuse as the file system driver for a read/write partition that includes system logging on an Ubuntu 12.04 distribution. I have succesfully redirected rsyslog there by modifying the appropriate configuration files. However, on bootup, rsyslog starts way before the zfs-fuse drive is mounted, so it just happily creates the directory, and starts logging on the root partition, and when zfs-fuse tries to mount the drive later in the boot sequence, there are already files there on the / mounted drive where the OS is running and so zfs-fuse can't mount the drive there. Before I modified rsyslog configuration files to log in a different place, zfs-fuse was automatically mounting the drive just fine.

So, my question is this:

How can I move zfs-fuse mounting of drives to earlier in the boot sequence than rsyslog comes up? I want rsyslog to contain all the boot information so I can't just move rsyslog to after zfs-fuse, I have to move zfs-fuse earlier. I can conceive of all kinds of ways to hack this, but I want an elegant solution if one exists. I've done my fair share of googling on this and can't find anyone who has solved this problem and posted a solution.

Thanks for any help you can give me

1 Answer 1

0

Well, 7.5 months later and I finally figured out a clean way to do it so I wanted to post back.

Rsyslog is configured on 12.04 as an upstart job.

zfs-fuse sets itself up when installed with apt-get install so that it supports the command service zfs-fuse start.

Using these two facts, I did the following:

  • Added line "service zfs-fuse start" directly after line pre-start script in /etc/init/rsyslog.conf
  • Ran command sudo initctl reload-configuration

Now, before rsyslog can start, I'm forcing zfs-fuse service to start which in turn mounts the zfs drives. Now, I can be confident that barring a failure in the zfs-fuse mount that when rsyslog starts that the zfs-fuse drive will be mounted and ready to be written to allowing me to log there from the very start of the boot process.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .