No reserved blocks in ext2 on Aspire One?
April 6, 2009 8:32 PM   Subscribe

Why is it OK to have no reserved blocks in ext2 on the Acer Aspire One?

This guide to recovering space on the Acer Aspire One gives as one suggestion:
By default the ext2 filesystems reserves 5% of all blocks for the superuser. You can safely set this to 0% and gain additional 325MB, or 375MB if you also remove the swap partition.
sudo tune2fs -m0 /dev/sda1


Now, I think I understand what reserved blocks are and why. Basically, it's because to avoid a situation where the free disk space drops close to zero, root doesn't have room in /var to do even the most basic things and the whole system starts falling apart. Please correct me if that's wrong or incomplete.

So why is it OK to unreserve these blocks on the Aspire One? Is there something about the way Linpus is set up that makes the above scenario impossible?
posted by Busy Old Fool to Technology (4 answers total) 1 user marked this as a favorite
 
Best answer: Generally, this sort of reserved space comes in useful when you're operating a server (with certain constraints). Say, for example, you have a remote webserver with limited hard drive space that is suddenly hit very hard by incoming requests. You didn't do anything fancy with your partitions, so everything is in the root partition. You don't notice all of this new traffic until it's too late, and all of a sudden, there isn't any space left in the device, preventing you from logging in or making changes to the file system. If you didn't have the reserved space, you'd be hurting and have to reboot the machine.

Note that in this situation, three things are happening: you're being hit unaware by disk utilization; the partition that's filling up has to hold /var, which prevents you from logging in as a normal user; and there is no easy way to boot your machine from other media. At least two of these probably don't apply for a notebook: you will probably not get to the critical threshhold of disk space, and it would be easy enough to boot off of some media to fix things should the situation get out of hand.

In short, you're probably fine going with the 0% solution. If you're super paranoid, you can stick /var on its own dedicated partition, but this would probably waste space anyway, so you may as well keep the reserved blocks at 1%.
posted by kdar at 9:13 PM on April 6, 2009


Best answer: Typically you won't have trouble with logging in with a full drive (at least in text mode), but you can have problems on a reboot if the system can't create or append to logfiles. I haven't tried booting a Linux system with a completely full drive, um, probably EVER, but I imagine it could be a very painful experience.

The 5% number was arrived at when drives were small, and logfiles, relatively speaking, were very large. When a 200 megabyte drive was luxurious, reserving 10MB for system overhead was eminently sensible. When the biggest consumer drives are ten thousand times larger than that, 5% becomes rather silly.

I'd tune it to 1% and forget about it; that'll give you 65 additional megs reserved for root after you completely fill the drive from userspace, which should give you enough breathing room to fix the problem without major surgery. If you need that last 65 megs that much, it might be better to get a bigger drive.
posted by Malor at 9:40 PM on April 6, 2009


Best answer: An interesting question. Generally, if disk space fills up bad things can happen. If you have sudo enabled that might mitigate things slightly. You might want 1 percent around just to be safe.

But it's just a threshold. It doesn't magically make more space on the disk. There are other options to consider such as network storage and larger disks; if you need an extra 300 MB you may be cutting it rather tight in scenarios where you are flat out of space for things you actually want on disk.

Normally, there's also a consideration for performance on very full drives. When your disk is very full, writes have to be spread across disk more and more. Keeping 5 percent around for when bad things happen might be useful for defragmenting. However, I think the device is an SSD, so this is less important.
posted by pwnguin at 10:21 PM on April 6, 2009


Response by poster: Thanks, all. The 1% suggestion sounds look a good idea.

I'm about to buy an 8GB class 6 SDHC for more space, so the extra 65MB are not something I'm losing sleep over - it's more that I wanted to learn more about this system.
posted by Busy Old Fool at 8:28 PM on April 8, 2009


« Older Blackberry-wanna-get-GMail-filter ......... The...   |   How do i get rid of this trojan? Newer »
This thread is closed to new comments.