The FreeBSD Diary |
![]() |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
|
Growing your filesystem with growfs --- by Will Andrews
19 August 2002
|
|
This article was written by Will Andrews. |
|
The Story
|
|
I needed more disk space on my vinum volume, which I created about 18 months ago using 2 IBM DeskStar 30GXP 30GB ATA100 drives. Originally, I created a RAID 0 (stripe) filesystem on top of these drives using vinum. But now I needed more disk space for various processes that I was running on the machine. So I got a new IBM DeskStar 80GB ATA100 drive.
Just like the FreeBSD diary article on vinum,
I had an
The result was a ~55GB vinum volume. Starting with FreeBSD 4.4, a new command, called growfs(8), was introduced which allows one to grow (but not shrink) a filesystem. It was particularly designed to work with vinum, but also works on normal filesystems. |
|
The problem and the solution
|
|
Not being exactly sure how to format the new disk, I visited the FreeBSD
documentation link suggested by the Diary's vinum page and read the
details on how to create a "dangerously dedicated" (the original drives
on the plex were sliced by sysinstall) disk. Once that was done, all I
had to do was change
Then I rebooted the system to single user mode, and did this: # vinum resetconfig Type 'NO FUTURE' as is necessary. This will destroy the previous configuration on the vinum volume. # vinum create -f /etc/vinum.conf [..some vinum output..] # growfs /dev/vinum/firepipe Growfs(8) will ask whether the filesystem is backed up. NOTE: Backing up the filesystem is HIGHLY recommended. I did this *BEFORE* touching the new drive or the RAID filesystem. Growfs(8) will then proceed to extend the filesystem and it will give an output similar to newfs(8), in that it prints the locations of the superblocks. Note, however, that these are *new* superblocks on the filesystem, as they are being placed on the *new* drive. Once this process finishes, the system should be able to mount the filesystem with the additional disk space. |