Adding a Hard Drive To Fedora
I am providing the following as is. This is what I did to add in another
disk drive on a Linux 7.3 release it might prove useful to you also.
-------------------------- cut here -----------------------------
Explanation:
This computer has two ide controllers. The first controller has
two drives. These two devices show up as:
LABEL=/ / ext3 defaults 1 1
and
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
in the /etc/fstab.
The second controller has a single disk drive attached and
this drive shows up as:
/dev/hdc1 /new_dir ext3 defaults 1 2
in the /etc/fstab.
What is interesting to note here is this:
1. the drive on controller 1 is indentified
LABEL=/ and not the device name. This
label can be used instead of the device name.
2. The other hard drive on controller two is defined
as /dev/hdc1. No label was used in the filesystem
generation command so the device name must be
used.
Linux defines hard drive devices as /dev/hd? where ? is the
letter assigned to the disk on the controller. So if we had
two disks on controllers 1 and 2 our disks would be labeled
as:
/dev/hda
/dev/hdb
/dev/hdc
/dev/hdd
These devices that breakdown further into slices/partitions
the devices, for example
/dev/hda1 /
/dev/hda2 /usr
/dev/hdb1 /filesystem1
/dev/hdc1 /filesystem2
would define two partions/slices on /dev/hda (/ and /usr),
on partition/slice on /dev/hdb, and one partition slice on
/dev/hdc. /dev/hdb1 and /dev/hdc1 define the entire disk as
being one filesystem.
This is important to know because when it comes to adding a new
disk you will need to provide fdisk and mke2fs the device name
for partioning and building a files system. For example
you might be adding a second disk on the second controller
(/dev/hdc1). The command to build a partion would be to use
the fdisk utility (fdisk /dev/hdc) and then partion the drive
as needed. Follow partioning with making a filesystem(s) on
the drive. For example:
mke2fs -c -j /dev/hdc1
this will build a an "ext3" filesystem on
partion/slice 1. In this case the entire disk will
be one file system.
When this is done you need to create a mount point and mount the "device" to
that mount point.
Like: mkdir /new_dir (for example)
and add the following to your /etc/fstab:
/dev/hdc1 /new_dir ext3 defaults 1 2
then as root user: mount /new_dir
Done!!!!
You will probably have to make changes to the above to satisfiy your
system's configuration. But the information will
hold true.
Maybe too much, but better more than not enough. Hope this helps. Ron
|