[zfs-discuss] zpool import at startup and export at shutdwon for use with different systems

Sebastian labiculum at googlemail.com
Sat May 12 18:20:31 EDT 2012

Hello list!

As a convinced long-time user of ZFS I bow down before the people who
finally brought it to Linux. When I switched my /home to ZFS recently
I was impressed by how quick and easy the setup procedure was and how
flawlessly it still runs.

I am dual-booting Arch Linux and Linux Mint 12 with both systems
sharing that /home pool (which was set up using the stable AUR/PPA
package). Therefore I have to circumvent the fact that ZFS cannot be
used in the way a shared ext4 partition could simply be mounted as /
home on two different systems.

There is a similar topic on this list: "Howto zpool import/export
automatically?" (posted by UbuntuNewbie) but Zachary Bedell concludes
that "The only reason you'd export a pool is if you need to mount it
on a different system." Which is exactly what I want to do. Currently
I change into single user mode on each shutdown to export, so that
the /home pool can be imported during startup for use with the other
system. I have also had a few looks at the rc.d and init.d scripts for
ZFS and tried adding the required export command, but without much

Someone please help me out: In which places do I have to add which
commands so that my /home pool (with root still being an ext4
partition) will be imported at boot before /home is mounted and
exported at poweroff/restart after /home is unmounted? I could
continue fiddling around but I would like to do it the right way.

More information about the zfs-discuss mailing list