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:
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.
If you found something useful today, please consider a small donation.
Got something to add? Send me email.
More Articles by Dirk Hart © 2012-06-29 Dirk Hart
Writing in C or C++ is like running a chain saw with all the safety guards removed. (Bob Gray)