LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-25-2006, 09:44 AM   #1
Wheat_Thins
Member
 
Registered: Nov 2005
Location: Michigan
Distribution: Primary: Ubuntu 8.10
Posts: 94

Rep: Reputation: 15
Getting FC4 to Recognize My Second Hard Drive?


Hello again,

I have added another hard drive to my system. I first started out with a WD 80 gig and now have added a WD 250 Gig to the system for a storage drive.

I can tell that the system does indeed see that the hardrive is there by the listing in the /dev/disk/by-id directory because they are both listed there:

Quote:
ata-WDC_WD2500JB-00GVC0_WD-WCAL77106179
ata-WDC_WD2500JB-00GVC0_WD-WCAL77106179-part1
ata-WDC_WD800JB-00JJC0_WD-WCAM9D584895
ata-WDC_WD800JB-00JJC0_WD-WCAM9D584895-part1
ata-WDC_WD800JB-00JJC0_WD-WCAM9D584895-part2
Here is my current Fstab file:

Quote:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,utf8,managed 0 0
/dev/hda /media/cdrom auto pamconsole,exec,noauto,managed 0 0
I am very new to linux so used the auto partioning options during the install, I have so many Hard Drive listings in my /dev folder that I don't know which one to use. Why do I have so many?

Here is my snippet of my hard drive listings in my /dev folder:

Quote:
lrwxrwxrwx 1 root root 3 Feb 24 11:08 floppy -> fd0
crw-rw-rw- 1 root root 1, 7 Feb 24 11:07 full
srwx------ 1 ericr root 0 Feb 24 16:08 gpmctl
brw------- 1 ericr disk 3, 0 Feb 24 11:07 hda
brw-r----- 1 root disk 3, 64 Feb 24 11:07 hdb
brw-r----- 1 root disk 3, 65 Feb 24 11:07 hdb1
brw-r----- 1 root disk 3, 66 Feb 24 11:07 hdb2
brw-r----- 1 root disk 22, 0 Feb 24 11:07 hdc
brw-r----- 1 root disk 22, 1 Feb 24 11:07 hdc1
crw------- 1 root root 10, 228 Feb 24 11:07 hpet
prw------- 1 root root 0 Feb 24 16:08 initctl
drwxr-xr-x 2 root root 120 Feb 25 09:48 input
crw------- 1 root root 1, 11 Feb 24 11:07 kmsg
srw-rw-rw- 1 root root 0 Feb 24 16:08 log
Can anybody walk me through this?

Thank you in Advance!
 
Old 02-25-2006, 10:08 AM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Have you partitioned the drive?
What type of filesystem did you choose?
Did you format it to the needed filesystem?
Have you created a mount point for it?

If this the second drive and has been partition to a single partition, type of filesystem on it, formated the drive, and created a mount point, then it should be /dev/hdb1 for the partition and mount to directory /storage.

fstab would look like this.
/dev/hdb1 /storage ext3 defaults 1 2

Brian1
 
Old 02-25-2006, 10:22 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,672

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
For IDE drives:
/dev/hda - 1st IDE controller master
/dev/hdb - 1st IDE controller slave
/dev/hdc - 2nd IDE controller master
/dev/hdd - 2nd IDE controller slave
etc...

From the data you posted.
/dev/hda is your CDROM drive

/dev/hdb is your 80GB drive and where the OS was installed. It contains 2 partitions. One is the /boot partition where the kernel is located and other files necessary to boot. The 2nd is an LVM partition where / and swap are located.

/dev/hdc is the 250GB drive and contains one partition.

Typically non OS drives and removable media are mounted in /media but it doesn't matter. Create a directory to use as a mount point and add an entry in /etc/fstab.

Last edited by michaelk; 02-25-2006 at 10:24 AM.
 
Old 02-25-2006, 10:57 AM   #4
Wheat_Thins
Member
 
Registered: Nov 2005
Location: Michigan
Distribution: Primary: Ubuntu 8.10
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by michaelk
For IDE drives:
/dev/hda - 1st IDE controller master
/dev/hdb - 1st IDE controller slave
/dev/hdc - 2nd IDE controller master
/dev/hdd - 2nd IDE controller slave
etc...

From the data you posted.
/dev/hda is your CDROM drive

/dev/hdb is your 80GB drive and where the OS was installed. It contains 2 partitions. One is the /boot partition where the kernel is located and other files necessary to boot. The 2nd is an LVM partition where / and swap are located.

/dev/hdc is the 250GB drive and contains one partition.

Typically non OS drives and removable media are mounted in /media but it doesn't matter. Create a directory to use as a mount point and add an entry in /etc/fstab.
Ok,

Well I created a folder in the media called "storage". I then added this line to my fstab:

Quote:
/dev/hdc /media/storage ext3 defaults 1 2
When I try a "mount -a" in order to mount my fstab file I receive the following message:

Quote:
mount: wrong fs type, bad option, bad superblock on /dev/hdc,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
So I thought O.K. maybe it is hdc1 instead of hdc so I modified the fstab accordingly and it does indeed mount, but there is already data in hdc1 and I have not used the hardrive yet. The mounted data looks very familiar to the boot partition? It also only has 98.7 MB, just like my /boot:

