Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've recently moved my system partition in order to install some Windows and now Nautilus reports 0 free space at /home partition (and the total size seems to be incorrect as well)

enter image description here

but there are 17 GB and GParted can see that

GParted

I've checked them for errors with GParted and naively moved ubuntu partition a little bit further from home but that didn't help...

What else can I do?

share|improve this question
    
Try pulling up the properties of /media/ubuntu/home, which looks to be the actual mountpoint. It may report differently. –  Darael Jan 20 '13 at 8:09
    
@Darael no difference –  szx Jan 20 '13 at 9:04
    
Gparted sees it as ext2 while Nautilus reports it as ext3/4. There's something wring here. Can you add the contents of your FSTAB file? –  To Do Jan 20 '13 at 13:53
add comment

1 Answer 1

ext[234] partitions are formatted by default with a number of reserved blocks set aside that can only be written to by root. As the mke2fs man page explains:

-m reserved-blocks-percentage
              Specify the percentage of the filesystem blocks reserved for the
              super-user.   This  avoids  fragmentation, and allows root-owned
              daemons, such as syslogd(8), to continue to  function  correctly
              after non-privileged processes are prevented from writing to the
              filesystem.  The default percentage is 5%.

You'll note that 5% is exactly the amount of unoccupied space as shown by gparted.

You can view the reserved block count by running (as root) tune2fs -l /dev/sda5, and adjust it with tune2fs -m <percentage> /dev/sda5. However, I would strongly recommend against it.

As the man page explains, the reserved count is not only used to give root processes some "wiggle room" (critical on system partitions), but to reduce fragmentation (especially critical on /home partitions). That 5% buffer provides the filesystem with spare blocks it can use to write files contiguously, rather than having to fragment them into available space scattered all across the disk.

(The reserved block count is a percentage, rather than a list or range of blocks, because the filesystem doesn't care specifically which blocks are reserved. It can juggle free blocks around as needed, as long as a certain percentage are kept reserved.)

Forcing the filesystem to burn up that last 5% of space will give you a paltry amount of extra storage space, in exchange for sending the fragmentation of your filesystem skyrocketing and degrading performance. If you must reduce the reserved block percentage to gain some space, consider setting it to 4% or 3% rather than 0.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.