LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-20-2006, 08:31 PM   #1
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Rep: Reputation: 15
Question cant detect my second hdd


Greetings:

Im using SLES9,

Actually I have two 68.3 HDD install to my server. When I install the SLES9 it only detects one HDD and install like this:

Device------Mount --- size --type
/dev/sda1---swap --- 1.0G ---Linux swap
/dev/sda2---/-------67.3G- --Linux native

Now how can I detect my second HDD and add the two hdd capacity so that they will now be 136.6Gb...thnx
 
Old 11-20-2006, 09:32 PM   #2
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
as root,
#cat /proc/partitions

is there any thing talk about /dev/sdb?
 
Old 11-20-2006, 11:18 PM   #3
kutty_prasad
Member
 
Registered: Sep 2006
Location: Bangalore,India
Distribution: RHEL,Fedora, CentOS, Slackware 12 & wrestling with LFS
Posts: 86

Rep: Reputation: 16
You can also try with the following command as root.

#fdisk -l

Check if /dev/sdb is list in the output.
 
Old 11-21-2006, 01:04 AM   #4
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Continue

Quote:
Originally Posted by kutty_prasad
You can also try with the following command as root.

#fdisk -l

Check if /dev/sdb is list in the output.
**These are the outputs. Now what should I do....sdb exist but how can I use this hdd or How to save files in this hdd... SLES9

dmx1:~ # fdisk -l

Disk /dev/sda: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 131 1052226 82 Linux swap
/dev/sda2 * 132 8923 70621740 83 Linux

Disk /dev/sdb: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


dmx1:~ # cat /proc/partitions

major minor #blocks name

8 0 71687000 sda
8 1 1052226 sda1
8 2 70621740 sda2
8 16 71687000 sdb
 
Old 11-21-2006, 01:49 AM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
It appears that your second drive has not been partitioned. To partition, open a terminal session and run
Code:
cfdisk /dev/sdb
That will start the cfdisk program, and define whatever partitions you wish. After it's partitioned, you can then mount the new partition(s) manually, or just add the appropriate entries to fstab (in the /etc directory) to perform the mount during boot-up.
 
Old 11-21-2006, 02:13 AM   #6
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Question Continue

Quote:
Originally Posted by J.W.
It appears that your second drive has not been partitioned. To partition, open a terminal session and run
Code:
cfdisk /dev/sdb
That will start the cfdisk program, and define whatever partitions you wish. After it's partitioned, you can then mount the new partition(s) manually, or just add the appropriate entries to fstab (in the /etc directory) to perform the mount during boot-up.

I see my second hdd is not partition. I need advice, do I need it to partition as primary or logical. What I want is to combine the capacity of my two hdd...i think thats raid...how to accomplish this.
 
Old 11-21-2006, 07:08 PM   #7
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Greetings:

I command cfdisk /dev/sdb.....then...primary....then what should I do...Do I need to choose bootable...need help here..NEwb
 
Old 11-21-2006, 07:34 PM   #8
tim1348
Member
 
Registered: Oct 2006
Distribution: Slackware 11
Posts: 46

Rep: Reputation: 15
Do this;

fdisk /dev/sdb
make your primary partition(s)
toggle linux partition (82)
no need to make the drive bootable
write the disk

cd /
mkdir sdb1
cd /etc
pico fstab

add this line;

/dev/sdb1 /sdb1 ext2 defaults 1 1

save it (ctrl x) y

cd /
mkfs -v -c -t ext2 /dev/sdb1

this assumes you are making an ext2 file system. -v is verbose, -c is for bad block checking, -t is the file system. This also assumes you made one partition on /dev/sdb. Adjust accordingly for your setup. Reboot and your drive will be mounted under /sdb1

Last edited by tim1348; 11-21-2006 at 07:42 PM.
 
Old 11-21-2006, 09:19 PM   #9
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Question partitions

Quote:
Originally Posted by tim1348
Do this;

fdisk /dev/sdb
make your primary partition(s)
toggle linux partition (82)
no need to make the drive bootable
write the disk

cd /
mkdir sdb1
cd /etc
pico fstab

IM confused!!

Now this is what happens after cfdisk /dev/sdb

dmx1:~ # fdisk -l

Disk /dev/sda: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 131 1052226 82 Linux swap
/dev/sda2 * 132 8923 70621740 83 Linux

Disk /dev/sdb: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 8924 71681998+ 82 Linux swap


I follow your command:
cd /
mkdir sdb1
cd /etc
pico fstab

bash: pico: command not found


this is my /etc/fstab and whats next.... here where to add the new partitions..is't from beginning,middle or end...thanx

/dev/sda2 / reiserfs acl,user_xattr 1 1
/dev/sda1 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/cdrecorder /media/cdrecorder subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs fs=floppyfss,procuid,nodev,nosuid,sync 0 0
 
Old 11-21-2006, 11:04 PM   #10
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
You have partitioned your drive, but you have partitioned it as swap (type 82) rather than Linux (type 83). Get back into cfdisk, set the filesystem type as 83, save your changes, then decide which filesystem you want to use. Note: seeing how you are already using reiserfs on /dev/sda2, you probably also want to use it on /dev/sdb1
Code:
mkreiserfs /dev/sdb1
If you want to use ext2 or ext3 or something else, then you would want to use the corresponding mkfs ("make filesystem" command). You can read the man pages for more detail. Good luck, you are very close to solving it.
 
