Add A New Hardrive Linux

Add A New Hardrive Linux (Redhat family)

You just purchased your new hard drive and now you are ready to add it to your Linux system. Here are the steps:

1.  Plug in the hard drive

2.  Make sure that the bios can see it (Attention vmware users, the bios may not display the new drive)

3.  Navigate to the /dev folder and locate your hard drive

4. IDE drive are hda(X ), scsi drive are sda(X) with X being a number

5. Create the partition using parted or fdisk.

6. Then Format the partition using mkfs

               mkfs -t ext3 /dev/sdb2

7. Then Mount the file System

                For  Example: mount -t ext3 /dev/sdb2 /ycsoftware.

8. Add an entry into fstab if necessary

9. Done.


Reference

http://www.gnu.org/software/parted/manual/html_chapter/parted_2.html

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/index.html

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-filesystem-ext3-create.html

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/ch-disk-storage.html

Ethernet Interface templates – Centos, fedora, redhat

Create an interface manually

Just copy the following lines into a file called ifcfg-eth1 and drop it in the “/etc/sysconfig/network-scripts” folder.

then do a “service network restart”

DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
BROADCAST=10.1.255.255      <-- replace with own
HWADDR=00:00:00:00:00:00   <-- replace with own MAC Address with your MAC Address
IPADDR=10.1.0.123                       <-- replace with own
NETWORK=10.1.0.1                   <-- replace with own gateway
NETMASK=255.255.0.0              <-- replace with own network mask
TYPE=Ethernet
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
BROADCAST=10.1.255.255     
HWADDR=00:00:00:00:00:00  
IPADDR=10.1.0.123                      
GATEWAY=10.1.0.1                  
NETMASK=255.255.0.0             
TYPE=Ethernet

The naming convention is crucial please pay attention to that.