openzfs / openzfs-docs

OpenZFS Documentation
https://openzfs.github.io/openzfs-docs/
135 stars 194 forks source link

One way to export rpool before final reboot (over ssh) #405

Open bill-mcgonigle opened 1 year ago

bill-mcgonigle commented 1 year ago

@rlaager, I have the following issue with the Debian Bullseye Root on ZFS HOWTO:

Would this be better than forcing a reboot with an un-exported pool?

grep rpool /proc/*/mounts | cut -f 3 -d / | xargs kill -HUP
systemctl restart systemd-logind systemd-udevd

The console goes away but over ssh I can still export and reboot.

These were the problem children holding mounts:

/usr/libexec/bluetooth/bluetoothd
/usr/sbin/connmand-n
/lib/systemd/systemd-logind
/usr/sbin/ModemManager
/usr/libexec/upowerd
/usr/libexec/colord
/lib/systemd/systemd-udevd
/usr/sbin/haveged--Foreground--verbose=1

on an lxqt 11.6.0 live iso.

It's wild that 'zfs mount' shows absolutely nothing but these processes have mounts according to the kernel.

Maybe relevant to the folks at #353 and #270 .

rlaager commented 1 year ago

At $DAYJOB, my colleague just tested this approach. It didn't work for him. After those commands, he still had these running:

root        2550  0.0  0.0 418108 19596 ?        Ssl  Apr02   0:02 /usr/sbin/NetworkManager --no-daemon
root        2554  0.0  0.0  82800  3880 ?        Ssl  Apr02   0:00 /usr/sbin/irqbalance --foreground
ubuntu    141059  0.1  0.0  76120 11848 ?        Ss   00:08   0:00 /snap/snapd-desktop-integration/49/usr/bin/snapd-desktop-integration
ubuntu    141129  0.0  0.0 310360 21904 ?        Sl   00:08   0:00 /snap/snapd-desktop-integration/49/usr/bin/snapd-desktop-integration

Even after killing those and verifying there was nothing else in a grep rpool /proc/*/mounts, zpool export -a still said cannot export 'rpool': pool is busy.