Bugzilla – Bug 152846
Hard drive free space in main-menu is wrong
Last modified: 2008-03-08 00:58:12 UTC
See the attached screenshot. I have about 70 GB free in my /home partition, but main-menu reports that I have only 15 GB free. [In another machine, it reports that I have 124 GB *used*, while my /home is a 50 GB partition, and the whole hard drive is 60 GB :) ]
Created attachment 69830 [details] free-space.png
I suspect that hal is not correctly identifying your /dev/mapper/system-home device as the disk space reporting appears correct if that mount is not included in the statistics. can you do this: for udi in `hal-find-by-capability --capability volume` ; do hal-device $udi done
Created attachment 79091 [details] Output of df and hal-device
Yeah, as I suspected hal is not reporting that partition. Reassigning ...
Some more info: champignon$ cat /etc/fstab /dev/hda1 / ext3 acl,user_xattr 1 1 /dev/system/home /home ext3 defaults 1 2 /dev/hda2 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/hda5 /data1 auto noauto,user 0 0 Disk /dev/hda: 122.9 GB, 122942324736 bytes 255 heads, 63 sectors/track, 0 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Partition table: Device Boot Start End Blocks Id System /dev/hda1 * 1 1305 10482381 83 Linux /dev/hda2 1306 1436 1052257+ 82 Linux swap / Solaris /dev/hda3 1437 14946 108519075 f W95 Ext'd (LBA) /dev/hda5 1437 2742 10490413+ 83 Linux /dev/hda6 2743 14946 98028598+ 8e Linux LVM As Jimmy says, in the attachment in comment #3 there's no HAL volume for the LVM volume that got mounted on /home.
Thats not right as you can see in the attachment HAL reports this partition (as all partitions from the partition table) as udi = '/org/freedesktop/Hal/devices/volume_part6_size_100381284864' for /dev/hda6 or which partition you mean?
I'm speaking of the /dev/system/home partition reported by df, which is reported to be mounted. According to HAL, /dev/hda6 is not mounted. Is there a way to determine if and what the relationship is between /dev/hda6 and /dev/system/home with HAL?
No, because IMO hal currently doesn't handle lvm mounts. @kay: you wrote the current mount detection code. Any comments?
It's not about mount detection code, HAL does not care about any "virtual" device like raid volumes at the moment and it's unlikely that that will change soon.
Ok, but in this case there is no way to detect that the underlying hda6 is actually mounted in this case via hal (but df knows).
Right, there isn't even a device object available in HAL for md, lvm, loopback, raid, network storage devices, ... - they are just completely ignored. Support for all this would need to be implemented to show up there.
Moved to hal maintainer and resolving as LATER because we clearly won't get this in FCS>
reopen
@federico: please add a FATE request if you need LVM support in HAL
Alternatively, main-menu could simply use gnome_vfs_get_volume_free_space().
*** Bug 203610 has been marked as a duplicate of this bug. ***
I've filed this as Fate #301253.
since it is in FATE I close this bug
*** Bug 328867 has been marked as a duplicate of this bug. ***
This bug has never been resolved and still duplicates of this bug-report get filed. Please re-open.
Reopening since the bug is not fixed.
Created attachment 175846 [details] gnome-main-menu-152846-hard-drive-free-space.diff Patch to make main-menu use a simple statvfs() to get the free space for the user's home. Previously it tried to gather all the non-CDROM volumes and add up their free space, but I think this is not what the user wants to see. What you want is the amount of space to which you can write, i.e. disk_free($HOME). With this patch main-menu displays the correct free space and capacity for me (I have an LVM partition for /home).
Jimmy, could you please take a look at this patch? It simplifies the code a lot, and produces correct results :)
Thanks a lot for taking care of this bug so quickly!
*** Bug 328864 has been marked as a duplicate of this bug. ***
Moving to 10.3.
*** Bug 241361 has been marked as a duplicate of this bug. ***
There's a test package here with the aforementioned patch: http://download.opensuse.org/repositories/home:/federico-mena:/10.3/openSUSE_10.3 It fixes the problem for me. I'll put this patch in our main package as soon as the Main Menu bug week is over: http://en.opensuse.org/GNOME/Main_menu_bug_week
Note to self: change the "Hard Drive" label to be "Home". People are getting confused that the tile shows you the free space on all your partitions, while in fact it only considers the volume where your $HOME is.
Actually, bug #332418 has a patch to rename this, and good discussion about it.
commited to svn.
*** Bug 363692 has been marked as a duplicate of this bug. ***
Fixed for 11.0. submitted to factory - v 0.9.9