VMware Cloud Community
woisch
Contributor
Contributor

shrink vmdk to used size

Hi,

is there a solution to shrink a 200 GB vmdk to its real used size (50 GB) ? The size never will grow up to 200 GB. Thin disk is no option for me.

regards

0 Kudos
7 Replies
AWo
Immortal
Immortal

If that is a thick provisioned disk (as you wrote thin is no option) you can use the VWare Converter to resize the virtual disk. In fact it creates a new guest with different virtual disk sizes.

If that is not the boot disk you may simply add a smaller disk, copy the content over and remove the larger one.


AWo

VCP 3 & 4

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
woisch
Contributor
Contributor

I`ve already tried this. But its a freebsd system and the converter didn`t notice the filesystem of the disk and so i`m not able to rezise the disk with the converter. 😕 I only see the partitions nad the rezise filed is greyed out.

0 Kudos
RParker
Immortal
Immortal

I only see the partitions nad the rezise filed is greyed out.

AWO: > If that is not the boot disk you may simply add a smaller disk, copy the content over and remove the larger one.

0 Kudos
AWo
Immortal
Immortal

AFAIK only one option is left then. You need to copy over the content to a new disk. If that is a boot device you might want to use a tool like Acronis TrueImage or Ghost or something similar (dd in case of Linux/Unix) to keep the guest OS bootable.

After removing the larger disk the new one should take its place (first disk on first controller, for example).


AWo

VCP 3 & 4

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
jamesbowling
VMware Employee
VMware Employee

I would just mount a new drive and then dd the drive: dd if=/dev/OldDrive of=/dev/NewDrive bs=4096 conv=notrunc,noerror






If you found this at all helpful please award points by using the correct or helpful buttons! Thanks!

James B. | Blog: http://www.vSential.com | Twitter: @vSential --- If you found this helpful then please awards helpful or correct points accordingly. Thanks!
0 Kudos
woisch
Contributor
Contributor

@[~997225]

it is a freebsd 6.2 vm. Is your DD command to move/clone the disk to another disk and to another size?

0 Kudos
jamesbowling
VMware Employee
VMware Employee

It is to clone the disk bit for bit. Is it a particular partition you want to copy or the entire used space on a particular drive?


If you found this at all helpful please award points by using the correct or helpful buttons! Thanks!

James B. | Blog: http://www.vSential.com | Twitter: @vSential --- If you found this helpful then please awards helpful or correct points accordingly. Thanks!
0 Kudos