| CPC G06F 3/065 (2013.01) [G06F 3/0604 (2013.01); G06F 3/0632 (2013.01); G06F 3/0647 (2013.01); G06F 3/0664 (2013.01); G06F 3/0665 (2013.01); G06F 3/067 (2013.01); G06F 3/0683 (2013.01)] | 20 Claims |

|
1. A method of migrating or cloning a virtual disk stored in a first storage device of a host computer system having a hypervisor running therein, wherein the hypervisor employs a file system to organize data stored in the first storage device as files in units of blocks, and the virtual disk is one of the files containing blocks, said method comprising:
upon creation of the virtual disk, writing zeroes into all blocks of the virtual disk;
in response to receiving a command to migrate or clone the virtual disk, accessing a data structure that tracks for each block of the virtual disk to which zero was written upon creation of the virtual disk, whether or not the block has been written to successfully since the writing of zero thereinto upon creation of the virtual disk;
for each of a plurality of unique sets of blocks, determining using the data structure whether or not any of the blocks in the unique set has been written to successfully since the writing of zero thereinto upon creation of the virtual disk;
for each unique set determined to have at least one block that has been written to successfully since the writing of zero thereinto upon creation of the virtual disk, issuing a first copy command to make a copy of all blocks in the unique set in a second storage device; and
issuing a second copy command to make a copy of the data structure in the second storage device.
|