Question about filesystems

Bill Moran wmoran at potentialtech.com
Fri Jun 13 10:35:58 PDT 2003


Mack Lobell wrote:
> Hi,
> 
> i just purchased a 120G hdd and are now fumbling around with 
> filesystems. I followed section 2.3 in the "Formatting Media For Use 
> With FreeBSD" article when i created the new filesystem. I will mainly 
> store large files >5M.
> 
> If i use UFS1 df -H gives:
> Filesystem    Size   Used  Avail Capacity  Mounted on
> /dev/ad2c     122G   2.0K   112G     0%    /mnt/test
> 
> If i use UFS2 df -H gives:
> Filesystem    Size   Used  Avail Capacity  Mounted on
> /dev/ad2c     120G   2.0K   110G     0%    /mnt/test
> 
> 
> Questions:
> Is there a way to reduce the overhead from 10G?

If you know you'll only be keeping big files on this part, you can use
-i in newfs to specify the bytes per inode.  If the average filesize is
larger than 5M, then "-i 1000000" would be pretty safe (unless you've
got tons of directories.  My understanding is that the space not used
for inodes will be available for file storage.  The default is 16k.
Remember that if you run out of inodes, you can't create any more files,
no matter how much space is free, so don't be too agressive.

Also, you could use -m to lower the minimum free space threshold, which
defaults to 8%.  If you fill the drive up past 92%, performance starts
to suck, but you can decide whether or not to make that tradeoff.  The
man page for tunefs has more.

> Is there a good reason to use UFS2, i will lose 2G?

With only 120G, probably not important to use UFS2.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



More information about the freebsd-questions mailing list