Solved

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

Posted on 2003-12-10
23
439 Views
Last Modified: 2010-04-20
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
0
Comment
Question by:jodao12
  • 10
  • 7
  • 6
23 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9918416
did u format the drive before using it.
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9918421
use fdisk command to format the disk and try to mount the disk(disk partition).
0
 

Author Comment

by:jodao12
ID: 9918427
yup tried the fdisk /dev/sdc1 it still has the same problem even after I delete everything + remove the partition off.
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9918445
post the output of fdisk -l /dev/sdc1
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9918451
also try to make the filesystem before using it.

mke2fs
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9918459
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.
0
 

Author Comment

by:jodao12
ID: 9918470

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
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9918482
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.
0
 

Author Comment

by:jodao12
ID: 9918484
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
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9918486
read this doc also how to create partitions.
http://www.tldp.org/HOWTO/Partition/partition-5.html
0
 

Author Comment

by:jodao12
ID: 9918488
so how would I solve that error ? :)
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:jodao12
ID: 9918491
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 :(
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9918492
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 :)
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9918494
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.
0
 
LVL 24

Accepted Solution

by:
shivsa earned 500 total points
ID: 9918500
hi jodao12 ,

just post the fdisk output only.

i think u have to use for format

fdisk /dev/sdc not /dev/sdc1 ( sdc1 is first partition on sdc disk.)
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9918513
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?
0
 

Author Comment

by:jodao12
ID: 9918515
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 :)
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9918530
I'm sure it will work

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

0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9918542
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 :)

0
 

Author Comment

by:jodao12
ID: 9918548
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 :)
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9918553
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 :)
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9918575
thanks jodao12 for points.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9918594
I will try to patrice on typing and next time I will type more faster ;-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now