df does not show free space if using UUIDs

Bug #117897 reported by Pau Garcia Quiles
10
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Binary package hint: coreutils

If a partition is mounted using its UUID (for instance UUID=f83c0f6e-8336-4851-a899-183efe54791b) instead of the device identifier (/dev/sda6), df does not show the free space in the volume.

Example of /etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda6
UUID=f83c0f6e-8336-4851-a899-183efe54791b / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=9877-489A /media/recovery vfat defaults,utf8,umask=007,gid=46 0 1
# /dev/sda2
UUID=0400-79EF /media/windows vfat defaults,utf8,umask=007,gid=46 0 1
# /dev/sda5
UUID=3f061cd1-70af-45de-9048-e5013dec6313 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

Revision history for this message
Micah Cowan (micahcowan) wrote :

Thank you for your bug report.

I can't reproduce this problem in Feisty, coreutils-5.97-5.2ubuntu3. One difference between my setup and yours is that I'm using IDE rather than SCSI.

Are you using a RAID setup or anything? Is it true SCSI, or are you using SCSI emulation?
Please give (1) your coreutils package version, and (2) the output of your df command.

Changed in coreutils:
assignee: nobody → micahcowan
status: Unconfirmed → Needs Info
Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

I am using a SATA system, which is SCSI emulation. No RAID. If you can't reproduce this bug in an IDE system, I guess that makes a difference. I am using Feisty stock coreutils. This bug was also present in Edgy, by the way.

Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

Here comes the output of 'df', the output of 'mount' and a 'cat /etc/fstab'. As you can see, 'mount' fails to report UUID-mounted volumes, too:

pgquiles@pravetz:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
varrun 1037948 144 1037804 1% /var/run
varlock 1037948 0 1037948 0% /var/lock
procbususb 1037948 120 1037828 1% /proc/bus/usb
udev 1037948 120 1037828 1% /dev
devshm 1037948 0 1037948 0% /dev/shm
lrm 1037948 33788 1004160 4% /lib/modules/2.6.20-16-generic/volatile

pgquiles@pravetz:~$ mount
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-16-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)

pgquiles@pravetz:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda6
UUID=f83c0f6e-8336-4851-a899-183efe54791b / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=9877-489A /media/recovery vfat defaults,utf8,umask=007,gid=46 0 1
# /dev/sda2
UUID=0400-79EF /media/windows vfat defaults,utf8,umask=007,gid=46 0 1
# /dev/sda5
UUID=3f061cd1-70af-45de-9048-e5013dec6313 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

Revision history for this message
Micah Cowan (micahcowan) wrote :

Thank you. Could you please also provide the contents of /proc/mounts, and /etc/mtab?

Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

Here they come:

pgquiles@pravetz:~$ cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw 0 0
/dev/disk/by-uuid/46dbf7b2-5708-44a4-b935-3430c8951a10 / ext3 rw,data=ordered 0 0
/dev/disk/by-uuid/46dbf7b2-5708-44a4-b935-3430c8951a10 /dev/.static/dev ext3 rw,data=ordered 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /lib/modules/2.6.20-16-generic/volatile tmpfs rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
usbfs /dev/bus/usb/.usbfs usbfs rw 0 0
udev /proc/bus/usb tmpfs rw 0 0
usbfs /proc/bus/usb/.usbfs usbfs rw 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
none /proc/fs/vmblock/mountPoint vmblock rw 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0

pgquiles@pravetz:~$ cat /etc/mtab
proc /proc proc rw,noexec,nosuid,nodev 0 0
/sys /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
devshm /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
lrm /lib/modules/2.6.20-16-generic/volatile tmpfs rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
none /proc/fs/vmblock/mountPoint vmblock rw 0 0

Revision history for this message
Micah Cowan (micahcowan) wrote :

By my reading, those outputs show that the kernel is at least aware of / being mounted by the appropriate partition, and that mtab isn't. Probably a flaw in mount, rather than coreutils. However, I still show no sign of the /media/* drives. Are you absolutely sure those are mounted?