Old 11-22-2006, 12:39 AM   #11
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Question mounting hdd

Quote:
Originally Posted by J.W.
You have partitioned your drive, but you have partitioned it as swap (type 82) rather than Linux (type 83). Get back into cfdisk, set the filesystem type as 83, save your changes, then decide which filesystem you want to use. Note: seeing how you are already using reiserfs on /dev/sda2, you probably also want to use it on /dev/sdb1
Code:
mkreiserfs /dev/sdb1/dev/sdb1

Ok, I follow your instructions. I change it to 83 and command mkreiserfs /dev/sdb1.

Now, How to mount this newly partition base on my /etc/fstab.

/dev/sda2 / reiserfs acl,user_xattr 1 1
/dev/sda1 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/cdrecorder /media/cdrecorder subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs fs=floppyfss,procuid,nodev,nosuid,sync 0 0



dmx1:~ # fdisk -l

Disk /dev/sda: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 131 1052226 82 Linux swap
/dev/sda2 * 132 8923 70621740 83 Linux

Disk /dev/sdb: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 8924 71681998+ 83 Linux


**And can anyone provide me best article relating to this. thanks
 
Old 11-22-2006, 01:11 AM   #12
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
You can mount it using the command line. For more info on the mount command
Code:
man mount
As for adding it to your fstab, you need to decide what mountpoint you want /dev/sdb1 to be assigned to. That's a decision you need to make on your own, and others can't make it for you. Basically though, all you need to do is open up fstab using your preferred text editor (such as pico, vim, emacs, and so on) and add another line to it for /dev/sdb1. It probably will look a lot like the line for /dev/sda2, but as I mentioned above you would need to specify the mountpoint you want to assign to /dev/sdb1.

Partitioning in Linux is a very common topic, and there are a lot of online resources that cover it. A quick search using the terms "linux", "partitioning", and "fstab" will return many hits. Good luck with it
 
Old 11-22-2006, 01:49 AM   #13
micro_xii
Member
 
Registered: Sep 2006
Posts: 140

Original Poster
Rep: Reputation: 15
Question how to mount

Quote:
Originally Posted by J.W.
You can mount it using the command line. For more info on the mount command
Code:
man mount
As for adding it to your fstab, you need to decide what mountpoint you want /dev/sdb1 to be assigned to. That's a decision you need to make on your own, and others can't make it for you. Basically though, all you need to do is open up fstab using your preferred text editor (such as pico, vim, emacs, and so on) and add another line to it for /dev/sdb1. It probably will look a lot like the line for /dev/sda2, but as I mentioned above you would need to specify the mountpoint you want to assign to /dev/sdb1.

Partitioning in Linux is a very common topic, and there are a lot of online resources that cover it. A quick search using the terms "linux", "partitioning", and "fstab" will return many hits. Good luck with it

Im really confused!!.. ..Can you give me simple configuration on this and explain it. Pls...I need it as guide..
And lets say for example, I config my fstab incorrectly,..what would happen?? Im using SLES9

Last edited by micro_xii; 11-22-2006 at 01:51 AM.
 
Old 11-22-2006, 05:55 AM   #14
tim1348
Member
 
Registered: Oct 2006
Distribution: Slackware 11
Posts: 46

Rep: Reputation: 15
Im sorry, did I toggle your partition hex 82? Swap? 83 is for linux partitions. I apologize. pico is just an editor. vi or something similar will work. If you make your mount point on say; /sdb1 (or any name you want) and add the line to fstab, you will mount the drive every time you re-boot. So use pico, vi, emacs, (any editor) and open /etc/fstab

cd /etc
vi fstab (or your favorite editor)

(add this line)

/dev/sdb1 /sdb1 (your filesystem) defaults 1 1

save the file

If you made your mount point /sdb1 (named after the drive and partition for easy reference), you will mount the drive whenever you boot up the system. Hope you get this straightened out, gl.
 
Old 11-22-2006, 02:07 PM   #15
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
Quote:
Originally Posted by micro_xii
I config my fstab incorrectly,..what would happen??
If you add a line to your fstab for the new partition and it has some kind of error, then the new partition would not be mounted automatically at boot. You could still mount it manually however, so it's not really a big deal.

As I tried to explain, you need to determine the mountpoint to assign the new partition (sdb1) to. Neither I nor anyone else can just give you an fstab file that you can use, because we don't know your system, and we don't know what mountpoint you want to use with sdb1. Instead, you will need to to a little reading on your own -- searching on terms like "linux partitioning fstab" will bring up all kinds of different guides on how to do this.
 
  


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
Nld Didn't Detect Hdd databox Linux - Hardware 1 06-05-2006 12:36 PM
Can\t Detect external HDD martinj Linux - Hardware 4 05-30-2006 01:47 AM
CentOS can't detect my slave HDD twysm cAos 1 05-05-2005 07:50 PM
Can't Detect SATA HDD (FC3) Nooktsuma Linux - Newbie 3 12-04-2004 05:19 AM
Can't Detect HDD cranky Linux - Hardware 10 10-21-2004 04:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:40 PM.

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