LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2009, 05:02 AM   #1
global888
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
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.........
 
Old 05-07-2009, 05:08 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 05-07-2009, 05:12 AM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,646
Blog Entries: 1

Rep: Reputation: 1072Reputation: 1072Reputation: 1072Reputation: 1072Reputation: 1072Reputation: 1072Reputation: 1072Reputation: 1072
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.)
 
Old 05-11-2009, 11:23 PM   #4
global888
LQ Newbie
 
Registered: May 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sycamorex View Post
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
 
Old 05-12-2009, 01:13 AM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,455

Rep: Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116Reputation: 2116
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'
 
Old 05-12-2009, 01:20 AM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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.
 
Old 07-07-2009, 06:26 AM   #7
chrisduk
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Install CentOS 5 live CD to Harddisk boy_to_man Linux - General 4 04-18-2010 02:17 PM
Adding a new RAID HardDisk in a already running CentOS 4.0 romeo_tango Linux - Hardware 5 12-07-2006 04:08 AM
Mounting my second harddisk? amer_58 Linux - Newbie 10 08-20-2005 08:26 AM
Mounting new harddisk Bodycount Linux - Newbie 1 10-26-2003 07:32 AM
mounting ext3 harddisk Goatdemon Linux - General 4 08-16-2003 01:57 AM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration