Link to home
Start Free TrialLog in
Avatar of jodao12
jodao12

asked on

Wrong Hard drive size after ading an addition Hard Drive on RH9

Hello,

I've recently added a 3rd hard drive to my RH9 system - everything looked ok - I was able to see my hard drive as /dev/sdc1 and able to mount it as /home2 BUT I get the following:

Filesystem Size Used Avail Use% Mounted on
/dev/sdc1   31M 20K  29M   1% /home2

Disk: /dev/sdc1: 32MB, 32868864 bytes
255 heads, 63 sectors/track, 3 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

My problem is its a 73+GB SCSI HD and its only reporting back as 32MB size useable.

Any Ideas?
Thanks in advance
Avatar of shivsa
shivsa
Flag of United States of America image

did u format the drive before using it.
use fdisk command to format the disk and try to mount the disk(disk partition).
Avatar of jodao12
jodao12

ASKER

yup tried the fdisk /dev/sdc1 it still has the same problem even after I delete everything + remove the partition off.
post the output of fdisk -l /dev/sdc1
also try to make the filesystem before using it.

mke2fs
u can not use disk without making the file system it has to have some kind of filesystem before it come to the linux system.

#mke2fs /dev/sdc1

and the mount it and see the size.
Avatar of jodao12

ASKER


Disk /dev/sdc1: 32 MB, 32868864 bytes
255 heads, 63 sectors/track, 3 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc1 doesn't contain a valid partition table

But if I goto the "parted" program and chose "print"

I got

Disk geometry for /dev/sdc1: 0.000-31.346 megabytes
Disk label type: loop
Minor    Start       End     Filesystem  Flags
1          0.000     31.346  ext3


Thanks
Yes i got it.
This error
Disk /dev/sdc1 doesn't contain a valid partition table ->>> means

The system contains a new hard disk not yet partitioned. The partition sectors of those disks are usually blank (filled only with logical zeros) and thus, not valid for fdisk. This "error" solves by itself during the first partitioning, when every fdisk writes the right signature at the end of this sector.
Avatar of jodao12

ASKER

I got:

mke2fs 1.32 (09-Nov-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
8032 inodes, 32098 blocks
1604 blocks (5.00%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
        8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


after running #mke2fs /dev/sdc1

I also remounted but again the drive seems to think it has only 32MBs
read this doc also how to create partitions.
http://www.tldp.org/HOWTO/Partition/partition-5.html
Avatar of jodao12

ASKER

so how would I solve that error ? :)
Avatar of jodao12

ASKER

ha I just went over that faq by someone else that pointed it to me - I have gone over + over it and still I keep getting this error :(
yes as shivsa have you format your drive?

before format you drive have you create the partition of your SCSI harddisk?

normally to add a harddisk into your linux 1st use fdisk to create the partition, after partition created, use mke2fs/mkfs to format your harddisk.

1. fdisk /dev/sda to create the partition

2. mke2fs /dev/sda1 to format your SCSI harddisk

3. mount /dev/sda1 /home2 to mount the partition, after mount use df -h to see the actual size of the partition.

if everything work fine, add the below into /etc/fstab, so that the partition will auto mount every time you boot up your linux box.

/dev/sda1               /home2                   ext3    defaults        1 2

hope this info can help :)
my bad,
1. u have to first create partition table.
2. check with fdisk -l /dev/sdc1 if u got all the tables in place.
if it works u can see the full disk space here it itself.
3. and then make file system.

and then u can mount and use all the space.
ASKER CERTIFIED SOLUTION
Avatar of shivsa
shivsa
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oh I need typing skill, my typing too slow.

anyway, what's the result if you use fdisk /dev/sdc

use 'p' to print out the partition status and post it here

also use 'd' to delete the partition and try to create a new one using 'n' after created use 'w' to write into the partiton table and save.

now mk2efs, what's the result?
Avatar of jodao12

ASKER

aha I think I got it - I kept trying to format repartition the /sdc1 which seems to have been the problem doing a print of the /sdc outputs:


/dev/sdc1             1         4     32098+  de  Dell Utility
/dev/sdc2   *         5       265   2096482+   6  FAT16
/dev/sdc3           266     17816 140978407+   7  HPFS/NTFS

I'll try to reformat the /sdc and not /sdc1 and report back - thanks :)
I'm sure it will work

but remember 1st delete the partition before you create the new one.

oh what you need to do is

fdisk /dev/sdc

The number of cylinders for this disk is set to 2434.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): d
Partition number (1-3): 1

this will delete the 1st partition, repeat the delete untill all the partition deleted than

Command (m for help): n            <-- to create new partition

Command (m for help): w           <---- to write and save

hope this can help :)

Avatar of jodao12

ASKER

I've chosen shivsa to receive all points as he pointed out "fdisk /dev/sdc not /dev/sdc1 ( sdc1 is first partition on sdc disk.) " which solved my problem :)
Well I'm only typing to slow, and I'm the 1st one to say create partition before format, anyway is your own decision

as long as you solve your problem, that's ok :)
thanks jodao12 for points.
I will try to patrice on typing and next time I will type more faster ;-)