Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fdisk reports 80gb, df shows only 16gb?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
JonnyFunFun
n00b
n00b


Joined: 12 Nov 2007
Posts: 2
Location: Olean, NY

PostPosted: Mon Dec 22, 2008 6:30 pm    Post subject: fdisk reports 80gb, df shows only 16gb? Reply with quote

Hello everybody! I have a little server that was kicking around collecting dust for a while now running Gentoo with a software RAID mirror (it's a Promise PDC20276 MBFastTrak133). The mirror is done with two 80gb drives, so the entire disk is 80gb. I have the drive showing up in /dev/mapper just fine and there is only one partition on it (mounted as /). Fdisk shows the partition just fine as using up all 80gb, however when I run df, it only shows that the partition is 16gb. Is this just simply a bug with df, or does the system really think that partition is only 16gb? Any help would be appreciated as this is my first time really dealing with dmraid with Gentoo.

Code:
valhalla jenzinna # fdisk -l /dev/mapper/pdc_gbehfaii

Disk /dev/mapper/pdc_gbehfaii: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x40e92dcf

                   Device Boot      Start         End      Blocks   Id  System
/dev/mapper/pdc_gbehfaii1               1        9726    78124063+  83  Linux
valhalla jenzinna # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/pdc_gbehfaii1
                       16G  7.0G  8.0G  47% /
udev                   10M  168K  9.9M   2% /dev
/dev/hda2              34G  1.9G   31G   6% /opt
shm                   506M     0  506M   0% /dev/shm
valhalla jenzinna # uname -a
Linux valhalla 2.6.26-gentoo-r3 #1 SMP Tue Nov 25 21:58:02 EST 2008 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux
Back to top
View user's profile Send private message
mgrela
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2008
Posts: 123
Location: Polska

PostPosted: Mon Dec 22, 2008 7:26 pm    Post subject: Reply with quote

The filesystem size in its superblock may be inconsistent with the underlaying block device length. You need to check the block count of the filesystem like so (assuming you have ext2/3):

Code:

4pll00555 ~ # dumpe2fs /dev/sda1 | grep "Block count"
dumpe2fs 1.41.3 (12-Oct-2008)
Block count:              96356


If the fs is smaller than 80 GB (it probably will be) you can grow it using resize2fs.
_________________
Maciej Grela
You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message
JonnyFunFun
n00b
n00b


Joined: 12 Nov 2007
Posts: 2
Location: Olean, NY

PostPosted: Tue Dec 23, 2008 2:13 am    Post subject: Reply with quote

I did not expect that to be as easy. Thank you for the help - I simply ran "resize2fs /dev/mapper/pdc_gbehfaii1" and all is well. I wonder why when I originally created the file system it only created the partition 16gb in size, instead of the 80gb I wanted - but it's a moot point now.
Back to top
View user's profile Send private message
mgrela
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2008
Posts: 123
Location: Polska

PostPosted: Wed Dec 24, 2008 10:07 pm    Post subject: Reply with quote

JonnyFunFun wrote:
I did not expect that to be as easy. Thank you for the help - I simply ran "resize2fs /dev/mapper/pdc_gbehfaii1" and all is well. I wonder why when I originally created the file system it only created the partition 16gb in size, instead of the 80gb I wanted - but it's a moot point now.


That's great ! If only all linux problems were this easy 8) . If you consider your problem solved please add the keyword [closed] to this topic to make it easier to filter. You can do this by editing the subject of your first post in this topic. Thank you.

Best regards,
_________________
Maciej Grela
You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum