Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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
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.
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).
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.