Telling the OS that the home partition size has changed
Hello,
I have had to shrink the size of my home partition with GParted, which went well. Now I have rebooted but cannot log into KDE because the space available results to be zero, but obviously the 'Used' space from 'df -h' does not coincide with the actual partition size, so I am thinking I need to somehow tell the OS that the partition size has changed. How do I do that? Please let me know if you need any other information. Many thanks in advance for any help you may be able to give. Carlo |
You must reduce the size of the file system before shrinking the partition. If you have logical volumes, you must reduce their size after reducing the filesystems and before shrinking the partition.
|
Quote:
Any advice is welcome. |
Assuming /home is an ext3/4 partition by default 5% of the total space is reserved for root. The space does not "appear" in the output of df so the numbers do not add up. You can reduce the amount of reserved space via the tune2fs command.
Reserved space is supposed to reduce fragmentation as well as allow root to log in case the file system becomes full. |
Thank you for your replies.
@smallpond: I used GParted live from a usb drive to resize and I assume GParted knows the filesystem size needs to be reduced before the partition is shrunk? There were no errors reported after aplying the resizing changes from the GParted GUI. @michaelk: the original size was 500G and I removed 5G to give a 495G large partition. So even if a portion is reserved for root and that is why I see a total size of 488G from 'df -h', since used space is 465G, there are still ~23G missing! Where did they go? |
If you try adding up the numbers from df i.e used + avail it does not equal size. That difference is the reserved space i.e ~24GB. When the file system exceeds 95% available space will be zero.
The difference between df size and partition size is due to file system overhead. |
@michaelk, thank you for your clarification. I didn't know about file system overhead. After freeing up some space, I was able to log in. Thanks again for all the help!
|
You really shouldn't be running your filesystem that close to capacity anyway. As soon as you pass ~70%, you should start clearing out space to bring it back down. If you can't clear out enough space to keep it below ~70%, then you should consider upgrading your hardware. As you approach 80-90% and higher, fragmentation goes through the roof and the drive slows to a crawl, it's not a good place to be.
|
All times are GMT -5. The time now is 02:24 AM. |