Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 195405 - fsck gives incorrect warning for wdfs/sshfs entry in /etc/fstab
Summary: fsck gives incorrect warning for wdfs/sshfs entry in /etc/fstab
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
: 196285 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-10 17:37 UTC by Thorsten Kampe
Modified: 2007-12-24 12:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to address Gentoo bug #195405: fsck gives incorrect warning for wdfs/sshfs entry in /etc/fstab (patch,1.32 KB, patch)
2007-12-17 22:07 UTC, Theodore Tso
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Kampe 2007-10-10 17:37:01 UTC
At boot /etc/init.d/checkfs (I suppose) gives a warning
"Checking all filesystems ...
WARNING: bad format on line 20 of /etc/fstab"

This relates in my case to the following entry:
wdfs#https://dav.hoster.com/foo/bar  /mnt/hoster  fuse   user,noauto  0  0

According to /usr/share/doc/wdfs-1.4.2/README.bz2...
("mounting wdfs using fstab:
  example entry for the /etc/fstab file:
  wdfs#http://server  /mnt/wdfs  fuse  users,locking=simple  0  0")
... this line is correct (and it works, too).

So this means that the checking of checkfs of fstab is faulty...

Reproducible: Always

Steps to Reproduce:
1. Install wdfs
2. mount a dav ressource in fstab
3. reboot

Actual Results:  
Warning message about "bad format" in /etc/fstab

Expected Results:  
no warning (because the line is correct in fstab)

Portage 2.1.3.12 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.23-gentoo i686)
=================================================================
System uname: 2.6.23-gentoo i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Wed, 10 Oct 2007 09:20:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O3 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LINGUAS="de en pl"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/n4g"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X aac alsa arts bash-completion bindist dbus fam firefox gnome gpm gtk hal ipod kde kerberos logrotate ncurses nptl nptlonly nsplugin offensive pam pcre pic png python qt4 rdesktop readline samba slang spell sqlite sqlite3 ssl threads tk truetype unicode vnc webdav x86 xcomposite xinetd xscreensaver zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 	emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m 	maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en pl" USERLAND="GNU" VIDEO_CARDS="vmware"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-10 17:46:10 UTC
Meh, someone finally filed this; I've always been too lazy to do it :D Ditto w/ sshfs, same warning:

<snip>
sshfs#jakub@server:/home/jakub	/mnt/sshfs/server	fuse	noauto,user,port
</snip>
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-10-10 17:48:16 UTC
Eh, got truncated for some reason, the full fstab entry is like this:

sshfs#jakub@server:/home/jakub	/mnt/sshfs/server    fuse    noauto,user,port=22,uid=jakub,gid=users	0 0
Comment 3 SpanKY gentoo-dev 2007-10-10 18:09:52 UTC
baselayout doesnt do any parsing of /etc/fstab, the warning comes from `fsck` from the e2fsprogs package

it has always treated '#' as the comment character

