Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Regain more harddrive space on ext2/3!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
-=Blade=-
n00b
n00b


Joined: 18 Nov 2002
Posts: 20
Location: Brisbane - Australia

PostPosted: Wed Feb 11, 2004 2:07 am    Post subject: Regain more harddrive space on ext2/3! Reply with quote

The default settings for a ext{2,3} file system is to reserve 5% of the file system so that only root can access it.
This was great back in the day when user accounts filled a drive to the max and everything was on one partition - not so when we're lean and mean and want some extra space.

To change your reserved block count to something a little more sensible simply do this.

Code:
#tune2fs -m 1 /dev/hda3


Where /dev/hda is the partition you want to change to 1% of reserved space. On a 1gig partition, you're looking at about 60Meg free increase. Of course it's expotential to larger drives, so a 80 gig partition might regain 5gig of space.

To check out what your file system is doing, simply use tune2fs again.
Code:
#tune2fs -l /dev/hda3
Back to top
View user's profile Send private message
Borgasm
n00b
n00b


Joined: 17 Apr 2003
Posts: 9
Location: UConn

PostPosted: Wed Feb 11, 2004 2:59 pm    Post subject: Reply with quote

I had been wondering for a long time why my drive said 10000 blocks, 9000 used, 123 free.....

Great tip...
Back to top
View user's profile Send private message
Holly
n00b
n00b


Joined: 08 Mar 2003
Posts: 67

PostPosted: Thu Feb 12, 2004 2:22 pm    Post subject: Reply with quote

does reiserfs also reserve space for system files?
Back to top
View user's profile Send private message
odessit
Apprentice
Apprentice


Joined: 01 Feb 2004
Posts: 180
Location: Current Residency - Server Room - Caution - Frostbite Imminent!

PostPosted: Thu Feb 12, 2004 3:47 pm    Post subject: Reply with quote

cool, regained ~ 200 megs
Back to top
View user's profile Send private message
snakattak3
Guru
Guru


Joined: 11 Dec 2002
Posts: 468
Location: Seattle

PostPosted: Thu Feb 12, 2004 4:40 pm    Post subject: Reply with quote

Awesom!!! I was wondering where some of my hard drive space went. Before...
Code:
  /dev/md0  [##########*************************]  29% ( 13G) /
  /dev/md1  [#######****************************]  21% ( 98G) /home
      none  [###################################] 100% (   0) /mnt/dvd
      none  [***********************************]   0% (253M) /dev/shm

and after..
Code:
  /dev/md0  [##########*************************]  29% ( 13G) /
  /dev/md1  [#######****************************]  20% (104G) /home
      none  [###################################] 100% (   0) /mnt/dvd
      none  [***********************************]   0% (253M) /dev/shm

Looks like i've freed up about 6 gigs on /dev/md0. Its around an 140 gig raid partition. Thanks.
_________________
Ban Reality TV!
Adopt an Unanswered Post
Back to top
View user's profile Send private message
JoeykhCom
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jan 2004
Posts: 81

PostPosted: Thu Feb 12, 2004 9:58 pm    Post subject: Reply with quote

Cool
Back to top
View user's profile Send private message
-=Blade=-
n00b
n00b


Joined: 18 Nov 2002
Posts: 20
Location: Brisbane - Australia

PostPosted: Fri Feb 13, 2004 3:10 am    Post subject: Reply with quote

Holly wrote:
does reiserfs also reserve space for system files?


As far as I know, Reiserfs has no reserved space at all (apart from it's own overhead).

You can safely change the percentage of a ext2/3 filesystem to 0 as well. The only reason it's there is to help you out if the filesystem is full and you want to move stuff/etc.
Back to top
View user's profile Send private message
wishkah
Guru
Guru


Joined: 09 May 2003
Posts: 441
Location: de

PostPosted: Sun Feb 15, 2004 9:57 am    Post subject: Reply with quote

Thanks for the hint, dude, that gave me 2 more gigs on my / :-) I guess you can use tune2fs savely with ext3 (was confused at first cause I couldn't find tune3fs. *sigh* ;-))
_________________
if only I could fill my heart with love...
Back to top
View user's profile Send private message
cylgalad
Veteran
Veteran


Joined: 18 Apr 2003
Posts: 1327
Location: France

PostPosted: Sun Feb 15, 2004 11:56 am    Post subject: Reply with quote

Ah ! Now I finally understand why an ext2/3 partition could fill up more than it should.
Thanks for that tip, 700 MB "freed" !
Back to top
View user's profile Send private message
-=Blade=-
n00b
n00b


Joined: 18 Nov 2002
Posts: 20
Location: Brisbane - Australia

PostPosted: Sun Feb 15, 2004 11:51 pm    Post subject: Reply with quote

littleendian wrote:
Thanks for the hint, dude, that gave me 2 more gigs on my / :-) I guess you can use tune2fs savely with ext3 (was confused at first cause I couldn't find tune3fs. *sigh* ;-))


Yes Ted T'so said 'a little bit of forethought goes a long way' whilst he was designing the Ext3 filesystem (which is almot identical to the Ext2 filesystem). That way you get all the benefits of a tried and true operating system.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum