-   Linux - General (
-   -   change disk size after dd (

honk307 08-14-2007 08:46 AM

change disk size after dd
i recently copied the content of a 4gb solid state ide disk to a regular (2.5'') disk that is 40gb large.
i used the dd command. it worked nearly perfect, except that the system does not recognize the new disk size. i used fdisk to enlarge the last partition. fdisk shows me that the last partition used all available space.
but 'df' still shows the 4gb!? i tried fsck in hope it would find the inconsistency, but it didn't.

what do i have to do, that the system ('df' in the first place) also gets aware of the new disk size?

thanks for the help.

AlucardZero 08-14-2007 09:08 AM

Not use dd to do the copy. Try 'cp' (from a live CD, ie, not while the source drive is mounted).

muha 08-14-2007 10:16 AM

maybe parted could fix this? Try gparted or qtparted which can be found (probably in your packagemanger) but also in the livecd:

Matir 08-14-2007 12:00 PM

You need to enlarge the filesystem. At present, you only have a 4GB filesystem, so there is no inconsistency for fsck to find.

homey 08-14-2007 10:17 PM

Just in case the OP doesn't understand.... The partition has been enlarged ok but, the filesystem inside that partition hasn't been enlarged yet.
I do run the fsck before enlarging the file system.
For example:

e2fsck -f /dev/hdb2
resize2fs -f /dev/hdb2

honk307 08-16-2007 04:50 AM

Thanks for your answers.
It worked. The resize2fs did it.

All times are GMT -5. The time now is 11:34 PM.