From owner-freebsd-questions@FreeBSD.ORG Thu Dec 7 22:56:29 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 224A116A407 for ; Thu, 7 Dec 2006 22:56:29 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (www.unsane.co.uk [85.233.185.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 780E143CAA for ; Thu, 7 Dec 2006 22:55:34 +0000 (GMT) (envelope-from jhary@unsane.co.uk) Received: from [10.0.0.10] (intgate.unsane.co.uk [10.0.0.10] (may be forged)) (authenticated bits=0) by unsane.co.uk (8.13.7/8.13.3) with ESMTP id kB7MuZdS003984; Thu, 7 Dec 2006 22:56:42 GMT (envelope-from jhary@unsane.co.uk) Message-ID: <45789C29.8000707@unsane.co.uk> Date: Thu, 07 Dec 2006 22:56:41 +0000 From: Vince User-Agent: Thunderbird 1.5.0.8 (X11/20061123) MIME-Version: 1.0 To: Jerry McAllister References: <4578893F.8050604@mtmary.edu> <20061207215042.GB46531@gizmo.acns.msu.edu> In-Reply-To: <20061207215042.GB46531@gizmo.acns.msu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Peter Clark , freebsd-questions@freebsd.org Subject: Re: Extending a slice X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2006 22:56:29 -0000 Jerry McAllister wrote: >> Hello, >> >> I have and existing FreeBSD 5.4 box with 2 6GB hard drives in a RAID 1 >> mirror using gmirror. Due to physical space restrictions I cannot put >> more drives into this box and yet I need more physical drive space. I >> have 2 blank 40GB drives to replace my 2 current 6GB drives. I broke the >> mirror and inserted one 40GB drive into the mirror and removed the >> remaining 6GB drive. So, now I have a 40GB drive with only 6GB's of >> space on it and 34GB's of unused space. I have and existing mount point >> in the 6GB of space called /data. I would like to extend the slice and >> add the 34GB of unused space to the current /data mount point. Does >> someone even "extend" an UFS slice? Or do I create a new slice in the >> unused section and somehow merge the existing slice's /data with the new >> one? Or am I missing something rudimentary? Any direction would be >> appreciated. >> > > If the space was already in a slice and you just wanted to expand > a partition in to the unused space, then you could use growfs(8), but > I don't think that will work to expand a slice. > > To be fair the growfs man page does say " If you wish to grow a file system beyond the boundary of the slice it resides in, you must re-size the slice using fdisk(8) before running growfs." I've never tried this but since this is one of a mirrored pair and you still have the other mirrow you're in a good position to try it ;) There is a rather old (example is on 4.4) but i think still valid, example here http://ezine.daemonnews.org/200111/growfs.html (that said I've never tried it and it could easily hose your system. try at your own risk) Vince > Really, the easiest thing is to use dump(8) to back up the existing 6 GB. > It will be necessary to do a dump for each file system (partition) you > have in the slice other than swap or /tmp. > > Then build the 40 GB disk as needed. You can best do this from > a fixit CD. You will need to make a slice with fdisk, then > divide that slice into partitions with bsdlabel. Then for each > partition except for swap, use newfs to build a file system in them. > When that is done, make temporary mount points, mount the partitions > and restore the dumps. This sounds long and drawn out telling it, > but it is actually quite easy and works well. > > If it is your boot disk, then the fdisk should write the MBR and > the bsdlabel needs to write the boot sector for the slice. > There is a good example of fdisk and bsddlabel use for creating > a brand new bootable disk with one FreeBSD slice in the bsdlabel > man page near the bottom. Also, in the last few days I have > posted several replies to questions that would cover this process > and included extensive examples. The only difference is that > they weren't for mirrored disks. But, it sounds like you got > rid of the mirror anyway. > > The dump/rebuild/restore is the way to go > even if you do it to a new mirror of the 40GB drives. > Or you could write the dumps to one of the rather than tape > and restore from that. > > ////jerry > > > >> Thank You. >> Peter Clark >> >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >