RE: adding an extra hard disk and adding space to /usr



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


_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages