Filesystem size and free space

Peter Jeremy peterjeremy at optushome.com.au
Sat Nov 15 14:06:36 PST 2008


On 2008-Nov-14 22:58:24 -0600, "Rick C. Petty" <rick-freebsd2008 at kiwi-computer.com> wrote:
>> 16KB with 2KB fragments.  Each file or directory needs 256 bytes of
>> metadata (its inode).  I can't quickly find the size of the filesystem
>> metadata but estimate it is <<1% of the filesystem size.
>
>Not true.  With the current defaults, and not including the 320k reserved
>at the beginning (for bootblocks, etc.) nor the few MB at the end to align
>with a cylinder boundary, UFS2 takes around 3% space for its metadata.
>Almost all of this is inode allocation.

Note that I explicitly differentiated between the inodes (file metadata)
and the rest of the filesystem metadata - superblock replicas, cylinder
group headers, free block bitmaps, etc.  Inodes do have several % reserved
for them by default but the other space is very small.

>  Most people don't need nearly this
>many inodes, but newfs(8) chooses too many instead of too few because running
>out of inodes is more frustrating (I've done it before and I agree).

Also, UFS generally tries to allocate a file in the same CG as its
initial directory and lots of spare inodes help here.

>With the price of drives nowadays, I find complaints about metadata waste 
>particularly annoying.  Still, I suggest that the OP should use the inode
>density parameter to newfs if if insisting that UFS wastes too much space.

It is an issue where you are trying to move data from one FS to another
whilst reusing the same physical space - which I gather the OP was.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20081115/212065d8/attachment.pgp


More information about the freebsd-fs mailing list