Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 493158

Summary: sys-apps/util-linux: `mount -at ...` fails but `mount -a -t ...` works
Product: Gentoo Linux Reporter: Andreas Plesch <andreasplesch>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED NEEDINFO    
Severity: minor    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Andreas Plesch 2013-12-02 21:48:24 UTC
After noticing that the netmount init script did not mount a cifs mount, I tracked the issue to the mount -at $fstypes line in the script. Changing to an explicit "mount -a -t $fstypes" invocation resolves the issue.

Reproducible: Always

Steps to Reproduce:
1.add a cifs mount line to /etc/fstab
2.reboot
3.observe how the mount is not mounted
Actual Results:  
cifs share is not mounted at boot

Expected Results:  
cifs share is mounted at boot

emerge --info:

Portage 2.2.7 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.15-r3, 3.7.10-gentoo-r1 x86_64)                                                                                                                     
=================================================================                                                                                                                                                           
System uname: Linux-3.7.10-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2                                                                                                                         
KiB Mem:    32911148 total,  26622048 free                                                                                                                                                                                  
KiB Swap:   33554428 total,  33554428 free                                                                                                                                                                                  
Timestamp of tree: Mon, 02 Dec 2013 19:00:01 +0000                                                                                                                                                                          
ld GNU ld (GNU Binutils) 2.23.1                                                                                                                                                                                             
app-shells/bash:          4.2_p45                                                                                                                                                                                           
dev-java/java-config:     2.1.12-r1                                                                                                                                                                                         
dev-lang/python:          2.7.5-r3, 3.2.5-r3                                                                                                                                                                                
dev-util/cmake:           2.8.11.2                                                                                                                                                                                          
dev-util/pkgconfig:       0.28                                                                                                                                                                                              
sys-apps/baselayout:      2.2                                                                                                                                                                                               
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 skype-eula PUEL @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=core2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.med.harvard.edu/gentoo ftp://mirror.datapipe.net/gentoo http://gentoo.mirrors.tds.net/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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=""
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cpudetection cracklib crypt cups cxx dbus declarative dri dts dvd dvdr dvdread emboss encode exif fam firefox flac fortran gd gdbm gif gpm gtk iconv imap ipv6 jpeg kde kipi lcms ldap libnotify mad mjpeg mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl odbc ogg openconnect opengl openmp pam pango pcre pdf phonon plasma plotutils png policykit postgres ppds python qt qt3support qt4 readline real samba sdl semantic-desktop session smp spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb v4l v4l2 vorbis wmf wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa fbdev" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

equery l util-linux openrc
 * Searching for util-linux ...
[IP-] [  ] sys-apps/util-linux-2.22.2:0

 * Searching for openrc ...
[IP-] [  ] sys-apps/openrc-0.11.8:0

/etc/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.

#/dev/sdb1
PARTLABEL=EFI\040system\040partition    /boot/efi       vfat            noauto,noatime  1 2

#/dev/sdb4
PARTLABEL=SSD_230GB                     /               ext4            noatime,discard         0 1

#/dev/sda1
PARTLABEL=Linux\040swap                 none            swap            sw              0 0

#/dev/sda2
PARTLABEL=HDD_1830GB                    /home           ext4            noatime         0 0

#/dev/cdrom                             /mnt/cdrom      auto            noauto,ro       0 0
#/dev/fd0                               /mnt/floppy     auto            noauto          0 0

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)

tmpfs                                   /var/tmp        tmpfs           defaults,noatime,mode=1777      0 0
tmpfs                                   /tmp            tmpfs           defaults,noatime,mode=1777      0 0

#new cifs mount
#use andreas uid and gid
#sec=ntlmssp apparently default anyways
//rcstore.somewhere/homes/home00/andreas_plesch /mnt/mountdir   cifs credentials=/etc/fstab.cifs.credentials.rcstore_ap,uid=1000,gid=1000,sec=ntlmssp 0 0
Comment 1 Andreas Plesch 2013-12-02 21:54:32 UTC
As mentioned spelling out the mount options as in

mount -a -t filesystems

works, and this is how I use the init scripts now.

I think that the "-at" version is commonly used, so I was surprised. I could not find similar reports for util-linux bugs but searching for "-at" is not very effective on any search interface to mailing lists or web archives.
Comment 2 William Hubbs gentoo-dev 2013-12-11 07:46:27 UTC
@base-system:
Is this a bug in util-linux, or should I apply the fix he is requesting
in OpenRC?

Thanks,

William
Comment 3 SpanKY gentoo-dev 2013-12-23 07:11:57 UTC
(In reply to Andreas Plesch from comment #0)

does util-linux 2.24 work ?  if not, try running:

 sudo strace -o log mount -at cifs

and then post that log file as an attachment