Growfs

Here is a breakdown on how to grow an ffs filesystem.

Let's make a big file which will represent our disk, 32MB in size:

1+0 records in 1+0 records out 33554432 bytes transferred in 0.164 secs (204133427 bytes/sec) svnd0: 33554432 bytes on disk
 * 1) dd if=/dev/zero of=disk bs=32m count=1
 * 1) vnconfig -cv svnd0 disk

/dev/svnd0c is now our disk. Create a partition on it, this time we'll make it too small so that there is space left on the disk:

disklabel: Can't get bios geometry: Device not configured Initial label editor (enter '?' for help at any prompt) > a partition: [a] offset: [0] size: [65536] 32768 FS type: [4.2BSD] > p device: /dev/rsvnd0c type: SCSI disk: vnd device label: fictitious bytes/sector: 512 sectors/track: 100 tracks/cylinder: 1 sectors/cylinder: 100 cylinders: 655 total sectors: 65536 free sectors: 32768 rpm: 3600 16 partitions: a:        32768             0  4.2BSD   2048 16384   16 # Cyl     0 -   327* c:        65536             0  unused      0     0      # Cyl     0 -   655* > q Write new label?: [y] y
 * 1) disklabel -E svnd0
 * 1)             size        offset  fstype [fsize bsize  cpg]

Write the filesystem on it:

Warning: cylinder groups must have a multiple of 8 cylinders Warning: 32 sector(s) in last cylinder unallocated /dev/rsvnd0a:  32768 sectors in 328 cylinders of 1 tracks, 100 sectors 16.0MB in 1 cyl groups (328 c/g, 16.02MB/g, 2048 i/g) super-block backups (for fsck -b #) at: 32,
 * 1) newfs /dev/rsvnd0a

Mount the filesystem and populate it with files:

/mnt: write failed, file system is full ... Filesystem 512-blocks      Used     Avail Capacity  Mounted on /dev/svnd0a      32156     31992     -1440   105%    /mnt ... Filesystem 512-blocks      Used     Avail Capacity iused   ifree  %iused  Mounted on /dev/svnd0a      32156     31740     -1188   104%     134    1912     7%   /mnt
 * 1) mount /dev/svnd0a /mnt
 * 2) cd /mnt
 * 3) cp /bin/*.
 * 4) cp /sbin/*.
 * 1) df.
 * 1) df -i.
 * 1) cd /tmp
 * 2) umount /mnt

''Note the reason the filesystem Capacity changed from 105% to 104% is because the author had deleted some files and represented this with "...". Don't get confused!''

Now we grow the partition:

We strongly recommend you make a backup before growing the Filesystem Did you backup your data (Yes/No) ? Yes new file system size is: 16384 frags growfs: 65536 sectors in 656 cylinders of 1 tracks, 100 sectors 32.0MB in 2 cyl groups (328 c/g, 16.02MB/g, 2048 i/g) superblock backups (for fsck -b #) at: 32832
 * 1) disklabel -e svnd0
 * 2) growfs /dev/rsvnd0a

Mount it and check it:

Filesystem 512-blocks      Used     Avail Capacity  Mounted on /dev/svnd0a      64348     31740     29392    52%    /mnt Filesystem 512-blocks      Used     Avail Capacity iused   ifree  %iused  Mounted on /dev/svnd0a      64348     31740     29392    52%     134    3960     3%   /mnt
 * 1) mount /dev/svnd0a /mnt
 * 2) cd /mnt
 * 3) df.
 * 1) df -i.

Conclusions:

growfs not only increased the data space on the filesystem but also the index (inodes).