LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-31-2015, 08:12 AM   #1
scramble64
LQ Newbie
 
Registered: Nov 2011
Posts: 7

Rep: Reputation: Disabled
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
 
Old 05-31-2015, 09:42 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
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.
 
Old 05-31-2015, 09:43 AM   #3
scramble64
LQ Newbie
 
Registered: Nov 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scramble64 View Post
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?
To clarify, the partition manager says the partition size is 495.12 GiB, but when I type 'df -h' I am told the size is 488G, of which only 465G are used and yet 0G is available!

Any advice is welcome.
 
Old 05-31-2015, 09:56 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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.
 
Old 05-31-2015, 10:33 AM   #5
scramble64
LQ Newbie
 
Registered: Nov 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
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?
 
Old 05-31-2015, 11:40 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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.
 
Old 06-01-2015, 02:15 AM   #7
scramble64
LQ Newbie
 
Registered: Nov 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
@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!
 
Old 06-01-2015, 10:22 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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.
 
2 members found this post helpful.
  


Reply

Tags
partitionssize



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding /home partition size, ? gombile13 Linux - Hardware 5 08-21-2010 12:01 PM
changing the /home size of partition adamf4i Linux - Newbie 14 08-07-2006 04:06 AM
how to increase the size of home partition srnerkar1 Linux - Software 1 12-05-2005 05:28 AM
/home partition changed to read-only file system! Echo Kilo Linux - Software 1 03-30-2005 01:59 PM
Reasonable size for a /home partition? eurleif Linux - General 9 12-26-2003 03:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration