LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mounting second Harddisk in Centos 5 (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-second-harddisk-in-centos-5-a-724358/)

global888 05-07-2009 05:02 AM

Mounting second Harddisk in Centos 5
 
Hi..

I'm new in linux, I want to put second harddisk in my computer.
Can anyone help me with step by step instruction...I'm using Cemtos 5.

Thank you.........

linuxlover.chaitanya 05-07-2009 05:08 AM

There is nothing much difficult to do that. Just connect the hard drive. On the terminal type
sudo fdisk -l. That will give you partition table for your system.
Your second hard drive should come up as sdb. You can then use fdisk to create logical partitions in there like sdb1, sdb2 etc.

sudo fdisk /dev/sdb will help you create the logical partitions.

sycamorex 05-07-2009 05:12 AM

Once you've connected the second disk, you need to issue the following command (as root):
Quote:

fdisk -l
You'll see which one is the new one (eg. /dev/sdb1, /dev/hdb2, etc) and then permanently mount it in /etc/fstab.
The entry that you need to put in that file depends on which filesystem the new drive contains (eg. ext3, vfat, etc.)

global888 05-11-2009 11:23 PM

Quote:

Originally Posted by sycamorex (Post 3533136)
Once you've connected the second disk, you need to issue the following command (as root):

You'll see which one is the new one (eg. /dev/sdb1, /dev/hdb2, etc) and then permanently mount it in /etc/fstab.
The entry that you need to put in that file depends on which filesystem the new drive contains (eg. ext3, vfat, etc.)

hi.. how to mount it the sdb1 and how to check it?
thank's a lot

chrism01 05-12-2009 01:13 AM

1. Plug disk in
2. reboot
3. login as root in xterm
4. run 'fdisk -l'
5. if 2nd disk (probably /sdb or /hdb) show as type Linux / 83, then you can make dir on the 1st disk for it to attach to eg 'mkdir /extra'
6. edit /etc/fstab, add an extra entry something like
Code:

/dev/sdb    /extra    ext3    defaults        0 0
7. use cmd 'mount -a' and look for any errors.
If any errors occur, post the output of

fdisk -l

post contents of fstab
post error msg from 'mount -a'

billymayday 05-12-2009 01:20 AM

Is this a new, unformatted HDD?

if so, you will need to partition and format it. If so, you can do this from the command line using fdisk and mkfs, or you may find it easier to download the gparted live CD from www.distrowatch.com and use that.

chrisduk 07-07-2009 06:26 AM

Hi

I am also wanting to format a HDD, when i run:

Quote:

fdisk -l
i get:


Quote:

Disk /dev/hda: 42.9 GB, 42949017600 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 3263 26105625 8e Linux LVM

Disk /dev/hdd: 16.1 GB, 16105807872 bytes
16 heads, 63 sectors/track, 31207 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Disk /dev/hdd doesn't contain a valid partition table
this is a Virtual hard disk of 15GB how do i format it and have it working as /home2


All times are GMT -5. The time now is 02:11 AM.