Partitions Truncated to 9.9GB in Hardy

Asked by klausner

I recently swapped out my laptop harddrive for a larger 160GB model. I first created the partitions I wanted, significantly expanding /home and /usr/local. Then I copied everything with Clonezilla. After some boot difficulties, I got everything running.

The problem is that the /home and /usr/local partitions (/dev/sda8 and /dev/sda9) are sized at 40GB and 45GB. respectively. Both are ext3. This info is correctly reported by fdisk, gparted, and even Nautilus. But when I do a df, or try to use the space, df reports that both partitions have been truncated to 9.9GB!

         /dev/sda8 10365264 8994932 843804 92% /home
         /dev/sda9 10365264 9082556 756180 93% /usr/local

BTW, I'm running kernel 2.6.24-16-generic and Ubuntu 8.04, Hardy.

How do I fix this, and get access to the missing space?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
uM56POrHU6A
Solved:
Last query:
Last reply:
Revision history for this message
Best uM56POrHU6A (k5iry-deactivatedaccount-deactivatedaccount) said :
#1

That sounds like the partitions are correctly sized, but the file system is not using the entire partition.

I am a bit puzzled because you say that Nautilus also reports the correct size.
You might want to have a look at the output of the following command
$ sudo dumpe2fs -h /dev/sda8 | grep Block
The "Block count" multiplied by the "Block size" is the size of the file system in bytes.

If the sizes indeed do not match then you should try the following:
There is a program called "resize2fs". You should try to run it like this
$ sudo resize2fs /dev/sda8
That should grow the file system to fill the entire partition.
I had no problems with this tool, but as always when working with the file system or partitions you should have a good backup of your (important) data.

- Janek Walkenhorst

Revision history for this message
klausner (klausner) said :
#2

Thanks. Someone else had suggested resize2fs to me elsewhere, and that did, indeed, solve the problem.

I appreciate your assistance.

Revision history for this message
klausner (klausner) said :
#3

Thanks Janek Walkenhorst, that solved my question.