Calculating the size of /

Jim Byrnes jf_byrnes at comcast.net
Tue Sep 11 16:01:54 UTC 2012


On 09/11/2012 02:02 AM, Colin Law wrote:
> On 11 September 2012 01:20, Jim Byrnes <jf_byrnes at comcast.net> wrote:
>> On 09/10/2012 04:30 PM, PleegWat wrote:
>>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> On 09/10/2012 09:03 PM, Jim Byrnes wrote:
>>>>
>>>> In another thread I was trying to calculate how much disk space to
>>>> allocate to / if I did a fresh install and this time setup  a
>>>> separate /home partition.
>>>>
>>>> To get an idea of how much was outside of the home folder on my
>>>> present install I did:
>>>>
>>>> sudo du -shc /  =>  105GB du -shc /home   =>  64GB
>>>>
>>>> This led me to believe I had 105GB - 64GB = 41GB that would be in
>>>> /.
>>>>
>>>> Colin suggested I run Disk Usage Analyzer:
>>>>
>>>> Total filesystem capacity: 264.7GB(used: 104.5GB avail: 160.2GB
>>>>
>>>> /        100%        75.3GB home        84.1%        63.3GB usr
>>>> 6.7%        5.0GB var        5.8%        4.4GB lib        2.1%
>>>> 1.6GB opt        1.0%        762.2MB boot        0.3%
>>>> 194.6MB
>>>>
>>>> Everything else was 0.0%
>>>>
>>>> So this seems to say that if I had a separate /home on this machine
>>>> that / would be 12GB not the 41GB calculated above.
>>>>
>>>> So what accounts for the difference of 29.2GB between the used of
>>>> 104.5GB and / of 75.3GB?
>>>>
>>>> The 12GB and 29.2GB = the 41GB I originally calculated would be
>>>> needed for /.  12GB seems to be more in line with what others
>>>> reported as the size needed for /.
>>>>
>>>> Regards,  Jim
>>>>
>>>>
>>>
>>> Hi,
>>>
>>> The 105 GB is probably correct, since it matches the total filesystem
>>> usage reported by Disk Usage Analyzer
>>>
>>> The list returned by disk usage analyzer is probably off because of
>>> data in directories your normal login user cannot read. This may
>>> include data in root's home and trash, certain log directories, and
>>> other users' data. Given that we're talking about 29GB, another user
>>> account is the only thing that seems likely.
>>>
>>> Another user would have his own directory under /home. Other
>>> directories containing data not readable by your user may be
>>> discoverable running disk usage analyzer as root (Alt-F2, 'gksu baobab')
>>>
>>> You can also drill down using the --max-depth=1 option to du.
>>>
>>> PleegWat
>>
>>
>>
>> Your analysis appears to be correct.  I am the only user but the problem is
>> in root's home and trash, as below:
>>
>> /                               100%                            42.9GB
>> root                            67.5%                   28.9GB
>>    .local                          99.8%                   28.9GB
>>      share                       100.0%                  28.9GB
>>        trash                       100.0%                          28.9GB
>>          files                   100.0%                  28.9GB
>>            backintime              99.9%                   28.9GB
>>            <snip>
>> .virtualbox/HardDisks   99.7%                   28.3GB
>>
>> I use backintime to do backups to an external usb drive. Back in April it
>> was getting full so I used backintime to delete some backup sets. Somehow
>> they seem to have ended up under root.
>>
>> I emptied the trash and reran the analysis.  Some of the numbers changed but
>> the 28GB is still under root.  I even rebooted but it is still there.  How
>> can I get rid of that 28GB?
>
> Do you mean you still see it in the backintime folder under root?  If
> so then you can use sudo with the command line to see what is in the
> folder and remove it if appropriate, or you could run
> gksu nautilus
> in a terminal which will give you a nautilus window with root
> permissions so you can do it graphically.  Be careful obviously and
> make sure you do not delete something important when running as root.
>
> Colin
>

Yes if I start the Disk Usage Analyzer with gksu.  Here's a screenshot 
of what I see:

http://s12.postimage.org/9bmvoz125/Disk_Usage_Analyzer.png

The one on the left is started from the Applications menu and the one 
the right is started with gksu.  If I start nautilus with gksu in root I 
see the Desktop folder with 0 itmes and gparted_details.htm from 2 years 
ago.  Free space is reported as 151.4GB.

At this point I don't know which one, if any, to believe.

Regards,  Jim





More information about the ubuntu-users mailing list