Summary: | sys-apps/openrc causes bad boots localmount fails to run | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | John Cox <JohnRCox> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | /etc/fstab from my system. |
Description
John Cox
2016-01-16 22:24:20 UTC
There was a news item published with OpenRC-0.18.x that explained a change in the behaviour of localmount and netmount [1]. In the past, they were always successful. This is inaccurate however, because filesystems could fail to mount and we would ignore this. If you have filesystems listed in fstab that should not automount at boot, add noauto to the mount options for these file systems. If you do not understand what I'm suggesting, or if you have more questions, let me know. Thanks, William [1] https://gitweb.gentoo.org/data/gentoo-news.git/plain/2015-10-07-openrc-0-18-localmount-and-netmount-changes/2015-10-07-openrc-0-18-localmount-and-netmount-changes.en.txt Is this news item still available? If so, doesn't failing to produce a usable system a serious punishment? This is my fstab. I'd appreciate your comments: jc@bopper /etc $ cat fstab # /etc/fstab: static file system information. # # noatime turns off atimes for increased performance (atimes normally aren't # needed; notail increases performance of ReiserFS (at the expense of storage # efficiency). It's safe to drop the noatime options if you want and to # switch between notail / tail freely. # # The root filesystem should have a pass number of either 0 or 1. # All other filesystems should have a pass number of 0 or greater than 1. # # See the manpage fstab(5) for more information. # # <fs> <mountpoint> <type> <opts> <dump/pass> # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. UUID=dfbd92d1-ef3f-4496-bc71-97aacf0fd096 /boot ext4 nofail,noatime,nodiratime,discard 0 1 /dev/mapper/pdc_dcgidcdjbp6 /gentoo ext4 nofail,user_xattr,errors=remount-ro 0 1 /dev/mapper/pdc_dcgidcdjbp7 none swap sw 0 0 /dev/mapper/pdc_dcgidcdjbp2 /windows ntfs-3g noauto,user 1 3 /dev/cdrom /mnt/cdrom auto noauto,user 0 0 /dev/mapper/pdc_dcgidcdjbp5 /kubuntu ext4 nofail,errors=remount-ro 1 3 /dev/mapper/pdc_dcgidcdjbp3 /boot2 ext4 nofail,defaults 1 4 #UUID=dfbd92d1-ef3f-4496-bc71-97aacf0fd096 /ssdboot ext4 nofail,noatime,nodiratime,discard 0 1 # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for # POSIX shared memory (shm_open, shm_unlink). # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will # use almost no memory if not populated with files) shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 /tmp tmpfs defaults,noatime,mode=1777 0 0 /var/spool tmpfs defaults,noatime,mode=1777 0 0 /var/tmp tmpfs defaults,noatime,mode=1777 0 0 /var/log tmpfs defaults,noatime,mode=0755 0 0 #/dev/mapper/pdc_dcgidcdjbp6 / ext4 errors=remount-ro,user_xattr 0 1 UUID=ce12cbd3-e132-49fd-9076-4a444316c489 / ext4 nofail,noatime,nodiratime,discard,user_xattr,errors=remount-ro 0 1 jc@bopper /etc $ Because of the way bugzilla wraps comments to 80 characters, it is difficult to read your fstab in the above comment. Please attach the file instead of pasting it inline. Also, I need to see the messages that are showing up when you run localmount. It should be giving you some error messages about what is failing to mount. I will recreate the error and wrote down the errors if you can suggest a way to make it happen. I can't see the errors during startup and haven't found a file that lists everything. I have tried to start localmount after the system boots and get a bunch of failures. I will recreate the error and wrote down the errors if you can suggest a way to make it happen. I can't see the errors during startup and haven't found a file that lists everything. I have tried to start localmount after the system boots and get a bunch of failures. Created attachment 423162 [details]
/etc/fstab from my system.
The following lines appear to be the problem. /tmp tmpfs defaults,noatime,mode=1777 0 0 /var/spool tmpfs defaults,noatime,mode=1777 0 0 /var/tmp tmpfs defaults,noatime,mode=1777 0 0 /var/log tmpfs defaults,noatime,mode=0755 0 0 These have probably been causing issues before now, you just haven't noticed it because the old localmount always succeeded. I do not recommend using tmpfs for /var/log, /var/spool or /var/tmp. All files in these directories should survive a reboot, and they will not if they are on tmpfs. If you would like /tmp to be mounted on a tmpfs, you need to change the line for /tmp to read like this: tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 tmpfs file systems do not have a device, but you still need something in the first position on the lines for them in fstab. After you make these changes, let me know if things work. Thanks much, William I took your advice and replaced the /tmp line as you suggested, and commented out the lines for /var/spool, /var/tmp and /var/log and openrc-0.20.2 worked fine. Thank you for your help! I still think that it is better practice not to be the cause of a system not restarting unless it is impossible to continue. Especially in situations like this where the problem is difficult to troubleshoot. https://github.com/openrc/openrc/commit/cd7883d makes it possible for you to turn off this behaviour by setting ignore_mount_errors="YES" in /etc/conf.d/localmount. The serious down side is that "mount -a" also fails on syntax errors in fstab, so you can boot with a bad fstab if you turn this on; that is why it is off by default. This will be in openrc-0.20.3 and 0.21. |