Newly Partitioned Drive is Smaller than the entire drive

Newly Partitioned Drive is Smaller than the entire drive

Post by Matth » Wed, 12 Mar 2003 04:44:31



Hi all,

I've recently moved a ~20 GB hard drive from my windows machine to my
linux as a second hard drive. The problem I'm seeing is when I mount
the drive the size is greatly smaller than 20 GB and I can't figure
out why.

First off, I'm running Slackware 8.0
This new drive is an IBM Deskstar 20BG

Here's what I see:
BIOS reports these attributes of the drive
Cylinders 43800
Sectors 63
Heads 16

I plug in the drive and linux sees the drive as /dev/hdd
I run 'cfdisk /dev/hdd' and set the drive up as a single partition

                            Disk Drive: /dev/hdd
                            Size: 22605004800 bytes
              Heads: 16   Sectors per Track: 63   Cylinders: 43800

    Name        Flags      Part Type  FS Type          [Label]      
Size (MB)
 ------------------------------------------------------------------------------
    hdd1                    Primary   Linux ext2                      
22605.01

After writing the partition info to the disk I mount the drive and run
'df -h':
/dev/hdd1             137M  1.0k  129M   1% /backup

137M??? That's not right!

I try 'fdisk /dev/hdd':
The number of cylinders for this disk is set to 43800.
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): p

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

   Device Boot    Start       End    Blocks   Id  System
/dev/hdd1             1     43800  22075168+  83  Linux native

Everything seems to say this is a 20GB drive and the partition was
setup in accordance to BIOS's output. But why does Linux report it as
only 137M?

Thank you!

--Matt

 
 
 

Newly Partitioned Drive is Smaller than the entire drive

Post by John Winte » Wed, 12 Mar 2003 05:02:19




>Hi all,

>I've recently moved a ~20 GB hard drive from my windows machine to my
>linux as a second hard drive. The problem I'm seeing is when I mount
>the drive the size is greatly smaller than 20 GB and I can't figure
>out why.

[snip]
>                            Disk Drive: /dev/hdd
>                            Size: 22605004800 bytes
>              Heads: 16   Sectors per Track: 63   Cylinders: 43800

>    Name        Flags      Part Type  FS Type          [Label]      
>Size (MB)
> ------------------------------------------------------------------------------
>    hdd1                    Primary   Linux ext2                      
>22605.01

>After writing the partition info to the disk I mount the drive and run
>'df -h':
>/dev/hdd1             137M  1.0k  129M   1% /backup

>137M??? That's not right!

Try formatting the partition before you mount it.  Presumably there's
some filing structure left there from the disk's previous life which
is why you're managing to mount it without formatting first.

    mke2fs /dev/hdd1

Then try mounting it and see what you get.

HTH
John
--
The Linux Emporium - the source for Linux in the UK
See http://www.linuxemporium.co.uk/

We had a woodhenge here once but it rotted.

 
 
 

Newly Partitioned Drive is Smaller than the entire drive

Post by Matth » Sun, 16 Mar 2003 04:19:33





> >Hi all,

> >I've recently moved a ~20 GB hard drive from my windows machine to my
> >linux as a second hard drive. The problem I'm seeing is when I mount
> >the drive the size is greatly smaller than 20 GB and I can't figure
> >out why.

>  [snip]
> >                            Disk Drive: /dev/hdd
> >                            Size: 22605004800 bytes
> >              Heads: 16   Sectors per Track: 63   Cylinders: 43800

> >    Name        Flags      Part Type  FS Type          [Label]      
> >Size (MB)
> > ------------------------------------------------------------------------------
> >    hdd1                    Primary   Linux ext2                      
> >22605.01

> >After writing the partition info to the disk I mount the drive and run
> >'df -h':
> >/dev/hdd1             137M  1.0k  129M   1% /backup

> >137M??? That's not right!

> Try formatting the partition before you mount it.  Presumably there's
> some filing structure left there from the disk's previous life which
> is why you're managing to mount it without formatting first.

>     mke2fs /dev/hdd1

> Then try mounting it and see what you get.

> HTH
> John

I learned a new command today. It now reports the correct size. Thank you!

--Matt

 
 
 

1. How copy/backup entire drive to another drive?

Do you know the easiest way to copy the entire linux drive to another drive in
a way that preserves system integrity: permissions, directory trees, etc?

I need a complete copy of my linux system so I can wipe out the partition and
start over because of partition damage.  In windows I know I can do something
like, "xcopy c:\*.* d:\backups /s" to accomplish this.  No idea how to do it
in Linux.

I've tried using dump but I'm getting the commands wrong. Instead of copying
the files I get that menu of operators/instructions.  I've also downloaded
every linux backup program found on linuxberg but they want to back up to tape
drives or make a mirror copy to a blank drive or have weird
instructions/requirements that I do not meet.

I've also tried cpio but it has a zillion command operators and I have no idea
which one(s) to use to do a complete drive backup (and yes I already bought
and read a Linux book [Que's "Using Linux"] but it seems outdated and very
limited as far as backing up is concerned).

Can you help?

Thanks!

Andre'

2. Adaptec 7880 experience ?

3. Problem:Compile glibc2 with Linux 2.0.33

4. FIPS / partitioning big drive / am I Ok?

5. WinAmp for Xwindows

6. RH 5.0 install freaks out drive partition table...now can't fdisk the drive!

7. Samba, porblem with codepage.850

8. Large SCSI hard drive and partitions (4GB drive)

9. Disk Druid , mount hard drive, partitioning hard drive

10. I/O Error copying files to newly installed drive

11. Linux drive appears smaller than it is in Windows 95 client..?

12. V1.2 and newly installed WD 1.28Gb drive