Could you please give me the output of "sudo mount -av"?

Thanks very much for your help.

Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

Interestingly, Filelight also fails to display the space used by UUID-mounted filesystems. Maybe the bug is not in coreutils. I am attaching a screenshot.

Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

The /media/* partitions are not mounted because I am not mounting them but that is not the point of this bug report. The problem is 'df' does not show the free space in '/'.

Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

Oops! Forget the comment about Filelight, it was just I had forgot to scan the hard disk.

Revision history for this message
Micah Cowan (micahcowan) wrote :

Since mount is apparently not recording the mounted / to /etc/mtab, the fault is probably mount's, rather than coreutils (reassigning).

Could you please tell me what happens when you attempt "sudo mount -av"?

Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

pgquiles@pravetz:~$ sudo mount -av
mount: proc already mounted on /proc
mount: mount point /media/recovery does not exist
mount: special device /dev/disk/by-uuid/0400-79EF does not exist

Micah Cowan (micahcowan)
Changed in util-linux:
assignee: micahcowan → nobody
importance: Undecided → Medium
status: Needs Info → Confirmed
Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Pau Garcia i Quiles:
What is the output of
blkid
?

Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

pgquiles@pravetz:~$ /sbin/blkid
/dev/sda1: TYPE="ntfs"
/dev/sda2: TYPE="swap" UUID="1e2e4074-e819-4beb-8155-10a6029f871f"
/dev/sda3: UUID="46dbf7b2-5708-44a4-b935-3430c8951a10" SEC_TYPE="ext2" TYPE="ext3"

Revision history for this message
Bryan McLellan (btm) wrote :

Confirmed.

guest@rajeev2:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/cdrom /media/cdrom0 udf,iso9660 user,noauto 0 0

# UUID based mounting
UUID=c4d20f5d-15b5-403e-81a3-afaed84f7428 / ext3 defaults,errors=remount-ro 0 1
UUID=709ceeae-7651-4aa2-8ff4-0e19565895c7 none swap sw 0 0

-------------------
guest@rajeev2:~$ cat /etc/mtab
proc /proc proc rw,noexec,nosuid,nodev 0 0
/sys /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
devshm /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
lrm /lib/modules/2.6.20-16-generic/volatile tmpfs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
----------------
guest@rajeev2:~$ blkid
/dev/sdb1: TYPE="ntfs"
/dev/sdb5: UUID="709ceeae-7651-4aa2-8ff4-0e19565895c7" TYPE="swap"
-----------------
guest@rajeev2:~$ cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw 0 0
/dev/disk/by-uuid/c4d20f5d-15b5-403e-81a3-afaed84f7428 / ext3 rw,data=ordered 0 0
/dev/disk/by-uuid/c4d20f5d-15b5-403e-81a3-afaed84f7428 /dev/.static/dev ext3 rw,data=ordered 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /lib/modules/2.6.20-16-generic/volatile tmpfs rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
usbfs /dev/bus/usb/.usbfs usbfs rw 0 0
udev /proc/bus/usb tmpfs rw 0 0
usbfs /proc/bus/usb/.usbfs usbfs rw 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0

----------------------

Note that "mount -f /" appears to fix but "mount -af" does not.
Changing /etc/fstab to specify a by device instead off uuid fixes.

Revision history for this message
LaMont Jones (lamont) wrote :

I cannot reproduce this on gutsy. df shows the free space for my drives, all of which are mounted using UUID..

Changed in util-linux:
assignee: nobody → lamont
status: Confirmed → Incomplete
Revision history for this message
Colin Brace (cbrace) wrote :

I am seeing this bug under 8.04. I just changed my ftab entries from using UUIDs to LABELs and df now again displays free space correctly.

Phillip Susi (psusi)
Changed in util-linux (Ubuntu):
assignee: LaMont Jones (lamont) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for util-linux (Ubuntu) because there has been no activity for 60 days.]

Changed in util-linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.