Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


Get more diskspace

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Linux Tips, Tricks, Tutorials
Author Message
Cool_blade



Joined: 10 Feb 2004
Posts: 6
Location: Brisbane - Australia

Posted: Tue Feb 10, 2004 9:10 pm    Post subject: Get more diskspace  

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 nice simply do this.

Code: #tune2fs -m 1 /dev/udba

Where /dev/udba is the partition you want to change. 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/udba
Back to top  
caker



Joined: 15 Apr 2003
Posts: 2371
Location: Galloway, NJ

Posted: Wed Feb 11, 2004 2:10 am    Post subject:  

That is such an obvious command to run on all the template filesystems .... Thanks :)

-Chris
Back to top  
caker



Joined: 15 Apr 2003
Posts: 2371
Location: Galloway, NJ

Posted: Wed Feb 11, 2004 3:24 am    Post subject:  

The platform manager now sets "tune2fs -m 1" when you create a new ext2/ext3 image, when you deploy, and when you resize (up or down).

-Chris
Back to top  
Cool_blade



Joined: 10 Feb 2004
Posts: 6
Location: Brisbane - Australia

Posted: Wed Feb 11, 2004 6:21 am    Post subject:  

Glad to be of help!

Yes it is quite obvious, and it seems not too many people do it.
Back to top  
acid2000



Joined: 31 May 2004
Posts: 4

Posted: Tue Jun 01, 2004 8:21 pm    Post subject:  

just changed the reserved size on my home machine and just got 2 gig extra space, thanks ;)
Back to top  
mastabog



Joined: 03 Apr 2004
Posts: 64

Posted: Tue Jun 01, 2004 8:57 pm    Post subject:  

Indeed nice ... the little pleasures of life :)
Back to top  
hwilliams



Joined: 25 May 2004
Posts: 18
Location: Newnan, Georgia

Posted: Tue Jun 01, 2004 11:02 pm    Post subject:  

Quote: The platform manager now sets "tune2fs -m 1" when you create a new ext2/ext3 image, when you deploy, and when you resize (up or down).

My little 3 gig Linode 64 reserved 0% on all partitions, so you'd be *increasing* the blocks reserved by 1%, right?... Maybe this is a good thing?

Hal Williams
Back to top  
Bill Clinton



Joined: 23 Nov 2003
Posts: 79

Posted: Wed Jun 02, 2004 8:32 am    Post subject:  

hwilliams wrote: My little 3 gig Linode 64 reserved 0% on all partitions, so you'd be *increasing* the blocks reserved by 1%, right?... Maybe this is a good thing?
That doesn't sound right. You always want some disk space dedicated to the root user to prevent any kind of disk-space eating attack. (Log flooding comes to mind.)

There is much reasoning behind this, the first is that the root still has space to get the job done. Secondly because most important daemons are run as the root user, and therefore they too have access to this reserved space. (However syslog somewhat defeats this being that its run by the root user)

Bill Clinton
Back to top  
bpendleton



Joined: 10 Oct 2003
Posts: 25

Posted: Wed Jun 02, 2004 1:36 pm    Post subject:  

You don't need to have space reserved on every partition, though. For those of you out there who actually do have several partitions of different sizes at different mount points, reserving space on all of them isn't necessary. Some reserved space on / and probably /var (and wherever /root is, if it's not on /) are important. But, if I have a mount point for, say, squid, or freecache, then there's no need to reserve space for root there.

And, since I use LVM, I have pretty tightly-defined partitions for many of my defined applications. But I also use reiser, which I don't think does reservation quite the same (or at all?)
Back to top  
sweh



Joined: 13 Apr 2004
Posts: 224

Posted: Wed Jun 02, 2004 1:50 pm    Post subject:  

bpendleton wrote: You don't need to have space reserved on every partition, though.
Indeed. On my network at home I have a server which acts as a file/print server to the rest of my machines, and also acts as a backup storage device (each machine does a "dump" to this by NFS). For offsite storage I have removable disks which I rsync the dump areas to. These removable disks have been tuned to zero reserved space

Code: % dumpe2fs -h /dev/hdg1 | grep -i reserved
dumpe2fs 1.34 (25-Jul-2003)
Reserved block count:     0
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
Now if only I could get IDE detach/reattach working properly without needing a reboot!
Back to top  
 
       Linode.com Forum Forum Index -> Linux Tips, Tricks, Tutorials
Page 1 of 1