Koozali.org: home of the SME Server

Add a second Hard drive

Fernando

Add a second Hard drive
« on: June 03, 2001, 10:32:54 PM »
In this moment I run e-smith 4.1.2 in a scci hdd of 5 Gb, I need to add a hdd IDE of 30 Gb for home partitions, but How do u this???
Thanks

Fernando

chris

Re: Add a second Hard drive
« Reply #1 on: June 24, 2001, 01:33:36 AM »
make a backup of your /home directory

typos when running fdisk and mkfs can delete whole filesystems. *be very careful*

turn off the computer, install the drive, turn on the computer and make sure that the new drive comes up in the bios

boot e-smith as usual and log in as root

run "fdisk /dev/hdx" and hit "p " to see any existing partitions (change x to whatever your hard disk is -- check dmesg to find out what x should be)

use "d" to delete any existing partitions, then "n" to add a linux partition (type 83) and "w" to write the partition table and exit

run "mkfs.ext2 /dev/hdx1" to make a filesystem on the the new partition (change x to...)

run "mount /dev/hdx1 /mnt/cdrom" to mount the new disk and copy over your existing home directory with "cp -ra /home/ /mnt/cdrom/" (change x to...)

run "umount /mnt/cdrom"

run "pico /etc/fstab" and add a line like this

     /dev/hdx1  /home   ext2    defaults       1 2

(change x to...)

run "mount -a" and then "df" to see what partitions you have and how much space is available.

the original copy of your files is still on your original disk. you should "umount /home" and then delete the original files as soon as you are happy with the new disk (ie, wait a few days to make sure that everything is working ok)