LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Hard Drive Woes (https://www.linuxquestions.org/questions/linux-hardware-18/hard-drive-woes-44950/)

jwchanman 02-11-2003 11:33 AM

Hard Drive Woes
 
I just bought a new Ultra DMA 100 Seagate 120 GB Hard Drive for my computer and tried to install it on my linux box. After I setup everything, the hard drive capacity is only 1/6 of the total (df -hs /share shows only 17GB). I don't know what I'm doing wrong.

Here is a little backgound on the issue: I have a asus psb-s motherboard with a scsci hard drive drive, cdrom and harddrive which are connected to my ide channels two and one respectively. My cdrom is setup as a slave and my new harddrive is setup as the master. When I got into the bios and tried to auto-detect the new harddrive, my bios stalls. If i continue with the boot-up (scsci drive is set up in bios to boot first) i get to linux. Within linux, it detects my new harddrive. After I setup the harddrive within linux using fdisk and mkfs (ext2) and mount the new hard drive to /share I use df -hs /share and find out that the detected capacity of my 120GB harddrive is only 17GB.

Does the ext2 file system have a maximum size for partitions that i'm not aware of? Did I setup my cdrom and harddrive wrong (slave vs master settings)?

Very Confused,
Jesse

finidi 02-11-2003 12:30 PM

Could you see if the kernel is recognizing the IDE drive well at bootup ? look at the file /var/log/dmesg. There will be some lines regarding your new drive. Apparently it does, but look for the model / geometry / sizes stated there.
If the kernel sees it well, then you could issue from the root console an "fdisk /dev/hdx" command, where the last x must be substituted by the actual letter (a=first channel ide, master b=first channel ide, slave) and so on. Then you modify the partition table for the drive, define one or more partitions, its sizes, its types, ....
After creating a new partition layout then must create filesystems on every partition, mount partitions and get the free space with "df" ...

jwchanman 02-11-2003 01:08 PM

Thank you much for your reply. I did check dmesg and the kernel did correctly identifiy the make and model of my hard drive. I just wanted one partition on the new harddrive so through fdisk i used the following options

fdisk /dev/hda

n (new)
p (primary)
1 (one partition)
used defaults for start and end cylinder
(used the maximum fdisk detected) I would check all the settings for you and give output, but i'm currently at work.
w (write partition table)


after i set up the partitions i issued the
mkfs -t ext2 /dev/hda1

then

mkdir /share
mount /dev/hda1 /share

df -hs then reported the 17GB partition

did i do something wrong?

Thanks

jwchanman 02-11-2003 11:36 PM

When i got home and checked dmesg again it gave me the following information about my hard drive:

hda: ST3120023A, ATA DISK drive
hdd: COMPAQ SC-140S, ATAPI CD/DVD-ROM drive
ide2: ports already in use, skipping probe
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=232581/16/63, UDMA(33)

Here is tells me that it is in fact 120 GB. When i ran fdisk on /dev/hda here is what it reports:

Disk /dev/hda: 16 heads, 63 sectors, 35973 cylinders
Units = cylinders of 1008 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 35973 18130360+ 83 Linux

When i went into fdisk again (fdisk /dev/hda) to change the number of cylinders, heads, and sectors it would let me set everything right but the cylinders. The maximum amount it would give me for cylinders was:

Expert command (m for help): c
Number of cylinders (1-131071, default 35973): 131071

After i set the cylinders and made the filesystem on the new partition and mounted it reported the size to be
62GB. How might I increase it to the 120 GB that my hard drive supports?

Thanks in advance,
Jesse

Electro 02-12-2003 12:41 AM

I can only find P2B motherboard models. There isn't any PSB models.

Did you look at
http://www.asus.com.tw/support/faq/q...Language=en-us

You may need to do a BIOS upgrade.

If possible set your drive to LBA.

Also have a look at
http://www.asus.com.tw/support/faq/faq.aspx
and type in p2b under "Search KB for"

You may want to download the new version of fdisk for DOS. I don't know if UNIX/LINUX has a new version of fdisk that supports very high capacity hard drives.

finidi 02-12-2003 03:43 AM

One question, what's the size of your SCSI (boot) disk ??

jwchanman 02-12-2003 04:21 AM

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.4
<Adaptec aic7890/91 Ultra2 SCSI adapter>
aic7890/91: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs

Vendor: IBM Model: DDRS-39130D Rev: DC1B
Type: Direct-Access ANSI SCSI revision: 02
(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
scsi0:A:0:0: Tagged Queuing enabled. Depth 253
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 17850000 512-byte hdwr sectors (9139 MB)
sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 >

It's 9 GB and set as the bootable hardrive.

jwchanman 02-12-2003 04:23 AM

Here is the partition table for my scsi drive:
Disk /dev/sda: 255 heads, 63 sectors, 1111 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3 24066 83 Linux
/dev/sda2 4 1111 8900010 5 Extended
/dev/sda5 4 491 3919828+ 83 Linux
/dev/sda6 492 979 3919828+ 83 Linux
/dev/sda7 980 1012 265041 83 Linux
/dev/sda8 1013 1045 265041 83 Linux
/dev/sda9 1046 1078 265041 82 Linux swap

finidi 02-12-2003 06:30 AM

1) The ide driver reports correctly the size, but giving a CHS with a number of cylinders too big (> 65535 !)
2) fdisk reports less number of cylinders. Fdisk accesses the partition table, structure shared with other systems (some of which uses BIOS to access the drive).

The solution seems to be your BIOS must recognize the thing, set LBA mode and the fake CHS parameters, in order to fdisk can do well its job.

I was curious on the SCSI for if the ide driver was catching its geometry, but seems not the case.

This is a preliminary response -- I'm not sitted in front of my penguin. :(

finidi 02-12-2003 11:03 AM

... Now I am :)

If you're running a modern distro with a recent kernel (2.4), no problem to address your 120 GB HD, but you MUST set LBA mode at the BIOS (this implies a BIOS upgrade), then fdisk will report the "fake" geometry and big partitions could be defined with linux's fdisk. The actual limit is 137 GB, except for the last 2.5.x kernels (development) which has ATA6 in.

Flashing the BIOS is a delicate operation, be careful.

When LBA mode is set, CHS at kernel bootup will show something like 7297/255/63 (my 60 Gb drive) --- ever heads and sectors at the maximum --> xxxx/255/63

HTH,

jwchanman 02-12-2003 11:17 AM

I have redhat 6.2 with a 2.4.16 kernel. I'll look on asus's site for the bios upgrade you were talking about. Once I get this done, probably in a couple of days, i'll get back to you.

Thank you much for your recent help.

Cheers,
Jesse

finidi 02-12-2003 12:28 PM

Right, I'll be here. Good luck at flashing the BIOS... I did it 3 times to my previous mobo (AOpen) without a problem.

Cheers,
George


All times are GMT -5. The time now is 06:35 PM.