Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 415171 - sys-kernel/dracut-018: /usr isn't checked with fsck in initrd when pass value in fstab is set to zero
Summary: sys-kernel/dracut-018: /usr isn't checked with fsck in initrd when pass value...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-08 19:30 UTC by cyberbat
Modified: 2012-05-16 20:51 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cyberbat 2012-05-08 19:30:14 UTC
AS I understand comments in #406799 /usr should be checked when mounted by usrmount module of dracut even when /usr has pass value (the sixth field) in /etc/fstab set to 0.

But it is not so. If I have (/usr is on lvm)
/dev/vg/usr             /usr            ext4            noatime         1 0
then /usr is not checked according to log.

grep dracut /var/log/messages
May  8 20:46:49 localhost dracut: Scanning devices sdb3  for LVM logical volumes vg/usr
May  8 20:46:49 localhost dracut: inactive '/dev/vg/usr' [10.00 GiB] inherit
May  8 20:46:49 localhost dracut: inactive '/dev/vg/tmp' [50.00 GiB] inherit
[cutted of]
May  8 20:46:49 localhost dracut: inactive '/dev/vg/portage-packages' [9.75 GiB] inherit
May  8 20:46:49 localhost dracut: Checking ext4: /dev/sdb2
May  8 20:46:49 localhost dracut: issuing e2fsck -a  /dev/sdb2
May  8 20:46:49 localhost dracut: /dev/sdb2: clean, 5279/25688 files, 94141/102400 blocks
May  8 20:46:49 localhost dracut: Remounting /dev/sdb2 with -o noatime,ro
May  8 20:46:49 localhost dracut: Mounted root filesystem /dev/sdb2
May  8 20:46:49 localhost dracut: Mounting /usr
May  8 20:46:49 localhost dracut: Switching root

If I have
/dev/vg/usr             /usr            ext4            noatime         1 2
then /usr is checked according to log.
grep dracut /var/log/messages
May  7 18:58:52 localhost dracut: Checking ext4: /dev/sdb2
May  7 18:58:52 localhost dracut: issuing e2fsck -a  /dev/sdb2
May  7 18:58:52 localhost dracut: /dev/sdb2: clean, 4763/25688 files, 67070/102400 blocks
May  7 18:58:52 localhost dracut: Remounting /dev/sdb2 with -o noatime,ro
May  7 18:58:52 localhost dracut: Mounted root filesystem /dev/sdb2
May  7 18:58:52 localhost dracut: Checking ext4: /dev/vg/usr
May  7 18:58:52 localhost dracut: issuing e2fsck -a  /dev/vg/usr
May  7 18:58:52 localhost dracut: /dev/vg/usr: clean, 204465/655360 files, 1736579/2621440 blocks
May  7 18:58:52 localhost dracut: Mounting /usr
May  7 18:58:52 localhost dracut: Switching root

But I have error message when openrc tries to fsck /usr because of pass=2.

I have tried near all combinations of fstab params, fstab.sys and so on. My mind is near blowing. If it's not dracut bug please anybody tell me what to do to make /usr being checked and openrc not output warning:
/dev/mapper/vg-usr is mounted.  e2fsck: Cannot continue, aborting.

