VMware Cloud Community
RaysonW
Contributor
Contributor

Is it possible to revert the enlargement of a disk?

Dear all,

I would like to shrink a disk back to original size after it was enlarged from 160GB to 800GB.

I used the command vmkfstool to perform the change.

Is there a safe way to shrink the disk?

Thanks a lot,

Rayson

0 Kudos
7 Replies
iw123
Commander
Commander

Hi,

Is the VMs OS using the space? has it been partitioned?

The safest way to do this might be to use vmware converter to clone the vm, taking the opportunity to modify the disk layout.

*Please, don't forget the awarding points for "helpful" and/or "correct" answers
0 Kudos
RaysonW
Contributor
Contributor

Hi,

The original disk (of 160GB) has an OS in it already.  There is only 1 partition then.

I have added the enlarged vmdk to a new VM, and from the Windows Disk Manager, the first 160GB is partitioned and the remaining added 640GB are free space.  The content of the disk can be viewed.

So, can the VM converter shrink the disk without affecting the bit layout in the 160GB partition?  I ask because after shrink the disk, I need to use it as a base to restore some snapshots vmdk files.

Thanks a lot,

Rayson

0 Kudos
a_p_
Leadership
Leadership

STOP!

Don't do anything with the VM's disks at this point. Any wrong step could make it worse!

Please attach a complete list of files from the VM's folder (showing all details like name, extension, size, timestamp) as well as the vmware*.log files to see how it currently looks like and what could be done. If you have access to the console (ssh, winscp) please also attach all the header/descriptor vmdk files (the small - a few hundred bytes - vmdk files).

André

0 Kudos
RaysonW
Contributor
Contributor

Hi Andre,

Attached is the log and descriptor files.  All the snapshot descriptor files are removed by previous action.

Also attached is the ls output of the folder.

Thanks a lot for your help,

Rayson

0 Kudos
continuum
Immortal
Immortal

you expanded the vmdk before you created the snapshots if I read the logs right.

then  using Converter should be safe
you could also use ghost or something like that and clone partition from expanded vmdk to a partition in a newly crteated vmdk


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
a_p_
Leadership
Leadership

All the snapshot descriptor files are removed by previous action.

What do you mean by this. I can see the descriptor files in the screen shot!?

To me this looks like your original VM had three snapshots base <- 000001 <- 000002 <- 000003 before you resized the 160GB base disk. Then you added a new snapshot the the grown 800GB disk (000004)!? Correct?

André

0 Kudos
RaysonW
Contributor
Contributor

Hi Andre,

You are correct.

When I tried to expand the virtual disk with vmkfstool command (with the virtual disk removed from VM first), I did not remove / delete any snapshot before the disk expansion.  After disk expanded, I copy the VM files to another folder before starting the VM.  However, I incorrectly delete the snapshots (when VM in offline mode but before starting the VM) 001 - 003 from Snapshot Manager after disk expansion.

The problem actually is that after the snapshot are deleted from Snapshot Manager, the VM was started with the data from snapshot 001 instead of 003.  The snapshot 004 appeared after the VM started, and I do not know why it appeared.

My ultimate goal is to restore the data to the VM for 003.  I am not sure if the expanded disk will affect the restoring of the snapshot.

Thanks for your help,

Rayson

0 Kudos