From owner-freebsd-questions@FreeBSD.ORG Thu Dec 7 21:53:13 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 EB1B216A407 for ; Thu, 7 Dec 2006 21:53:13 +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 95C4143CAE for ; Thu, 7 Dec 2006 21:52:19 +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 kB7LohWG046639; Thu, 7 Dec 2006 16:50:43 -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 kB7LohW5046638; Thu, 7 Dec 2006 16:50:43 -0500 (EST) (envelope-from jerrymc) Date: Thu, 7 Dec 2006 16:50:42 -0500 From: Jerry McAllister To: Peter Clark Message-ID: <20061207215042.GB46531@gizmo.acns.msu.edu> References: <4578893F.8050604@mtmary.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4578893F.8050604@mtmary.edu> User-Agent: Mutt/1.4.2.2i Cc: 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 21:53:14 -0000 > 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. 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"