You are not logged in.
Everytime I reboot/power off the machine, I get something like this:
Systemd[1]: Failed to unmount /usr
Systemd[1]: Failed to unmount /varI can't find the errors anywhere in the logs and I barely have enough time to catch a glimpse before the reboot.
I've already included the usr, fsck and shutdown hooks in mkinitcpio.conf.
HOOKS="base udev autodetect modconf block filesystems keyboard usr fsck shutdown"And here are the fstab entries:
/dev/sda6 /usr ext4 rw,relatime,data=ordered 0 2
/dev/sda7 /var ext4 rw,relatime,data=ordered 0 2What am I doing wrong?
Last edited by abiotic (2013-08-03 10:11:29)
Offline
What am I doing wrong?
Nothing. The shutdown hook doesn't affect systemd's inability to umount filesystems which are in use. What it does provide is a copy of the initramfs to pivot back to on shutdown where these filesystems can be umounted via a separate script.
Offline
So they are unmounted correctly after those error messages?
Last edited by abiotic (2013-07-29 13:25:42)
Offline
Well, technically everything gets unmounted at shutdown, whether the system registers it a successful unmount is usually not important unless you were actively reading or writing to that partition.
Anyway,
There isn't really a good reason to have a separate /usr partition anymore.
I would suggest re-purposing that partition for /usr/local, you'll see that boot-up time might be a little faster.
Offline
So they are unmounted correctly after those error messages?
If you don't see any messages from the shutdown pivot root, then yeah, they're unmounted correctly. You'll see in the log "Returning to initrd..." -- everything post that should be generated by the script I linked.
Well, technically everything gets unmounted at shutdown
Technically, no, not at all. Before the days of shutdown pivot roots, the best you could do was remount your root as read only. At the time of the actual ACPI poweroff or reboot, the kernel still has that filesystem in its mount table. I believe the kernel does call 'sync' just before this, so any potential damage to still-mounted filesystems is avoided or limited.
Anyway,
There isn't really a good reason to have a separate /usr partition anymore.
I would suggest re-purposing that partition for /usr/local, you'll see that boot-up time might be a little faster.
A call to mount is fast -- whether it happens in serial in the initramfs (to mount /usr) or in parallel in later userspace (to mount /usr/local) should be a negligible difference. I'm not sure why you suggest separating /usr/local as a better thing to do when the directory largely goes unused in the days of package manager based distros.
Offline