[Bug 815322] New: device of "$PWD" not in output of mount if on 'root' (/dev/rootfs not in mount output)
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c0 Summary: device of "$PWD" not in output of mount if on 'root' (/dev/rootfs not in mount output) Classification: openSUSE Product: openSUSE Factory Version: 13.1 Milestone 0 Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: suse@tlinx.org QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28 I have a simple util program that has worked until recently -- I'm not sure if it went into 12.3 (I think so), or if it is in factory. These 3 lines demonstrate the problem: dev=$(df /bin |tail -1|cut -d\ -f1) mountline=$(mount|grep "$dev"); [[ -z ${mountline:-} ]] && mountline=ERROR echo "mounted with /etc/fstab line: '$mountline'" For some reason, the devices shown by 'mount' don't seem to be the devices shown in 'df' nor in /etc/fstab, yet both are documented to use /etc/mtab. Reproducible: Always Steps to Reproduce: 1. Try above script lines -- note that dev for root = /dev/root 2. But note that output of mount doesn't show /dev/root -- (only rootfs). 3. mount doesn't recognize 'rootfs' as a block device or special type: # mount rootfs /mnt mount: special device rootfs does not exist Ishtar:/bin# mount rootfs /mnt -t rootfs mount: wrong fs type, bad option, bad superblock on rootfs, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so Actual Results: mount claims root is on a non-existent device. Expected Results: mount should list values in mtab that show existing devices, not non-existent device aliases. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c Xiaolong Li <xlli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xlli@suse.com AssignedTo|bnc-team-screening@forge.pr |puzel@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c1 Petr Uzel <puzel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |suse@tlinx.org --- Comment #1 from Petr Uzel <puzel@suse.com> 2013-04-22 13:59:43 UTC --- I'm sorry, but I don't understand what exactly is the problem. Could you please - attach your /etc/fstab and /etc/mtab - attach output of 'mount' - confirm that /etc/mtab is a symlink to /proc/self/mounts - attach output of 'bash -x yourscript' and point me to what exactly in the output of the script is wrong? TIA -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c2 --- Comment #2 from L. A. Walsh <suse@tlinx.org> 2013-04-22 11:05:52 PDT --- Created an attachment (id=536345) --> (http://bugzilla.novell.com/attachment.cgi?id=536345) /etc/fstab -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c3 --- Comment #3 from L. A. Walsh <suse@tlinx.org> 2013-04-22 11:06:47 PDT --- Created an attachment (id=536346) --> (http://bugzilla.novell.com/attachment.cgi?id=536346) /etc/mtab -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c4 --- Comment #4 from L. A. Walsh <suse@tlinx.org> 2013-04-22 11:08:36 PDT --- Created an attachment (id=536347) --> (http://bugzilla.novell.com/attachment.cgi?id=536347) output of mount -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c5 --- Comment #5 from L. A. Walsh <suse@tlinx.org> 2013-04-22 11:09:33 PDT --- Created an attachment (id=536348) --> (http://bugzilla.novell.com/attachment.cgi?id=536348) df output -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c6 L. A. Walsh <suse@tlinx.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|suse@tlinx.org | --- Comment #6 from L. A. Walsh <suse@tlinx.org> 2013-04-22 11:15:57 PDT --- I confirm that /etc/mtab CANNOT be a symlink to /proc/self/mounts -- it needs to be writable or mount can't write to it when you use: mount -f --no-canonicalize -o remount -a df is displaying the output in /etc/fstab format, mount no longer does, So when I try to find the device associated with a directory by using "df <dir>" I get (in my home directory): # df . Filesystem Size Used Avail Use% Mounted on /dev/HnS/Home 1.0T 792G 233G 78% /home but you can't search for /dev/HnS/Home in the output of mount -- as mount is no longer showing the form used in fstab (which it did before). Does that clarify the problem? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c7 --- Comment #7 from L. A. Walsh <suse@tlinx.org> 2013-04-22 11:19:24 PDT --- Oh... slightly worse... it no longer puts out my root file system at all -- it puts out a "-": # df /bin Filesystem Size Used Avail Use% Mounted on - 12G 8.6G 3.4G 72% / I assure you, "-" is not what is listed for root in /etc/fstab. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c8 Petr Uzel <puzel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |suse@tlinx.org --- Comment #8 from Petr Uzel <puzel@suse.com> 2013-04-22 19:55:16 UTC --- (In reply to comment #6)
I confirm that /etc/mtab CANNOT be a symlink to /proc/self/mounts -- it needs to be writable or mount can't write to it when you use: mount -f --no-canonicalize -o remount -a
No, regular mtab is a hell (chasing inconsistencies between mtab and /proc/mounts was no fun) which can be avoided with recent version of mount. One of the good things about systemd is that is it issues a warning if /etc/mtab is not a symlink: http://cgit.freedesktop.org/systemd/systemd/tree/README http://lists.opensuse.org/opensuse-factory/2011-01/msg00130.html Please check if making /etc/mtab symlink to /proc/self/mounts does make any difference. Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c9 L. A. Walsh <suse@tlinx.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|suse@tlinx.org | --- Comment #9 from L. A. Walsh <suse@tlinx.org> 2013-04-22 13:24:35 PDT --- I *started* with a link from /etc/mtab to /proc/self/mounts. That's when I read the mean page carefullly and found that it is only by rewriting the contents of /etc/mtab that that mount can implement the no-canonicalize option. I also note, though, that when I do the Have you tried mount -f --no-canonicalize -a -o remount on a system with LVM? your devices are changed from /dev/VolGroup/LV-name into /dev/mapper/Volgroup-LV-name Which isn't what is in /etc/fstab. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c10 --- Comment #10 from L. A. Walsh <suse@tlinx.org> 2013-04-22 13:27:24 PDT --- I honestly don't care about /etc/mtab. I want mount to put out the same device names as I use in /etc/fstab. That's all I care about. That is no longer working. Having devices with random made up names that don't correspond to what is in /etc/fstab is also a hell. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c Petr Uzel <puzel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
head /proc/self/mounts rootfs / rootfs rw 0 0 /dev/root / xfs rw,nodiratime,relatime,attr2,inode64,noquota 0 0 devtmpfs /dev devtmpfs rw,relatime,size=24708844k,nr_inodes=6177211,mode=755 0 0 /dev/sdc6 /usr xfs rw,nodiratime,relatime,swalloc,attr2,largeio,inode64,allocsize=64k,logbsize=256k,noquota 0 0
mount -l /dev/sdc1 on / type xfs (rw,nodiratime,relatime,attr2,inode64,noquota) [Root] devtmpfs on /dev type devtmpfs (rw,relatime,size=24708844k,nr_inodes=6177211,mode=755) /dev/sdc6 on /usr type xfs (rw,nodiratime,relatime,swalloc,attr2,largeio,inode64,allocsize=64k,logbsize=256k,noquota) [Usr]
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c11 --- Comment #11 from L. A. Walsh <suse@tlinx.org> 2013-04-25 00:31:42 PDT --- BTW -- I tried using the output of /proc/self/mounts -- it doesn't show my root device, whereas the output of mount does (showing lines up to proc.... ) the 1st entry of /proc/self/mounts references some pseudo device called rootfs -- but that's not a real device. proc /proc proc rw,relatime 0 0 proc on /proc type proc (rw,relatime) ------------- However, I found a patch that fixes the problem called: util-linux-HACK-boot.localfs.diff That has the comment that "boot.localfs" needs the real device name -- so it gets it by setting a ENV var that tells 'mount' to output the real name. So maybe that 'hack' should be the default... That would fix part of the problem (rootfs shadowing real root). That would leave the lvm name problem which looks more complicated. It looks like mount was re-written and no thought was given to the no-canonical option that lvm needs (cuz udev doesn't know about "vg's", I think)... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815322 https://bugzilla.novell.com/show_bug.cgi?id=815322#c13 --- Comment #13 from L. A. Walsh <suse@tlinx.org> 2013-05-18 12:12:38 PDT --- FWIW, I regressed the versions back to 11.4 - and it was he last version that worked. Perhaps the 12.x versions can be fixed by knowing that (or forward porting the fixes?)... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=815322 http://bugzilla.novell.com/show_bug.cgi?id=815322#c14 Tomáš Chvátal <tchvatal@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #14 from Tomáš Chvátal <tchvatal@suse.com> --- The product for which this bug is reported is no longer supported. Sorry we didn't manage to find out the solution for the problem during the lifetime. If the problem still occurs on current releases feel free to report a new ticket and/or if the problem is in upstream software itself to report it to the upstream developers. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com