From owner-freebsd-stable@FreeBSD.ORG Thu Nov 9 23:30:23 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED0C216A403 for ; Thu, 9 Nov 2006 23:30:23 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F4C043D45 for ; Thu, 9 Nov 2006 23:30:22 +0000 (GMT) (envelope-from freebsd-stable@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1GiJLP-0002iI-11 for freebsd-stable@freebsd.org; Fri, 10 Nov 2006 00:30:03 +0100 Received: from r5h168.net.upc.cz ([86.49.7.168]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Nov 2006 00:30:02 +0100 Received: from gamato by r5h168.net.upc.cz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Nov 2006 00:30:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: martinko Date: Thu, 09 Nov 2006 23:51:06 +0100 Lines: 55 Message-ID: References: <000001c6ff95$dfcd6df0$0201a8c0@bedroom> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: r5h168.net.upc.cz User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.0.7) Gecko/20061021 SeaMonkey/1.0.5 In-Reply-To: Sender: news Subject: Re: adding an extra hard disk and adding space to /usr X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Nov 2006 23:30:24 -0000 Aaron Burke wrote: >> Hello all, > Hello Matt, > >> I have a machine that just had a new HD added to it as ad1 >> and I want to >> ADD this new disk onto the already existing /usr partition. >> What's the best >> and safest way to do it? > Well, I know of two options. One which sounds really cool, is kind > of broken, and is guarteed to cause your kernel crash. So I will > ignore the mount_union option. > > I am no expert on freebsd, but in my opinion tar is a good choice. > Contrary to what others beleive, tar CAN preserve permissions, and > file ownership. I know that in FreeBSD 4.x (been there several > times) it can preserve filesystem permissions, and ownership of > files. > > In my opinion, the safest way is to copy /usr to /mnt is via the > following. > 1: Comment out your existing SWAP partition (ad0s1b) in /etc/fstab. > 2: reboot > 3: remove your existing swap partition. > 4: create a new filsystem on each disk that has the same size as > your ram (1/2 of swap) on each disk. Both (by tradition) will be > /dev/???s?b. Spanning swap to multiple disks can improve swap > performance. > 5: create a new UFS2 filesystem that contains the rest of the new > hard drive. > 6: mount the new slice as /mnt > 7: use the following tar commands as root: > (FreeBSD 4.x) : cd /usr; tar clpf - . | (cd /mnt; tar xvf -) > (FreeBSD 5.x+) : cd /usr; gtar clpf - . | (cd /mnt; gtar xvf -) > 8: edit /etc/fstab with your favorite text editor (vi) and duplicate > the other /usr slice entries. Then comment out the original. And > update the entry to refer to the correct slice. Next duplicate > the entry for the other swap partition with the data for the > other disk label). SWAP partitions are almost always end in 'b' > 9: Due to the fact that killing off all of the applications that > reside on /usr, its easiest to reboot. But specifically NOT a > requirement. > > > -- Aaron > hi, iirc tar(1) has changed in 5.3. why do you use gtar please? is new tar missing something? cheers, martin