if you disagree with the behavior, let the fsck maintainer know here:
http://sourceforge.net/projects/e2fsprogs
Comment 4 Thorsten Kampe 2007-10-10 18:47:07 UTC
(In reply to comment #3)
> baselayout doesnt do any parsing of /etc/fstab, the warning comes from `fsck`
> from the e2fsprogs package
> 
> it has always treated '#' as the comment character
> 
> if you disagree with the behavior, let the fsck maintainer know here:
> http://sourceforge.net/projects/e2fsprogs

I'm not in a position to agree or disagree with this behaviour. I don't use "fsck" - I don't even have any EXT2 or EXT3 partitions; it's baselayout and in concrete checkfs that uses fsck. Checkfs is - I think a boot service - and necessary for a working Gentoo.

So if the baselayout crew uses a third party tool to do some checking, it's also the baselayout crew's responsibility to use non-buggy tools that coexist with other Gentoo packages (in this case wdfs and shfs).

So please: this is either a baselayout bug (because it uses a tool that's buggy) or a shfs/wdfs bug.
Comment 5 SpanKY gentoo-dev 2007-10-10 19:10:45 UTC
you're thinking too hard about this

the `fsck` binary scans all fstab entries and it comes with e2fsprogs ... ext2/ext3 is irrelevant

baselayout uses whatever fsck exists on the system ... it does not care whether it sucks

here are the parties to the debate: fuse and e2fsprogs ... baselayout has nothing to do with it
Comment 6 Roy Marples (RETIRED) gentoo-dev 2007-10-10 20:31:01 UTC
Well, the debate is just e2fsprogs really.
Looking through the source, it parses fstab itself which is incorrect.
libc has two types of call to parse fstab, getmntfile and getfsfile.

baselayout-2's fstabinfo uses both those calls and it parses jakubs example just fine.
Comment 7 Thorsten Kampe 2007-10-11 07:42:38 UTC
(In reply to comment #5)
> you're thinking too hard about this
> 
> the `fsck` binary scans all fstab entries and it comes with e2fsprogs ...
> ext2/ext3 is irrelevant

I know
 
> baselayout uses whatever fsck exists on the system ... it does not care whether
> it sucks

So the parsing of /etc/fstab is just a part of an "ordinary" fsck to make sure that the partitions are consistent?
 
> here are the parties to the debate: fuse and e2fsprogs ... baselayout has
> nothing to do with it

I have to agree (if baselayout/checkfs does no additional fstab parsing but only a normal fsck)
Comment 8 Roy Marples (RETIRED) gentoo-dev 2007-10-11 09:00:22 UTC
(In reply to comment #7)
> I have to agree (if baselayout/checkfs does no additional fstab parsing but
> only a normal fsck)

It does do fstab parsing, but for other things. This error in question does indeed come from e2fsprogs.

baselayout-1 has broken fstab parsing, as it's similar to e2fsprogs in this regard.
baselayout-2 on the other hand, uses fstabinfo which is a custom C program that correctly uses libc calls to query fstab, which is correct.
Comment 9 SpanKY gentoo-dev 2007-10-11 14:31:51 UTC
if you tell fsck to check all partitions, then yes, it is going to have to parse the whole fstab to find the exact partitions to check
Comment 10 Roy Marples (RETIRED) gentoo-dev 2007-10-11 18:59:41 UTC
irrelevant - fsck parses fstab no matter what command line options you pass.
Comment 11 SpanKY gentoo-dev 2007-10-12 14:45:20 UTC
*shrug* answer is still the same ... open a tracker on the e2fsprogs site
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-10-18 17:19:23 UTC
*** Bug 196285 has been marked as a duplicate of this bug. ***
Comment 13 jieryn 2007-11-05 15:07:18 UTC
What is the updated status? This is really annoying. If we resolve this as upstream, have they been notified? Please paste a defect number or a link to a mailing list entry. Thanks!
Comment 14 Thorsten Kampe 2007-11-05 15:45:58 UTC
(In reply to comment #13)
> What is the updated status? This is really annoying. If we resolve this as
> upstream, have they been notified? Please paste a defect number or a link to a
> mailing list entry. Thanks!

I've opened a bug at http://sourceforge.net/tracker/index.php?func=detail&aid=1826147&group_id=2406&atid=102406 today. Let's see how the e2fs team thinks about the issue
Comment 15 jieryn 2007-11-05 16:51:59 UTC
Excellent, thanks! :-)
Comment 16 Theodore Tso 2007-12-17 22:07:09 UTC
Created attachment 138781 [details, diff]
Patch to address Gentoo bug #195405: fsck gives incorrect warning for wdfs/sshfs entry in /etc/fstab

The following fix has been checked into the e2fsprogs git repository, and will be  in e2fsprogs 1.40.4
Comment 17 SpanKY gentoo-dev 2007-12-24 12:48:40 UTC
thanks, ive added that to 1.40.3-r1