Save space on UFS volumes

Jan 19, '05 08:57:00AM

Contributed by: Anonymous

When installing a new boot drive, I decided to follow some of the other stories and install a separate swap partition using an UFS system. But after I had everything up and running, I discovered that I had sized the swap volume too small for a net capacity of 1 GB.

Obviously faced with the necessity to repartition and restore everything, I remembered from university 20 years ago that Unix file systems use one disk sector (512 bytes) for every 13 inodes or so, eating lots of disk space. A quick man newfs revealed a default of a 2048 bytes block size per inode. So I ran this command:

newfs -i 4096 yourswapdevicehere
This saved half of the wasted space, freeing up the space I wanted.

Notes: [robg adds: I haven't tested this one, as I no longer use a separate swap partition...]

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050115191519732