You are not logged in.

#1 2013-08-23 02:49:11

Zazzman
Member
Registered: 2011-12-26
Posts: 34

ZFS doesn't reliably un/mount on re/boot.

Okay, so I've got my ZFS-Luks system up and running, and everything is moved in appropriately.  Just one problem remaining:

everytime I reboot, the zfs pool (zroot) doesn't appear to cleanly unmount on shutdown.  When I boot up, I get dropped into the shell.  a quick

mkdir /carp
zpool import -f -R /carp zroot
zfs umount -a
zpool export zroot

and then a "manual" reboot, and it all works properly. 

I followed the "Install Arch on ZFS guide" where it says to unmount *everything* once in the middle of the process after creating the pools and datasets, and again when getting ready to shutdown.

So... anybody got any ideas to fix this?  I don't like having to hit the power button on the case this many times to simply get the machine up and running.

Last edited by Zazzman (2013-08-23 02:50:16)

Offline

#2 2013-08-23 03:22:27

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: ZFS doesn't reliably un/mount on re/boot.

I assume that a zfs root filesystem requires a) an initramfs of course, but also b) a special mkinitpcio hook to function.  So is there then support for switching back to the initramfs on shutdown.  This would normally be covered by the 'shutdown' hook, but I am unsure if this hook is even extensible to include the commands for a zfs unmount (which obviously requries a bit more than just a simple umount).

If there is nothing, you might need to write out your own shutdown hook to make this work right.  I would start with referencing how the existing mkinitpcio hook handles things, and then pull chunks and/or modify from there.

You should be warned though that there has been talk of doing away with the shutdown hook from the initramfs and then having it created on the fly in /run.  Though I don't know that there is actual code to implement this yet.  Still there have been a number of significant changes in the initramfs of late if you use [testing].  If you are using zfs though I think that using [testing] would only be asking for potentially more problems on top of an already not supported filesystem.

Offline

#3 2013-09-19 01:22:51

VidikeR
Member
Registered: 2013-09-19
Posts: 1

Re: ZFS doesn't reliably un/mount on re/boot.

Hi all,

i have the same problem either. I have followed the guide (https://wiki.archlinux.org/index.php/In … nd_restart), but the script cannot unmount the zfs partition because it is already in use:
Sep 19 03:03:48 HomeARCH umount[1130]: umount: /root: target is busy.
Sep 19 03:03:48 HomeARCH umount[1130]: (In some cases useful info about processes that use
Sep 19 03:03:48 HomeARCH umount[1130]: the device is found by lsof(8) or fuser(1))
Sep 19 03:03:48 HomeARCH systemd[1]: root.mount mount process exited, code=exited status=32
Sep 19 03:03:48 HomeARCH systemd[1]: Failed unmounting /root.

Any idea? Or should i forgot the ZFS?

I have been tried to run the script on different Targets, but i always got the same error.

Offline

Board footer

Powered by FluxBB