From owner-freebsd-questions@FreeBSD.ORG Mon Jul 7 17:01:15 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADF981065672 for ; Mon, 7 Jul 2008 17:01:15 +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 6D9378FC12 for ; Mon, 7 Jul 2008 17:01:15 +0000 (UTC) (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 m67Gwfm9074942; Mon, 7 Jul 2008 12:58:41 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id m67GwfsO074941; Mon, 7 Jul 2008 12:58:41 -0400 (EDT) (envelope-from jerrymc) Date: Mon, 7 Jul 2008 12:58:41 -0400 From: Jerry McAllister To: Joshua Isom Message-ID: <20080707165841.GC74726@gizmo.acns.msu.edu> References: <266e55c771cbec02a4039641cff631c7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <266e55c771cbec02a4039641cff631c7@gmail.com> User-Agent: Mutt/1.4.2.2i Cc: FreeBSD Questions Subject: Re: Adding a new hard drive, and using geom 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: Mon, 07 Jul 2008 17:01:15 -0000 On Sun, Jul 06, 2008 at 01:13:17AM -0500, Joshua Isom wrote: > I bought a second hard drive for my computer since my /usr partition > was getting full. I don't want to deal with hardware raid since I > don't want to be dependent on a certain hardware vendor or chipset, so > I'm wanting to go with geom. I'd prefer to not have to backup all my > data(I know I should anyway, but it's a 500gb hard drive, and drives > are growing faster than backup solutions). Would it be possible to do > a geom stripe to expand /usr and keep all the data or would I just need > to backup everything, and then put it all back? If I must deal with > backing up and erasing, and considering that the current /usr and the > new drive aren't the same size, how would I go about mirroring other > paritions and striping /usr? Would that still be easily bootable(no > special hacks or workarounds)? > > Any tips or other recommendations would be appreciated. Well, it depends a little on how you have your first drive broken up. I don't put all that much in to /usr, but some people put almost everything there including users' home directories. I put home directories in /home, not /usr/home (and then make /home one of those big(ger) storage spaces where things can grow, but not everyone does that. Anyway, Since you don't really seem to be interested in raid or other such arrangements, (for this I think you make a good choice) my suggestion is that you just fdisk-bsdlabel-newfs it to one large slice and partition. Presuming is is sata and it is only the second drive it would then be /dev/ad1s1a (or da1s1a if it is SCSI or SAS). I would then make a mount point something like /work (or whatever name makes sense for you) and then mount there (and fix up /etc/fstab). Then I would move chunks of /usr and other partitions that are getting full in to it and make symlinks. That gives you a lot of flexibility and you don't have to worry about managing stripes and raid. If something like /var/db or /usr/home grow wildly, you can easily add yet another drive or even a raid and move those there later. Some things to move there, depending on how you are presently set up, might be: /usr/local, /usr/src, /usr/ports, /usr/home /var/log, /var/spool, /var/db/ It is easy to move them and make symlinks. For example: Build the slice using fdisk, the partition using bsdlabel and newfs it taking the defaults. mount /dev/ad0s1a /work cd /usr/local tar cvpf /work/ulocal.tar * cd /work mkdir usr.local cd usr.local tar xvpf ../ulocal.tar Take some time to look it over and make sure it is good. cd /usr mv local oldlocal ln -s /work/usr.local local Make sure it works by cd-ing to /usr/local/... and making sure you get where you want and all is well. rm -rf oldlocal cd /work rm ulocal.tar I prefer this slightly longer procedure because it leaves stuff around in case of error until I get a chance to check it out. But, you could just run the tar piped to a tar with an embedded cd and it would also work just fine. I also like to name the directories I move mnemonically such as the usr.local (or usr.src or var.log, etc) because it keeps things clear. ////jerry > > _______________________________________________ > 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"