[opensuse] mounted partitions don't show up in df
Hello all: I have been observing for some time a strange behavior in my mounted partitions. Here's my fstab: linux:/home/rleal # cat /etc/fstab /dev/sda7 / reiserfs acl,user_xattr 1 1 /dev/sda3 /boot reiserfs acl,user_xattr 1 2 /dev/sdb2 /home reiserfs acl,user_xattr 1 2 /dev/sda6 /opt reiserfs acl,user_xattr 1 2 /dev/sda8 /tmp reiserfs acl,user_xattr 1 2 /dev/sda5 /usr reiserfs acl,user_xattr 1 2 /dev/sda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0 /dev/sda2 swap swap defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs noauto 0 0 usbfs /proc/bus/usb usbfs noauto 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0 /dev/sdb1 /windows/D ext2 acl,user_xattr 1 2 and /proc/mounts lists them adequately: linux:/home/rleal # cat /proc/mounts rootfs / rootfs rw 0 0 udev /dev tmpfs rw 0 0 /dev/sda7 / reiserfs rw 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 debugfs /sys/kernel/debug debugfs rw 0 0 devpts /dev/pts devpts rw 0 0 /dev/sda3 /boot reiserfs rw 0 0 /dev/sdb2 /home reiserfs rw 0 0 /dev/sda6 /opt reiserfs rw 0 0 /dev/sda8 /tmp reiserfs rw 0 0 /dev/sda5 /usr reiserfs rw 0 0 /dev/sda1 /windows/C ntfs ro,nosuid,nodev,noexec,uid=0,gid=100,umask=02,nls=utf8,errors=continue,mft_zone_multiplier=1 0 0 /dev/sdb1 /windows/D ext2 rw 0 0 But if I want to see the disk space usage on my computer, df just shows part of what's (supposed to be) mounted: linux:/home/rleal # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda7 21G 1.5G 19G 8% / udev 990M 132K 990M 1% /dev linux:/home/rleal # mount /dev/sda7 on / type reiserfs (rw,acl,user_xattr) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) debugfs on /sys/kernel/debug type debugfs (rw) udev on /dev type tmpfs (rw) devpts on /dev/pts type devpts (rw,mode=0620,gid=5) linux:/home/rleal # cat /etc/mtab /dev/sda7 / reiserfs rw,acl,user_xattr 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 debugfs /sys/kernel/debug debugfs rw 0 0 udev /dev tmpfs rw 0 0 devpts /dev/pts devpts rw,mode=0620,gid=5 0 0 I found out that during boot, after /etc/init.d/boot.udev my the "missing" partitions are already mounted. But after that /etc/init.d/boot.localfs script tries to mount them again and fails with message that they are already mounted or mount points are busy: mount: /dev/sda3 already mounted or /boot busy mount: /dev/sdb2 already mounted or /home busy mount: /dev/sda6 already mounted or /opt busy mount: /dev/sda8 already mounted or /tmp busy mount: /dev/sda5 already mounted or /usr busy mount: /dev/sda1 already mounted or /windows/C busy mount: /dev/sdb1 already mounted or /windows/D busy And of course are not unmounted when shutting down. I use two SATA2 MAXTOR 7200 (1x320 GB $ 1x200GB) on ASUS M2nPV-VM MoBo with a AMD AM2 ATHLON 64 3800+ proc. OpenSuSE 10.2. Occurs on all kernels I tried, the opensuse ones and vanilla. Is this a bug, as suggested in the opensuse-es list? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-06-29 at 13:20 +0200, Ricardo Sánchez wrote: Hi! Just a minor point: that your clock is running fast by two hours. ... I think you could edit the boot.localfs to insert checkpoints and see what is happening. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGhNQDtTMYHG2NR9URAo8xAJ0X/IYggtPHDfpwwJATPgYP/I9HCgCdHBg3 7q2qNwn2wPqYlDu4OkpffYU= =skXG -----END PGP SIGNATURE-----
[ Why the Reply-To header? ] On Friday 29 June 2007 04:20, Ricardo Sánchez wrote:
Hello all:
I have been observing for some time a strange behavior in my mounted partitions.
Here's my fstab:
...
But if I want to see the disk space usage on my computer, df just shows part of what's (supposed to be) mounted:
linux:/home/rleal # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda7 21G 1.5G 19G 8% / udev 990M 132K 990M 1% /dev
linux:/home/rleal # mount /dev/sda7 on / type reiserfs (rw,acl,user_xattr) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) debugfs on /sys/kernel/debug type debugfs (rw) udev on /dev type tmpfs (rw) devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
linux:/home/rleal # cat /etc/mtab /dev/sda7 / reiserfs rw,acl,user_xattr 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 debugfs /sys/kernel/debug debugfs rw 0 0 udev /dev tmpfs rw 0 0 devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
...
Is this a bug, as suggested in the opensuse-es list?
I don't know the answer to that, but the man page for "mount" mentions that /etc/mtab can either be a plain file that records the result of issuing the mount command or it can be a symbolic link to /proc/mounts. I find that on my system, I see more output from the "df" command when /etc/mtab is the symbolic link to /proc/mounts than I do when it's the original file. The difference is all pseudo- (non-disk) file systems and a duplication of the root file system listed under both its label and its device name in /proc/mounts. Perhaps for some reason (the ordering of your /etc/init.d run-level scripts, perhaps?) your mounts all happen while the root file system is read-only and hence not recorded in /etc/mtab. In this case, perhaps you should do what it suggests in the man page for mount and replace /etc/mtab with a symbolic link to /proc/mounts. It does list some other disadvantages to doing that, however, so you should read that man page before trying this. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
[ Why the Reply-To header? ]
sorry ;-)
I don't know the answer to that, but the man page for "mount" mentions that /etc/mtab can either be a plain file that records the result of issuing the mount command or it can be a symbolic link to /proc/mounts.
by creating a symbolic link to /proc/mounts all file systems are displayed by df and other applications: linux:/etc # mv mtab mtab.bkp linux:/etc # ln -s /proc/mounts /etc/mtab linux:/etc # df -h Filesystem Size Used Avail Use% Mounted on rootfs 21G 1.5G 19G 8% / udev 990M 132K 990M 1% /dev /dev/sda7 21G 1.5G 19G 8% / /dev/sda3 87M 76M 11M 88% /boot /dev/sdb2 199G 54G 146G 27% /home /dev/sda6 41G 1.9G 39G 5% /opt /dev/sda8 1.9G 33M 1.8G 2% /tmp /dev/sda5 70G 9.7G 61G 14% /usr /dev/sda1 55G 17G 38G 31% /windows/C /dev/sdb1 99G 48G 46G 51% /windows/D However a reboot overwrites the symlink and the info is lost again.
Perhaps for some reason (the ordering of your /etc/init.d run-level scripts, perhaps?) your mounts all happen while the root file system is read-only and hence not recorded in /etc/mtab. I am not sure this is the problem. It has been happening for some time and (at least to my knowledge) I haven't changed any of these scripts. However, is there a possibility to fix this ordering, in case it was modified or altered?
Best regards -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 June 2007 09:15, Ricardo Sánchez wrote:
Randall R Schulz wrote: ...
I don't know the answer to that, but the man page for "mount" mentions that /etc/mtab can either be a plain file that records the result of issuing the mount command or it can be a symbolic link to /proc/mounts.
by creating a symbolic link to /proc/mounts all file systems are displayed by df and other applications:
...
However a reboot overwrites the symlink and the info is lost again.
Perhaps for some reason (the ordering of your /etc/init.d run-level scripts, perhaps?) your mounts all happen while the root file system is read-only and hence not recorded in /etc/mtab.
I am not sure this is the problem. It has been happening for some time and (at least to my knowledge) I haven't changed any of these scripts. However, is there a possibility to fix this ordering, in case it was modified or altered?
If the symlink alternative works for you, you could add a simple start-up script that replaces the file with the symlink late in the start-up sequence. However, given the fact that /etc/mtab (the file) is built from scratch upon each reboot and the fact that it's reconstituted even when the symlink is there, the implication is fairly firm that something in your boot sequence is the cause of the problem. You could search all your /etc/init.d scripts (or at least the active ones—those with symlinks to them in one of the run-level-specific directories) for uses of mount, umount or direct reference to the /etc/mtab file itself. It might give you clue as to what's going wrong.
Best regards
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Carlos E. R.
-
Randall R Schulz
-
Ricardo Sánchez