How to mount second hard drive in CentOS 5.x

I was trying to mount second drive in my server which was connected via usb, so I thought to post it here as well

Run
# fsdisk -l
to see the list of drives in server..
second drive will most probably will be sdb
1) Make its partition

# fdisk /dev/sdb
press n
press p
press w

2) format drive with ext3

# msfck -t ext3 /dev/sdb1

3) Now make directory where you want to mount it

# mkdir /disk2

4) mount drive

# mount /dev/sdb1 /disk2

5) Edit fstab so that drive will mount after reboot

put enter

/dev/sdb1 /disk3 ext3 default 0 1

And enjoy 🙂

Please follow and like us:
About shk

shk is a DevOps engineer with more than 12 years of experience in different organizations. He enthusiastic about learning new technologies and shares his knowledge through his blogs.

Comments

  1. Thanks, out of all the stupid places that couldnt give me a good answer of doing this. Yours is the best thank you!

  2. Good help, worked for me to thanks.

Trackbacks

  1. […] 1) Find out mount point of secondary drive.  If drive is not mounted yet then you can get help from article “How to mount drive in CentOS” […]

Comment Policy:

Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.

Tell us what you're thinking...

All comments are moderated.

* Denotes required field.

*

*

Previous Post:
Next Post: