0

Using GParted, I resized two Ext4 partitions on my external HDD, making them smaller.

But now the OS says there is no space available on both of them.

This is the outptut of df -H for those partitions.

Filesystem    Size    Used    Avail    Use%
/dev/sdb5     782G    744G        0    100%
/dev/sdb6     635G    616G        0    100%

The very output above makes no sense at all, how can it say there are 0 bytes available when almost 40 gigabytes are not used e.g. in /dev/sdb5 ?

I tried executing both the following commands automatically via GParted (I show them just for /dev/sdb5 but I tried them on both partitions).

e2fsck -f -y -v -C 0 /dev/sdb5
resize2fs -p /dev/sdb5

but nothing changed.

I can modify existing files in those two partitions, and in particular I can delete files , but even if I delete a big file the OS still says there are 0 bytes available.

What is going on here?

PS: It still says 0 bytes available even if I am root.

  • You're seeing the 5% reserved for system. Change that in tune2fs if you want. the reserve is to allow the system to continue some critical things even if a user "fills" up the filesystem. – ubfan1 Apr 16 '21 at 21:08
  • many thanks @ubfan1 but this was an external hd that I was only using for backups, does the system still reserve 5% of the space for external hard disks as well? And if this is the case, what arguments should I pass to tune2fs if I want e.g. to reserve 0% of the space instead of 5% and use all the unused space? ? – GeekInDisguise Apr 16 '21 at 21:11
  • See the man page for tune2fs. the -r option is for reserved. There are reasons for reserving space, like preserving the ability to change partiion sizes, but if you'd rather have the space, and don't plan on any changes, probably OK to make 0. – ubfan1 Apr 16 '21 at 21:18
  • Many thanks, I am also following this tutorial. Ah it's very important to know that this is also done to preserve the ability to change partition sizes, since I will probably resize them again in the future. Please feel free to convert these suggestions into an answer if you want. – GeekInDisguise Apr 16 '21 at 21:20
  • It's also important to say that using the -m option rather than -r simplifies things as it allows to specify a percentage instead of an absolute value. Anyway, at this point I will trust the default 5% reservation and I will verify all of this by deleting some stuff to go beyond 5% of unused space, to make the "0 bytes free" message change :-) – GeekInDisguise Apr 16 '21 at 21:24

0 Answers0