From owner-freebsd-questions@FreeBSD.ORG Thu Dec 7 23:23:12 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 3AB6616A417 for ; Thu, 7 Dec 2006 23:23:12 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF9C943CA3 for ; Thu, 7 Dec 2006 23:22:16 +0000 (GMT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id kB7NKeqw047026; Thu, 7 Dec 2006 18:20:40 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id kB7NKe2v047025; Thu, 7 Dec 2006 18:20:40 -0500 (EST) (envelope-from jerrymc) Date: Thu, 7 Dec 2006 18:20:40 -0500 From: Jerry McAllister To: Vince Message-ID: <20061207232040.GA46878@gizmo.acns.msu.edu> References: <4578893F.8050604@mtmary.edu> <20061207215042.GB46531@gizmo.acns.msu.edu> <45789C29.8000707@unsane.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45789C29.8000707@unsane.co.uk> User-Agent: Mutt/1.4.2.2i 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 23:23:12 -0000 On Thu, Dec 07, 2006 at 10:56:41PM +0000, Vince wrote: > 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." Yes. But using fdisk will nuke it I believe. Then it is easier to just use bsdlabel and make the partitions and newfs to make the file systems and load stuff back in from either dumps - or that other copy, if it is usable. ////jerry > 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" > > > > _______________________________________________ > 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"