In the last article, we installed and configured a hardware RAID 1 array in our FreeBSD box, and mounted it temporarily at /mnt. Now, it's time to migrate the home directories over to this drive and mount it at /usr/home.
/mnt.w command), and then disconnect
the network connection to ensure no one would log in while I copied the files. I then used a
carefully crafted set of tar commands, so that all of the file permissions and links would be
preserved:
[root@solstice] ~# tar cpf - -C /usr/home . | tar xpf - -C /mnt
ls -al on both
/usr/home as well as /mnt to ensure they are identical. If they are,
you can safely remove the originals:
[root@solstice] ~# cd /usr/home [root@solstice] ~# rm -rf *
/etc/fstab, and then reboot. As long as your drive or array is located at
/dev/twed0s1d, this line is:
/dev/twed0s1d /usr/home ufs rw 1 1Now, simply reboot your system, and when it comes back up, you should notice no change (except for the fact that you and your users have much more space at their disposal).
Stay tuned for the next article - writing a plugin for Nagios so you know if your 3ware RAID array has a fault.