dlostboy (at) lostinfo (dot) com 

Home | Journal | Multimedia | Files | Other | Links | About

      FreeBSD 5.X guide for optimizing your server for space

Ok, so something I learned a long time ago is that FreeBSD puts away 8% of your disk space for root access only. The idea is that having users fill your disk is bad so they made it so that the disk will report full to any non-root user way before it's actually full. This is a smart plan, especially on partitions like /var. The problem is that sometimes we're working on a machine that has no purpose but to store data for you. Hell, it might not even be writable... I, for instance, keep a drive in my server that has ISO images of all the software I use commonly. That way I can mount it with daemon tools if I need it and keep the precious CD masters in the jewel cases where they really belong. This keeps me from misplacing CD's, scratching them, or having people borrow them.

What I didn't know is that your filesystem optimizes disk writes for SPEED and not SPACE when the filesystem is below this threshold. I don't care how long it takes to write to this drive, cause I rarely do that. In this case, I'm much more concerned with disk space. Here's how to use tunefs to change it to a more appropriate setup...(we'll assume your mountpoint for the data is /backups/)

  • umount /backups; tunefs -m 0%; tunefs -o space; mount -a
    This will unmount the drive, modify it not to have that minfree savings (the 8%) and at the same time, configure all disk writes to be optimized for space, not speed.
  •  
     

      ©2000, ©2001 LostInformation