LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2003, 04:04 AM   #1
Deathwind
LQ Newbie
 
Registered: May 2003
Distribution: Debian
Posts: 12

Rep: Reputation: 0
Question Hard Drive Size Discrepancy?


I just installed Debian (well, ok, via a knoppix knx-hdinstall) onto this system, after formatting from a previous (rather old) install of Mandrake. I've gotten most everything up and running (and have fallen madly in love with apt-get), but then I issued df just to check things out. It reports:
Quote:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 3582344 1964040 1618304 55% /
This seems incorrect. Fdisk reports:
Quote:
Disk /dev/hda: 8455 MB, 8455200768 bytes
255 heads, 63 sectors/track, 1027 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 973 7815591 83 Linux
/dev/hda2 974 1027 433755 5 Extended
/dev/hda5 974 1027 433723+ 82 Linux swap
The disk is an 8GB hard drive, it was previously formatted the way df is reporting (~3.5GB given to / in an ext2 partition, everything else except a swap partition given to /home in an ext2 partition), but I used fdisk to delete all the previous partitions (and wrote the table to disk) and then created the partitions that fdisk is now reporting (but df isn't). During install I chose to make hda1 reiserfs, if that makes any difference. So, any ideas why df reports the wrong size for hda1 (or if hda1 actually is the wrong size), and how to fix it? I still also have a /mnt/hda6 out of nowhere as well that I can touch (create) files on (my old /home partition was on hda6), that df doesn't report. Any help would be greatly appreciated...I'm stumped.
 
Old 05-30-2003, 04:25 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Are you sure it is reporting the wrong size? df is reporting 1K blocks (3582344) while fdisk is showing you 512 byte blocks (7815591) so 7815591/2 = 3907795.5, so you've lost (3907795.5 - 3582344) 325451.5KB (~317MB) in formatting and filesystem information.

Still seems a bit steep. Also having just checked on of my boxes I don't get the same kind of discrepency.
Code:
root@rincewind:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda6              7245052   3190964   4054088  45% /
From fdisk
Code:
   Device Boot    Start       End    Blocks   Id  System
/dev/hda6           346      1247   7245283+  83  Linux
Well that should win me an award for the most useless post

I'll get my coat...

Jamie...
 
Old 05-30-2003, 04:41 AM   #3
Deathwind
LQ Newbie
 
Registered: May 2003
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: 0
Hmmm...

Well, it helps some, and for a second I thought you were dead on and I was just missing seeing the block size. Just to check, I did df -h (human-readable sizes) and got /dev/hda1 as being 3.5GB with 1.9GB used, when it really should be around 7.xGB with 1.9GB used. As it's an 8GB drive and everything but a small swap partition should be /dev/hda1. So maybe fdisk and df aren't reporting a discrepancy, but rather the same odd phenomenon in two different ways (while ignoring a huge section of disk). So I guess the question would become, where'd the rest of the drive go? Did it somehow stay on the mystical /dev/hda6 ( mounted apparently as /mnt/hda6, has nil in it but is writeable and I can't determine the max size, and it doesn't show up in df)? If so, can I somehow merge /dev/hda6 with /dev/hda1 so I only have /dev/hda1 at the proper size (7.xGB)?

So, I think you might be right on the block size thing, which helps us narrow it down to a possibly more frustrating problem...

Edit: Well, hrmmm, I just looked at your post again and realized that your fdisk and df are reporting much closer than mine....so my fdisk and df actually do seem to be reporting wholly different sizes...
I think this one might beat yours out for most useless post

Thanks.

Last edited by Deathwind; 05-30-2003 at 04:44 AM.
 
Old 05-30-2003, 04:47 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
What does cfdisk report - anything different? All seems rather weird

cheers

Jamie..
 
Old 05-30-2003, 04:59 AM   #5
Deathwind
LQ Newbie
 
Registered: May 2003
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: 0
cfdisk shows:
hda1 flagged to boot, type is primary, fs type is Linux ReiserFS, size (MB) as 8003.20.
It also shows hda5 as my logical linux swap with size (MB) as 444.17.
 
Old 05-30-2003, 08:00 PM   #6
Deathwind
LQ Newbie
 
Registered: May 2003
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: 0
Talking

Woohoo!
Resolved the problem with a little help from IRC.
Turns out I had somehow gotten a 3.5GB ReiserFS filesystem living in an 8GB partition during the install. All I had to do to fix the problem was to grow the fs on /dev/hda1, by issuing the command:
resize_reiserfs /dev/hda1
Didn't even have to umount. And now df reports 7815344 blocks (which is correct).

 
Old 05-12-2004, 07:50 AM   #7
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Quote:
Originally posted by Deathwind
Woohoo!
Resolved the problem with a little help from IRC.
Turns out I had somehow gotten a 3.5GB ReiserFS filesystem living in an 8GB partition during the install. All I had to do to fix the problem was to grow the fs on /dev/hda1, by issuing the command:
resize_reiserfs /dev/hda1
Didn't even have to umount. And now df reports 7815344 blocks (which is correct).

is there a similiar command for ext3 ? i have the same problem but am using ext3. i resized the /usr partition from 2.3 gig to 2.8 gig. now before you say system commander is useless, it also resized / from 155 mb to 256 mb and the swap partition from 243 mb to 512 mb no problem....

i ran cfdisk and it seemed to show the correct values so i got it to [W]rite the values back, it reported that it was able to do so but for some reason could not read those values back

help!

- perry
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
largest hard drive size teuben Linux - Hardware 2 01-27-2004 08:11 AM
Hard drive size? tgardner Linux - Newbie 4 08-28-2003 09:46 PM
BIOS and hard drive size edwardp Linux - Hardware 2 07-25-2003 08:18 PM
Firewire Hard Drive Size? shiny heed Linux - Hardware 0 03-06-2003 09:16 AM
Hard Drive Size Michael Jones Linux - Newbie 4 01-11-2002 06:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:03 AM.

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