Date: Sun, 5 Nov 2006 01:29:09 -0800 From: "Aaron Burke" <aburke@nullplusone.net> To: "Matt Smith" <ratman6@charter.net>, <FreeBSD-stable@freebsd.org> Subject: RE: adding an extra hard disk and adding space to /usr Message-ID: <PGENKKAMCLFNBHPINBGAOEHKDAAA.aburke@nullplusone.net> In-Reply-To: <000001c6ff95$dfcd6df0$0201a8c0@bedroom>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?PGENKKAMCLFNBHPINBGAOEHKDAAA.aburke>