Failed file system check, weird behaviour

Bug #68589 reported by finalbeta
8
Affects Status Importance Assigned to Milestone
e2fsprogs (Ubuntu)
Invalid
Undecided
Unassigned
upstart (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have a HD rack, sometimes I remove a HD. Ubuntu insists on doing the file checks at boot, of course it mentions that it can't find the partition it wants to check. It then drops the user into a shell.

When the user does "shutdown -h now" inside the shell, the xserver starts and the login screen is shown.

Revision history for this message
Theodore Ts'o (tytso) wrote :

What version of Ubuntu is this?

If a particular filesystem is not always present, then you should configure the disk so that the fsck pass number is 0, and that mount option "noauto" is present so that the filesystem is not mounted at boot time. Then it will not interrupt the boot process, and the system will not try to mount the filesystem (and fail if it is not present). You can optionally add the "user" mount option to allow the user to manually mount the filesystem; with appropriate desktop software installed, it will also automatically mount the filesystem when it is inserted at the specified mount point. For example, I have the following in my /etc/fstab file:

UUID=a8f27eb6-1759-4f48-859d-a4c3b4bcac13 /wd1 ext3 noauto,user,exec,nosuid 0 0

As far as "shutdown -h now" inside the shell causing the boot to resume, yes I've noticed this as well. That appears to be a bug in the upstart package. You can also see this behavior by hitting control-alt-delete during the fsck process.

Changed in e2fsprogs:
status: Unconfirmed → Rejected
Revision history for this message
finalbeta (j-greenhouse) wrote :

It was Edgy at the time of posting, now It's Feisty. But the rack is gone.
We might as well close this. Nothing will happen to it.

In any case, the mount all file system spec should have solved this. (but didn't).

Revision history for this message
finalbeta (j-greenhouse) wrote :

I would like to mention that from an end users perspective, they way you tell me I should edit fstab is not good.
Ubuntu should be able to handle futile things like this, it should detect the partition is not present and continue booting. "Fail with grace, not fall down on it's face"

Revision history for this message
Theodore Ts'o (tytso) wrote :

Well, the problem is that we need to distinguish between a critical filesystem (like /usr) being not present, and something completely optional, like /media/disk. More of a concern is where a filesystem is critical for an application-level server, and if it's missing it causes the server to really go boom. So we could just do the "don't worry, be happy" approach and just silently ignore a missing filesystem, and then let the server come up skipping the filesystem check and the filesystem mount. But this could cause bigger problems and cause more troubles than if the server is left down.

I could see a system configuration option which has the "don't worry, be happy" philosophy, and the more careful mode. But that's an initscripts issue, not an e2fsprogs issue.

Also, if the Ubuntu installer was automatically adding all of these entries to /etc/fstab, that might be a design flaw in the Ubuntu installer.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Nothing Upstart-related in this bug report

Changed in upstart:
status: Unconfirmed → Rejected
Revision history for this message
Marek Aaron Sapota (maarons) wrote :

This is still present in 8.04 and there seems no good way to fix this now in ubuntu - you don't like the ignore approach, but you don't provide any other means to fix it properly. Disabling fsck completely is bad, giving user power to mount file systems is not bad, but it requires additional actions after startup. And finally if user knows little about GNU/Linux he probably doesn't want to see an error message on boot with some cryptic commands if he just unplugged his external drive.

How about ignoring the errors, but adding some upstart configuration file to mark required file systems if someone really needs it?

Revision history for this message
Theodore Ts'o (tytso) wrote :

I gave a solution. In my first reply:

If a particular filesystem is not always present, then you should configure the disk so that the fsck pass number is 0, and that mount option "noauto" is present so that the filesystem is not mounted at boot time. Then it will not interrupt the boot process, and the system will not try to mount the filesystem (and fail if it is not present).

Right now, we do have a solution where if someone hot-plugs a USB drive after boot, it is automatically mounted. I don't think the automount code actually does an fsck by default, but that could be fixed. So we have one solution for disks that people just plug in, and that works; maybe it needs to be fixed to better deal with automatically fscking filesystems, but we have one solution.

We have another solution for permanently mounted disks that are always there, and that is the traditional /etc/fstab solution.

We have yet ANOTHER solution for drives that users manually mount, where the fsck pass number is set to 0, and the mount option "noauto" is set.

This is something which all other Linux distributions want, and what upstream supports, and for most users, this seems to be enough. It seems that you are demanding a FOURTH way of mounting and fsck'ing filesystems, where they mostly work automatically, but fail in a soft manner. Changes to do this would have be in both mount and fsck, and its not clear to me it's really worth it.

Certainly, I'm not volunteering to add YET MORE COMPLEXITY to Linux. If a paid Ubuntu engineer wants to architect and design this additional complexity, and work with the various packages that would need extending to support this Request For Enhancement, they can feel free to do so. But I'm still not convinced this is something that should be done, and it's not going to be done out of my spare time as an upstream maintainer.

Revision history for this message
Marek Aaron Sapota (maarons) wrote :

I'm just giving ideas, I like simplicity too and certainly not demand additional ways to do one thing. For me your fix is just not ultimate option - not running fsck at all or mounting drive manually does add burden on end user that probably doesn't want to know what fsck is or use any special tricks to get his/her external drive working. Something should be done about this probably altering things that already are there, not adding other things. And for the other GNU/Linux distributions - I use only gentoo, that just skips drives with errors.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.