Ubuntu Truncating Disk Partitions

Marius Gedminas marius at pov.lt
Sun May 25 12:17:26 UTC 2008


On Sat, May 24, 2008 at 05:59:51PM -0700, Ben2K wrote:
> 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

Partition size and filesystem size don't necessarily have to be the
same.  I suspect that Clonezilla copied your existing filesystems
bit-by-bit from your old disk, and didn't resize them to match newer and
larger partition sizes.

> 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?

I would suggest that you make a backup (just in case), and then resize
the partitions with the resize2fs tool.  According to the manual page,
it can expand the size of a mounted ext3 filesystem, so this should be
sufficient:

  sudo resize2fs /dev/sda8
  sudo resize2fs /dev/sda9
 
Hope that helps,
Marius Gedminas
-- 
I am a computer. I am dumber than any human and smarter than any administrator.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080525/77c02a71/attachment.sig>


More information about the ubuntu-users mailing list