Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Nov 2006 23:51:06 +0100
From:      martinko <>
Subject:   Re: adding an extra hard disk and adding space to /usr
Message-ID:  <ej0bcq$80n$>
In-Reply-To: <>
References:  <000001c6ff95$dfcd6df0$0201a8c0@bedroom> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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


iirc tar(1) has changed in 5.3.  why do you use gtar please? is new tar
missing something?



Want to link to this message? Use this URL: <$80n$1>