Quote:
[root@LinuxBed etc]# cd /media/storage
[root@LinuxBed storage]# ls -all
total 42
drwxr-xr-x 13 root root 1024 Jan 22 04:52 .
drwxr-xr-x 5 root root 4096 Feb 25 11:32 ..
drwxr-xr-x 2 root root 1024 May 23 2005 bin
drwxr-xr-x 2 root root 1024 May 23 2005 etc
drwxr-xr-x 2 root root 1024 May 23 2005 games
drwxr-xr-x 2 root root 1024 May 23 2005 include
drwxr-xr-x 2 root root 1024 May 23 2005 lib
drwxr-xr-x 2 root root 1024 May 23 2005 lib64
drwxr-xr-x 2 root root 1024 May 23 2005 libexec
drwx------ 2 root root 12288 Jan 21 23:50 lost+found
drwxr-xr-x 2 root root 1024 May 23 2005 sbin
drwxr-xr-x 4 root root 1024 Jan 22 04:52 share
drwxr-xr-x 2 root root 1024 May 23 2005 src
I must have partitioned this PC completely wrong or something, which I would not doubt with it being my first try at linux.

Anybody see what I might be messing up?

Thanks again!
 
Old 02-25-2006, 11:15 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,672

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Hmm interesting....
Is this a new drive? How did you partition and format it?
It does not look like /boot to me. /boot should not have etc, games, sbin or bin directories.

However, post the output of the command
fdisk -l (that is a small L) (You must be root to use the fdisk command)
 
Old 02-25-2006, 01:23 PM   #6
Wheat_Thins
Member
 
Registered: Nov 2005
Location: Michigan
Distribution: Primary: Ubuntu 8.10
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by michaelk
Hmm interesting....
Is this a new drive? How did you partition and format it?
It does not look like /boot to me. /boot should not have etc, games, sbin or bin directories.

However, post the output of the command
fdisk -l (that is a small L) (You must be root to use the fdisk command)
Here is the output of a fdisk -l command:

Quote:
[root@LinuxBed ericr]# /sbin/fdisk -l

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 9729 78043770 8e Linux LVM

Disk /dev/hdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 30401 244196001 83 Linux
Well that is really interesting.......... when mounted hdc1 only says that I have 98.7 MB of room on the partition and it is filled with the listing that I posted above, leaving me only with 88 MB of room even though it is a 250 GB drive. What had me even more stumped is why this drive even has data on it, it is BRAND new and was just put into the PC.

Thanks for the continual help, you guys are great and are making the Linux transition MUCH easier.
 
Old 02-25-2006, 05:38 PM   #7
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
When using ext3 format you will lose about 5%. So out of a 250gb drive formatted as one partition as ext3 you will end up with about 235gb of storage. Same principle as if vfat but vfat does not eatup that much. This is what I would do. Run the following commands as root of coarse.
fdisk /dev/hdc
hit d and delete any and all partitions
hit n to create a new partition
hit t to select partition type and select the correct partition 1. Choose 83 as the type.
hit w to write and exit
/sbin/mkfs -t ext3 /dev/hdc1
mount like you want.
 
Old 02-25-2006, 05:56 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,672

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
The 5% is reserved space for root and not really related to filesystem overhead i.e space required for formating. BTW the amount of reserved space can be modified using the tune2fs command.
 
Old 02-26-2006, 09:40 AM   #9
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Thanks for the info there michaelk. Didn't know I could gain back space since all that I needed it for was for backups and storage. I will check out tune2fs.

Brian1
 
Old 02-26-2006, 09:50 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,672

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Reserved space allows root to login in case the filesystem becomes full to perform maintenance tasks and it is also supposed to reduce fragmentation. For backups and storage you can reduce it to 1%.
 
Old 03-04-2006, 09:42 AM   #11
Wheat_Thins
Member
 
Registered: Nov 2005
Location: Michigan
Distribution: Primary: Ubuntu 8.10
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Brian1
When using ext3 format you will lose about 5%. So out of a 250gb drive formatted as one partition as ext3 you will end up with about 235gb of storage. Same principle as if vfat but vfat does not eatup that much. This is what I would do. Run the following commands as root of coarse.
fdisk /dev/hdc
hit d and delete any and all partitions
hit n to create a new partition
hit t to select partition type and select the correct partition 1. Choose 83 as the type.
hit w to write and exit
/sbin/mkfs -t ext3 /dev/hdc1
mount like you want.
This ended up making my machine unbootable, it appears that it made it HDC1 the drive that it would like to boot off of. But this is O.K. because I wanted to start fresh with a completely different storage setup. I now have my /boot and / on my small 80 gig which will serve as the drive that holds programs and OS material, then SWAP and /home will be on the 250 Gig. This will get the swap file onto a different IDE channel and a different hardrive to remove thrashing, not that it should happen anytime soon with 2 gigs of RAM.

How can I recover from something like this in the future?

I was also curious, when using SQUID during the initial setup is it only possible to mount space to the options available? (/, /boot, /home, /opt, ETC.) Is there not a way to assign it to something custom such as /storage? For now I just assigned the larger drive to /home because that is where I will be storing many of the large network logs anyways.
 
  


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
redhat linux 9 can't recognize my sata hard drive aboereau Linux - Hardware 1 02-17-2006 04:12 PM
OpenSuse does not recognize my hard drive Jeffmrg SUSE / openSUSE 2 09-11-2005 06:14 AM
Not able to recognize my hard drive damnbiker Linux - General 3 08-31-2005 01:39 PM
FC3 doesn't recognize hard drive hdb lorenwatts Linux - Hardware 2 04-21-2005 11:37 PM
suse does not recognize hard drive lionlion Linux - Newbie 6 12-24-2004 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:27 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
Open Source Consulting | Domain Registration