Bug 459090 - e2fsck returns wrong error code for mount with noauto option
Summary: e2fsck returns wrong error code for mount with noauto option
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: 8
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-14 12:57 UTC by JW
Modified: 2008-09-25 01:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-25 01:54:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description JW 2008-08-14 12:57:32 UTC
Description of problem:
If a fstab entry has noauto option fsck should either ignore the entry or allow the device node to not exist.q

Version-Release number of selected component (if applicable):
e2fsprogs-1.40.8

How reproducible:
Always

Steps to Reproduce:
1. create fstab entry with noauto option and a LABEL=xxx device entry
2. ensure that the underlying device doesn't exist n(eg disconnected usb drive)
3. boot
  
Actual results:
1. fsck.ext3: Unable to resolve LABEL=xxx

Expected results:
1. fsck should ignore any entry with noauto if devive cannot be resolved

Additional info:
What does noauto mean? It means noauto!

Comment 1 Eric Sandeen 2008-08-27 19:44:25 UTC
Well, according to the fstab man page:

    Common for all types of file system are the options ‘‘noauto’’ 
    (do not mount when "mount -a" is given, e.g., at boot time), ...

but it does not mention fsck in the context of noauto.

However, 

    The sixth field, (fs_passno), is used by the fsck(8) program to 
    determine the order in which filesystem checks are done at reboot time.  
    The root filesystem should  be specified  with a fs_passno of 1, and 
    other filesystems should have a fs_passno of 2.  Filesystems within a
    drive will be checked sequentially, but filesystems on different
    drives will be checked at the same time to utilize parallelism available
    in the hardware.  If the sixth field is not present or zero, a value of
    zero is returned and fsck will assume that the filesystem does not need 
    to be checked.

So, if you don't want it fsck'd at boot time, shouldn't you set fs_passno to 0?

-Eric

Comment 2 JW 2008-08-27 23:31:17 UTC
It would make a lot more sense if "noauto" meant that nothing what-so-ever happened automatically - including fsck. It doesn't make a lot of sense for a mount that is set to "noauto" to be automatically fsck'ed at boot time - regardless of the setting of fs_passno. After all, isn't a fsck essentially a prelude to a mount? And if there it is not going to be automatically mounted then why fsck it?

Comment 3 Eric Sandeen 2008-08-27 23:43:52 UTC
I agree that those are all interesting questions, and the behavior you see is a bit strange, but the fstab format is a pretty time-honored standard - and there are separate parameters for controlling auto-mount and auto-fsck.  I can poke around for some other opinions, but it seems to me that if you have an fs_passno field of "1" in your fstab, you're asking for a fsck pass, regardless of whether you plan to mount it.  "noauto" + "fs_passno == 1" is, I think, a misconfiguration, or at least a strange one.  Really, I think your best course of action is to just exchange your "1" for a "0" :)

-Eric

Comment 4 Eric Sandeen 2008-09-25 01:54:12 UTC
Sorry, I'm going to close this.  fs_passno = 1 means: check this filesystem.  I think this is just a misconfiguration.


Note You need to log in before you can comment on or make changes to this bug.