GNOME Bugzilla – Bug 527682
Wish for baobab --one-file-system
Last modified: 2013-07-20 09:45:41 UTC
[ forwarded from http://bugs.debian.org/475636 ] The du command has --one-file-system, which allows you to examine the usage of the / filesystem without uselessly scanning NFS mounts like /usr and /home. It would be nice if baobab also made it easy to scan a SINGLE filesystem. By default it seems to scan all filesystems, and one must remember to toggle individual filesystems on/off in Edit > Preferences (which is tedious). Furthermore I noticed that a manual mount done with sudo mount fs:/srv /srv could not be disabled in baobab's Edit > Preferences dialog, because it was not listed as a filesystem. I had to umount /srv, start baobab and wait for it to finish collecting data, then remount /srv!
Yes it's will be great to have this. It's will be great too, to have this on the "scan remote folder" Exemple : I have to scan the "/" for a machine because this one is full, boabob will display all mounted device ( nfs, /mnt , ... )
Created attachment 117884 [details] [review] Add one_filesystem-option-to-preference dialog
Created attachment 117885 [details] [review] Actually implement the one_filesystem option
I've attached two patches of my own that implement the requested feature. Known issues: * Files hidden by mount points are ignored altogether. I don't event know whether it is possible to get any information about them. * The mount points themselves are also hidden.
interesting... we are feature and ui frozen for 2.24, but we should revisit this for the next version.
Created attachment 119379 [details] [review] Add-one_filesystem-option-to-preference-dialog in trunk Updated patch against the last trunk
Created attachment 119380 [details] [review] Actually-implement-the-one_filesystem-option in trunk Updated against last trunk
Sorry for the mess, I've obsoleted the wrong patch with my last attachment...
Paolo, it's can be revisit for the next version ?
Any news on this bug?
Created attachment 136318 [details] [review] Add one_filesystem option to preference dialog Updated patch, known to work with 2.26.0
Created attachment 136319 [details] [review] Actually implement the one_filesystem option Updated, known to work with 2.26.0
Sorry for the big delay :( The patch makes sense to me, however I do not like very much "_Do not cross filesystem borders" as a string exposed in the UI. The HIG suggest to not use negative, so the checkbox should be somthing like "Restrict to one filesystem" (better suggestion are welcome!) and be off by default.
+ if (baobab.bbEnableOneFilesystem && g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_UNIX_DEVICE) != device) The patch also need to be robust to the case where the UNIX_DEVICE attribute is not available, so you should check with g_file_info_has_attribute and act accordingly.
(In reply to comment #14) > + if (baobab.bbEnableOneFilesystem && > g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_UNIX_DEVICE) != device) > > The patch also need to be robust to the case where the UNIX_DEVICE attribute is > not available, so you should check with g_file_info_has_attribute and act > accordingly. What about g_file_info_get_attribute_* calls in baobab_hardlinks_array_{has,add} (in the same file)? BTW, if we accept a global justification for not checking an attribute presence, one could say that the checks in baobab_hardlinks_array_add are not needed because they have already been done in baobab_hardlinks_array_has... but since there is no way for this check to be performed automatically by the compiler, maybe it's not such a good idea. However, the retrieval of the attributes could be (obviously) factored between both functions.
Hello, Any news on this bug? Gnome now monitors root filesystem and notifies logged on users when the disk space gets low with: "The volume `Filesystem root` has only 123.4 MB disk space remaining" It then offers to "Examine" the situation using Baobab. => Great. It would have been much more useful (and faster), if baobab where supporting --one-file-system. BTW, thanks for baobab, it is a great tool. Franklin
Mountpoinst are now excluded by default