Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#28341 - [initscripts] 'nofail' devices won't get unmounted on shutdown
Attached to Project:
Arch Linux
Opened by Artem Sheremet (dot) - Friday, 10 February 2012, 03:38 GMT
Last edited by Tom Gundersen (tomegun) - Saturday, 25 February 2012, 11:30 GMT
Opened by Artem Sheremet (dot) - Friday, 10 February 2012, 03:38 GMT
Last edited by Tom Gundersen (tomegun) - Saturday, 25 February 2012, 11:30 GMT
|
DetailsDescription:
an external (USB) HDD filesystem has the 'nofail' option in fstab for the case it is disconnected or out of service. findmnt returns _netdev in OPTIONS for this device, which causes unmount_all in /etc/rc.d/functions ignore this mount. This ends up in unmounted/corrupt filesystem and always forces fsck of the whole partition. Any reason to avoid _netdevs? If so, can there be a workaround to unmount _netdev if it's ext2? Additional info: * package version(s) initscripts 2012.01.3-1 * config and/or log files etc. fstab entry (of interest): /dev/sdb1 /media/hdd ext2 defaults,noatime,nofail 0 2 'mount' output (the line of interest): /dev/sdb1 on /media/hdd type ext2 (rw,noatime,errors=continue,_netdev) 'findmnt' output (the line of interest): /media/hdd ext2 rw,noatime,errors=continue,_netdev Steps to reproduce: mount a media with 'nofail' option, reboot the system, observe that the FS has not been unmounted and fsck has been forced on it. |
This task depends upon
Closed by Tom Gundersen (tomegun)
Saturday, 25 February 2012, 11:30 GMT
Reason for closing: Fixed
Additional comments about closing: by util-linux-2.21
Saturday, 25 February 2012, 11:30 GMT
Reason for closing: Fixed
Additional comments about closing: by util-linux-2.21
From mount(8):
_netdev
The filesystem resides on a device that requires network access (used to prevent the system from
attempting to mount these filesystems until the network has been enabled on the system).
I don't really understand what's going on here. Adding 'nofail' to a mount doesn't cause _netdev to be appended as a mount option.
Frankly I faced it on every reboot — each time my /dev/sdb1 gets fsck'd. Not saying we reboot too often, usually only after major kernel update. That time trying to find out the reason, I have seen '_netdev' in the 'findmnt' output and after trying various mount options figured out that 'nofail' in fstab turns into '_netdev' in findmnt. Cannot reproduce it right now though — weird!
/media/hdd ext2 rw,noatime,errors=continue,_netdev
After stopping the services and issuing
umount /media/hdd
mount /media/hdd
findmnt still shows _netdev. Options in fstab are unchanged: defaults,noatime,nofail. Could it be a mount bug to be reported upstream or would you like to see/try it in action (ssh?) ?
blkid -lt UUID=..... &>/dev/null && mount <device>
I went back as far as util-linux 2.19 and this bug still exists, so it's nothing new, this is just the first we're hearing about it. Additionally, I've nailed down exactly where the fault is, but the code is a goddamn mess. We're likely moving away from this particular mount implementation in favor of one more closely linked to libmount, so this bug may fix itself by way of deprecation...
/media/hdd ext2 rw,noatime,errors=continue