[plug] HOWTO Add New HardDrive

Brian Tombleson brian at paradigmit.com.au
Fri May 18 07:06:41 WST 2001


Just thought I'd let y'all know what worked.

To add a new hard drive to your system and move one of your existing
root-level directories to the new partition, these are the steps involved :

Assume: You want t move your /usr directory to the new partition.

1. Power down your machine and install the hardware taking note as to which
IDE chanel it is on (we'll asume Primary Slave -> /dev/hdb).
2. Boot the machine again
3. As root, fdisk to create the partition(s) - here one partition as hdb1
4. Format the partition: (man mkfs is your friend!)
      mkfs [-V] [-c] /dev/hdb1
5. Create a temporary mount point:
      mkdir /hdb
6. Mount it to test and move data: (man mount is your friend!)
      mount -t ext2 /dev/hdb1 /hdb
7. Copy your current /usr directory to the partition: (man cp is your
friend!)
      cp -R -d [-v] /usr/* /hdb
8. Rename the old /usr directory to 'move it out of the way'
      mv /usr /usr.old
9. Create a new empty /usr directory
      mkdir /usr
10. Edit the /etc/fstab file to moun the new partition as /usr on boot.  You
will have a line like:
      /dev/hdb1               /usr                    ext2    defaults
1 2
11. Reboot the machine to ensure eveything will work
12. Remove the old directory (/usr.old) when you're happy that things are
working.
     (CAUTION WHEN USING 'rm -fr' - check your typing before you hit
<enter>)
      rm -fr  /usr.old

I was forced to do this as my poor old 1.2Gb drive was reporting 100%
ulitization :(

HTH someone sometime.

- Brian.




More information about the plug mailing list