{"id":1183,"date":"2008-03-28T23:42:16","date_gmt":"2008-03-28T23:42:16","guid":{"rendered":"http:\/\/www.icocean.com\/blog\/?p=1183"},"modified":"1970-01-01T07:00:00","modified_gmt":"1970-01-01T07:00:00","slug":"growingyourfilesystemwithgrowfs","status":"publish","type":"post","link":"https:\/\/www.icocean.com\/blog\/?p=1183","title":{"rendered":"Growing your filesystem with growfs"},"content":{"rendered":"<p>&#8212; by Will Andrews 19 August 2002 <\/p>\n<p>The Story<\/p>\n<p>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.<\/p>\n<p>Just like the FreeBSD diary article on vinum, I had an \/etc\/vinum.conf. Its contents were:<!--more--><\/p>\n<p><coolcode>drive drive1 device \/dev\/ad4s1e<br \/>drive drive2 device \/dev\/ad6s1e<br \/> volume firepipe<br \/>  plex org concat<br \/>    sd length 29314m drive drive1<br \/>    sd length 29314m drive drive2<\/coolcode><\/p>\n<p>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.<\/p>\n<p>The problem and the solution<\/p>\n<p>Not being exactly sure how to format the new disk, I visited the FreeBSD documentation link suggested by the Diary&#39;s vinum page and read the details on how to create a &#8220;dangerously dedicated&#8221; (the original drives on the plex were sliced by sysinstall) disk. Once that was done, all I had to do was change \/etc\/vinum.conf to this:<\/p>\n<p><coolcode>    drive drive1 device \/dev\/ad4s1e<br \/>    drive drive2 device \/dev\/ad6s1e<br \/>    drive drive3 device \/dev\/ad0e<br \/>     volume firepipe<br \/>      plex org concat<br \/>        sd length 29314m drive drive1<br \/>        sd length 29314m drive drive2<br \/>        sd length 78355m drive drive3<\/coolcode><\/p>\n<p>Then I rebooted the system to single user mode, and did this:<\/p>\n<p><coolcode>    # vinum resetconfig<br \/>    Type &#039;NO FUTURE&#039; as is necessary.  This will destroy the previous<br \/>    configuration on the vinum volume.<\/p>\n<p>    # vinum create -f \/etc\/vinum.conf<br \/>    &#91;..some vinum output..&#93;<\/p>\n<p>    # growfs \/dev\/vinum\/firepipe<\/coolcode><\/p>\n<p>Growfs(8) will ask whether the filesystem is backed up.<\/p>\n<p>NOTE: Backing up the filesystem is HIGHLY recommended. I did this *BEFORE* touching the new drive or the RAID filesystem.<\/p>\n<p>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. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212; by Will Andrews 19 August 2002 The Story I need <a href='https:\/\/www.icocean.com\/blog\/?p=1183' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[601,1312,233,691,692],"class_list":["post-1183","post","type-post","status-publish","format-standard","hentry","category-linuxunix","tag-freebsd","tag-growfs","tag-233","tag-691","tag-692","category-16-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1183"}],"version-history":[{"count":0,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1183\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}