Detecting and Preventing Virtual Disk Storage Linkage Faults
Abstract
In an exemplary embodiment, a virtual disk file can be assigned an identifier and a virtual disk files that is dependent on the virtual disk file can include a copy of the identifier. In the instance that the virtual disk file is opened and data is modified that causes the contents of a virtual disk extent to change the identifier can be changed. If the virtual disk file and the dependent virtual disk file are used to instantiate a virtual disk the difference between identifiers can be detected, which is indicative of the fact that the virtual disk may be corrupted. Other techniques are described in the detailed description, claims, and figures that form a part of this document.
Claims
exact text as granted — not AI-modifiedWhat is claimed:
1 . A system comprising:
circuitry configured to send a request, from a guest operating system (OS) executing on a virtual machine (VM), to open a virtual disk file, wherein the virtual disk file includes a first unique identifier identifying the virtual disk file and virtual disk extent data that forms at least a part of the data in a virtual disk; circuitry configured to detect a change from the first unique identifier to a second unique identifier based at least in part on detecting an attempt to write information to the virtual disk file that affects how virtual disk extent data is interpreted; circuitry configured to determine that the second unique identifier was written to a persistent copy of the virtual disk file; and circuitry configured to modify data in the virtual disk file.
2 . The system of claim 1 , further comprising:
circuitry configured to detect the change from the first unique identifier to the second unique identifier is based at least in part on the attempt to write to a bit pattern of a virtual disk extent.
3 . The system of claim 1 , further comprising:
circuitry configured to deny a second request, from the guest OS executing on the VM, to instantiate the virtual disk based at least in part on a determination that the second unique identifier obtained from the virtual disk file is not equal to a unique identifier stored in a parent virtual disk file of the virtual disk file.
4 . The system of claim 1 , further comprising:
circuitry configured to send instructions, from the guest OS executing on the VM, to change the second unique identifier to the first unique identifier based at least in part on user input.
5 . The system of claim 1 , further comprising:
circuitry configured to send instructions, from the guest OS executing on the VM, to:
associate a number with information identifying virtual disk extents in a group that are described by a child virtual disk file;
update a copy of the number in the child virtual disk file to a second number based at least in part on a determination that data in the virtual disk file was modified; and
update the number associated with the information to the second number based at least in part on a determination that the information accurately reflects a state of the virtual disk extents in the group.
6 . The system of claim 1 , further comprising:
circuitry configured to send an input/output job, from the guest OS executing on the VM, to access sector bitmaps for a group of virtual disk extents written to a section of the virtual disk file, the section of the virtual disk file having a virtual disk file offset selected such that the section is aligned with sectors of a storage device configured to store the virtual disk file.
7 . A system, comprising:
a processor; and a memory, the memory in electronic communication with the processor, the memory including instructions that upon execution by the processor cause the processor to: send a request, from a guest OS executing on a virtual machine, to instantiate a virtual disk, the virtual disk including a group of virtual disk extents described by a first virtual disk file, the first virtual disk file including a unique identifier identifying the first virtual disk file; load information identifying virtual disk extents in the group that are described by the first virtual disk file into random access memory, the information associated with a copy of the first identifier; change the first identifier in to a second identifier after opening the first virtual disk file; and change the copy of the first identifier associated with the information to the second identifier based at least in part on a determination that the information accurately reflects a state of the virtual disk extents in the group.
8 . The system of claim 7 , further comprising instructions that upon execution by the processor cause the processor to:
instantiate the virtual disk based at least in part on a determination that the unique identifier in the first virtual disk file matches a unique identifier located in a parent virtual disk file.
9 . The system of claim 7 , further comprising instructions that upon execution by the processor cause the processor to:
deny a second request, from the guest OS executing on the VM, to instantiate the virtual disk based at least in part on a determination that the unique identifier in the first virtual disk file does not match a unique identifier located in a parent virtual disk file.
10 . The system of claim 7 , further comprising instructions that upon execution by the processor cause the processor to:
change the first identifier in the first virtual disk file to the second identifier based at least in part on a determination that a virtual disk extent in the group was modified.
11 . The system of claim 7 , further comprising instructions that upon execution by the processor cause the processor to:
send instructions, from the guest OS executing on the VM, to close the virtual disk file,
wherein prior to closing the virtual disk file, the copy of the first identifier associated with information is changed to the second identifier.
12 . The system of claim 7 , further comprising instructions that upon execution by the processor cause the processor to:
change the copy of the first identifier associated with the information to the second identifier based at least in part on the determination that the virtual disk file was modified; and store modifications made to the information.
13 . The system of claim 7 , further comprising instructions that upon execution by the processor cause the processor to:
send an input/output job, from the guest OS executing on the VM, to access sector bitmaps for the group of virtual disk extents written to a section of the virtual disk file, the section of the virtual disk file having a virtual disk file offset selected such that the section is aligned with sectors of a storage device configured to store the virtual disk file.
14 . The system of claim 7 , further comprising instructions that upon execution by the processor cause the processor to:
send instructions, from the guest OS executing on the VM, to:
detect an attempt to modify information in a parent virtual disk file that affects how virtual disk extent data of the virtual disk based on the parent virtual disk file is interpreted, the parent virtual disk file including a first random value;
change the first random value in the parent virtual disk file with a second random value;
flush the second random value to a persistent copy of the virtual disk file; and
modify the information in the parent virtual disk file based at least in part on receipt of a signal indicating that the flush completed.
15 . The system of claim 7 , further comprising instructions that upon execution by the processor cause the processor to:
derive updated information based at least in part on a determination that the information is associated with a copy of the first identifier and the first virtual disk file includes the second identifier.
16 . A method, comprising:
receiving, at a storage device, a request to open a parent virtual disk file, the parent virtual disk file being linked to a child virtual disk file, the parent virtual disk file including a virtual disk extent and a first identifier stored as a unique identifier identifying the parent virtual disk file, and the child virtual disk file including a copy of the first identifier; changing, at the storage device, the first identifier in the parent virtual disk file with a second identifier based at least in part on detecting an attempt to modify data affecting how the virtual disk extent is interpreted; receiving, at the storage device, an input/output job to change the first identifier with the second identifier, wherein the storage device is configured to store a persistent copy of the parent virtual disk file; receiving, at the storage device, a flush command; and modifying, at the storage device, the data affecting how the virtual disk extent is interpreted based at least in part on a receipt of a signal indicating that the storage device persisted contents of an internal cache.
17 . The method of claim 16 , further comprising:
denying, at the storage device, a request to instantiate a virtual disk based at least in part on a determination that the second identifier in the persistent copy of the virtual disk file does not match the first identifier stored in the child virtual disk file.
18 . The method of claim 16 , further comprising:
changing, at the storage device, the first identifier to a previous value based at least in part on user input.
19 . The method of claim 16 , further comprising:
instantiating, at the storage device, a virtual disk, wherein the virtual disk including virtual disk extents described by the parent virtual disk file and virtual disk extents described by the child virtual disk file, the child virtual disk file including a sequence number; loading, at the storage device, information identifying a subset of virtual disk extents in the child virtual disk file that are described by the child virtual disk file into random access memory, the information associated with a copy of the sequence number; incrementing, at the storage device, the sequence number in the child virtual disk file based at least in part on a determination that the child virtual disk file was modified; and incrementing, at the storage device, the sequence number associated with the information based at least in part on a determination that the information accurately reflects a state of the subset of virtual disk extents in the child virtual disk file.
20 . The method of claim 16 , further comprising:
writing, at the storage device, sector bitmaps for a group of virtual disk extents to a section of the virtual disk file, the section of the virtual disk file having a virtual disk file offset selected such that the section is aligned with sectors of the storage device configured to store the virtual disk file.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.