emerge --info
Portage 2.1.10.49 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.14.1-r3, 3.2.12-gentoo x86_64)
=================================================================
System uname: Linux-3.2.12-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9505_@_2.83GHz-with-gentoo-2.0.3
Timestamp of tree: Sat, 05 May 2012 15:15:01 +0000
ccache version 3.1.6 [enabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3
dev-util/ccache:          3.1.6
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo stuff x-unklay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.3 Q3AEULA PUEL LOKI-EULA skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="ftp://gentoo.bloodhost.ru/ ftp://mirror.yandex.ru/gentoo-distfiles/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/stuff /var/lib/layman/unklay"
SYNC="rsync://gentoo.bloodhost.ru/gentoo-portage"
USE="X a52 aac acl acpi akonadi alsa amd64 amr audiofile bash-completion branding bzip2 cairo cdda cddb cdio cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus declarative device-mapper djvu dri dts dv dvd dvdr emboss encode exif ffmpeg firefox flac fontconfig fortran ftp gd gdu geoip gif gimp gmp gnutls gphoto2 gpm graphviz gsm gstreamer gtk handbook iconv icu id3tag idn imagemagick imap imlib ios iphone ipod ipv6 jabber jbig jingle jpeg jpeg2k kde kipi kontact ladspa lame lcms libnotify libsamplerate libwww lm_sensors lzma lzo mac mad matroska mikmod mjpeg mmx mng modplug modules mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz ncurses nls nptl nptlonly ntfs ogg openal openexr opengl pam pango pcre pdf phonon plasma png policykit ppds pppd qt3support qt4 quicktime rar raw readline rss rtmp sasl scanner sdl semantic-desktop session sharedext smp sndfile socks5 speex spell sqlite sse sse2 sse3 sse4 ssl ssse3 startup-notification svg symlink sysfs syslog taglib theora threads thumbnail tiff truetype udev unicode usb video vim-syntax vlc vorbis wavpack webkit wmf wxwidgets x264 xcb xcomposite xface xml xmp xorg xpm xscreensaver xulrunner xv xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="caps lvm gensplash" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-05-09 07:24:14 UTC
What version of OpenRC do you have?  This is problem which should be solved in OpenRC.  Dracut behavior is correct in this regard, it is not a bug.

OpenRC should skip fsck of /usr if it already has been fscked, which can be accomplished by skipping fsck if volume is already mounted or mounted rw.
Comment 2 cyberbat 2012-05-09 09:42:20 UTC
(In reply to comment #1)
> What version of OpenRC do you have?  This is problem which should be solved
> in OpenRC.  Dracut behavior is correct in this regard, it is not a bug.
>

I have latest stable openrc: sys-apps/openrc-0.9.8.4, but I've also tried 0.9.9.3, still the same issue. So in your opinion dracut should check pass value and decide whether to fsck filesystem or not? And then openrc should not check filesystem mounted by dracut not depending whether it was checked earlier?

> OpenRC should skip fsck of /usr if it already has been fscked, which can be
> accomplished by skipping fsck if volume is already mounted or mounted rw.
Comment 3 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-05-09 09:54:20 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > What version of OpenRC do you have?  This is problem which should be solved
> > in OpenRC.  Dracut behavior is correct in this regard, it is not a bug.
> >
> 
> I have latest stable openrc: sys-apps/openrc-0.9.8.4, but I've also tried
> 0.9.9.3, still the same issue. So in your opinion dracut should check pass
> value and decide whether to fsck filesystem or not? And then openrc should
> not check filesystem mounted by dracut not depending whether it was checked
> earlier?

OpenRC should assume /usr has been fscked if it is mounted.  I'll talk with OpenRC developers about this issue.


> > OpenRC should skip fsck of /usr if it already has been fscked, which can be
> > accomplished by skipping fsck if volume is already mounted or mounted rw.
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-05-09 10:03:16 UTC
You can also try older version of Dracut: 014-r2, until this is fixed in OpenRC.  014-r2 mounts /usr read-only.
Comment 5 cyberbat 2012-05-09 12:23:57 UTC
(In reply to comment #3)
> 
> OpenRC should assume /usr has been fscked if it is mounted.  I'll talk with
> OpenRC developers about this issue.
> 

May be I should fill openrc bug?

(In reply to comment #4)
> You can also try older version of Dracut: 014-r2, until this is fixed in OpenRC.  014-> r2 mounts /usr read-only.

Thanks but even with error message about mounted usr system is successfully booted, so I don't think I need to downgrade.
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-05-09 14:47:56 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > 
> > OpenRC should assume /usr has been fscked if it is mounted.  I'll talk with
> > OpenRC developers about this issue.
> > 
> 
> May be I should fill openrc bug?

I've filed it already.  See bug #415249.
Comment 7 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-05-14 06:40:39 UTC
Please add -M option to fsck_args in /etc/conf.d/fsck. Does this solve the issue for you?
Comment 8 cyberbat 2012-05-16 20:16:49 UTC
(In reply to comment #7)
> Please add -M option to fsck_args in /etc/conf.d/fsck. Does this solve the
> issue for you?

Yes. By the way, bug 415027 gone away too, because openrc doesn't also start fsck to check root mounted ro by dracut.
Comment 9 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-05-16 20:51:03 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Please add -M option to fsck_args in /etc/conf.d/fsck. Does this solve the
> > issue for you?
> 
> Yes. By the way, bug 415027 gone away too, because openrc doesn't also start
> fsck to check root mounted ro by dracut.

Yes, but that issue is still valid and is quite serious. Thank you for testing -M option.