I recently had to upgrade disk for a server running FreeBSD. The current disk was getting full and I wanted to remove the full disk and replace it with another disk with more capacity. The machine architecture is x86 and the server itself is a cheap workhorse serving as a log-server. At a time in the past, I had decided to have the log stored on a secondary (slave) hard-drive rather on the primary (It was actually a choice foisted on me by circumstances).
Anyhow, my current disk architecture was something like this (after running df -H)
machnie# df -H
/dev/ad0s1d /root (note I omitted size - well you don't need to know that)
defsv
/dev/ad0s1d /tmp
/dev/ad0s1e /usr
/dev/ad0s1f /var
/dev/ad1s1d /logfiles
All I really planned to do was unmount /logfiles (note it is on a slave ATA - ad1) , remove (physical) the device and replace it with a new (higher capacity) ATA drive and remount to the same location - after formatting , of course. so here are the commands:
machine# umount /logfiles
(I use ee to visit) /etc/fstab and commented out the line /dev/ad1s1d /logfiles
I then shutdown the machine. Remove the slave hard drive and replaced it with the new one. I closed the machine and restarted it. (don't forget to remove power, etc).
Once machine started, I used sysinstall to access the formatting tools:
#machine sysinstall.
I formatted the drive (ad1)

I allocated all space to the mount point /logfiles
Anyhow, my current disk architecture was something like this (after running df -H)
machnie# df -H
/dev/ad0s1d /root (note I omitted size - well you don't need to know that)
defsv
/dev/ad0s1d /tmp
/dev/ad0s1e /usr
/dev/ad0s1f /var
/dev/ad1s1d /logfiles
All I really planned to do was unmount /logfiles (note it is on a slave ATA - ad1) , remove (physical) the device and replace it with a new (higher capacity) ATA drive and remount to the same location - after formatting , of course. so here are the commands:
machine# umount /logfiles
(I use ee to visit) /etc/fstab and commented out the line /dev/ad1s1d /logfiles
I then shutdown the machine. Remove the slave hard drive and replaced it with the new one. I closed the machine and restarted it. (don't forget to remove power, etc).
Once machine started, I used sysinstall to access the formatting tools:
#machine sysinstall.
I formatted the drive (ad1)

I allocated all space to the mount point /logfiles

Comments
Post a Comment