(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Adding a Linux Hard Drive by Dirk Hart


Email: dhart@mailstarusa.com

I was asked to configure a second IDE hard drive for a RedHat 7 Linux system.

I was at a loss as to how to describe this new drive to Linux and after half an hour I realized that the drive had been autodetected at the time of the last boot. A little research showed how IDE drives are named:



  • Primary Controller First Drive: /dev/hda
  • Primary Controller Second Drive: /dev/hdb
  • Secondary Controller First Drive: /dev/hdc
  • Secondary Controller Second Drive: /dev/hdd

Then fdisk was used to partition the drive: fdisk /dev/hdc. I seleted the old partitions and added a single linux partition, making sure the partition type was 83 (Linux).

When that was done I used mkfs to make a filesystem. Since there was just one partition it was named /dev/hdc1: mkfs /dev/hdc1.

I made a mount point: mkdir /usr0 and mounted the new filesystem: mount /dev/hdc1 /usr0. The filesystem can be unmounted using umount /usr0.

Lastly, I made an entry in /etc/fstab describing the new filesystem so it would be mounted automatically mounted at boot time. This was tested using mount all and observing that the new filesystem was indeed mounted.

Publish your articles, comments, book reviews or opinions here!

Copyright February 2001 Dirk Hart. All rights reserved





More Articles by Dirk Hart




Click here to add your comments


You rock Dirk Hart!

---September 7, 2004




Fri Feb 25 00:49:46 2005: Subject: Works Perfectly   TommyTom


Worked perfectly! Thanx!

(1 complete *nix n00b down, a couple million to go....)



Mon Sep 12 01:08:18 2005: Subject: Just what I was looking for... thanks   Phil


for newbies like me, the fstab I added looked like this:
/dev/hdc1 /data ext2 defaults 1 1

/data is the mount directory I created. This is where I want the hd to be mounted. The filesystem type was ext2, not ext3 like my other hds which caused me a little headache until I learned to use mount -l to list the filesystem types. You can use mount -l after mounting manually the new hd to the /data directory to see which type you should list in your fstab file. Hope this helps

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



/DirkHart/adddrive.html copyright February 2001 Dirk Hart All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!



 I sell and support
 Kerio Mail server






More:
       - Linux
       - Unix
       - Basics
       - Disks/Filesystems
       - Installation/Upgrades
       - DirkHart


Unix/Linux Consultants

Skills Tests

Guest Post Here