Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Get more diskspace
PostPosted: Tue Feb 10, 2004 10:10 pm 
Offline
Senior Newbie

Joined: Tue Feb 10, 2004 9:44 pm
Posts: 6
Website: http://www.lansmash.com
Location: Brisbane - Australia
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 


Top
   
 Post subject:
PostPosted: Wed Feb 11, 2004 3:10 am 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
That is such an obvious command to run on all the template filesystems .... Thanks :)

-Chris


Top
   
 Post subject:
PostPosted: Wed Feb 11, 2004 4:24 am 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
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


Top
   
 Post subject:
PostPosted: Wed Feb 11, 2004 7:21 am 
Offline
Senior Newbie

Joined: Tue Feb 10, 2004 9:44 pm
Posts: 6
Website: http://www.lansmash.com
Location: Brisbane - Australia
Glad to be of help!

Yes it is quite obvious, and it seems not too many people do it.


Top
   
 Post subject:
PostPosted: Tue Jun 01, 2004 9:21 pm 
Offline
Newbie

Joined: Mon May 31, 2004 4:55 pm
Posts: 4
Website: http://www.acid2000.co.uk
just changed the reserved size on my home machine and just got 2 gig extra space, thanks ;)

_________________
"Only two things are infinite, the universe and human
stupidity, and I'm not sure about the former."
Albert Einstein


Top
   
 Post subject:
PostPosted: Tue Jun 01, 2004 9:57 pm 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
Indeed nice ... the little pleasures of life :)


Top
   
 Post subject:
PostPosted: Wed Jun 02, 2004 12:02 am 
Offline
Junior Member

Joined: Tue May 25, 2004 2:21 pm
Posts: 20
Location: Newnan, Georgia
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


Top
   
 Post subject:
PostPosted: Wed Jun 02, 2004 9:32 am 
Offline
Senior Member
User avatar

Joined: Sun Nov 23, 2003 1:40 pm
Posts: 79
Website: http://www.whitehouse.gov/history/presidents/bc42.html
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


Top
   
 Post subject:
PostPosted: Wed Jun 02, 2004 2:36 pm 
Offline
Junior Member

Joined: Fri Oct 10, 2003 5:57 pm
Posts: 25
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?)


Top
   
 Post subject:
PostPosted: Wed Jun 02, 2004 2:50 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
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!

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group