Hi All
I want to Connect New IDE hard Drie in My Existing Linux Server Red Hat 5.0.
& Further i want to mount /usr on new hard drive how ican achieve this...
(2) you will need to create partitions on the hard drive.
You will need to know what the drive is connectecd as
Primary Master = hda
Primary Slave = hdb
Secondary Master = hdc
Secondary Slave = hdd
fdisk /dev/hd?
create as many partitions that you need.
example:
n (new)
p (primary)
ENTER (start first cylinder at begining)
ENTER (use the whole disk as 1 partition)
w (write the partition table)
(3) You need to put a filesystem on the hard drive.
Since this is RedHat 5.0 then it most likely is ext2. Unless another filesystem was put on . Type "mount" and look to see if /usr is on ext2. You can use a different type of filesystem if you like, but it will be best for you to use what the others are.
type mkfs.ext2 /dev/hd?X (X is the partition number. If you make one partition then it will be 1.
Example: 1 partition on i drive on the secondary channel.
mkfs.ext2 /dev/hdc1
(4) Mount the drive. Once the format is finished formating you need to mount the drive. Create a temp mount space.
"mkdir /mnt/hdc"
mount /dev/hdc1 /mnt/hdc
(5) Copy the data from /usr to /mnt/hdc
cd /usr
tar -cvf - . | tar -C /mnt/hdc/ -xvf -
(This will copy /usr to /mnt/hdc preserving the integrity of the information. Type extactly as shown above with the dashes spaces and periods and the pipe symbol. Pipe is SHIFT \ .
Type diff /usr /mnt/hdc/ to see if there are any differences in the directories.)
(6) Edit the fstab to now use the new usr partition. I do not know how familiar you are with vi so use pico. Copy the fstab to a backup file.
cp /etc/fstab /etc/fstab.bk
pico /etc/fstab
You will need to either change the mount point of /usr (if it exists) or create one for /usr.
enter:
/dev/hdc1 /usr ext2 defaults 1 1
(7) Test the new mount point. Reboot the server and login. Once logged in type mount.
See if /dev/hdc1 is on /usr with type ext2.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.