# US 2024/0403096 A1 · Handling container volume creation in a virtualized environment

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0403096 A1
- Document ID: US20240403096A1
- Status: Published application
- Kind: A1
- Application number: 18/229,199
- Filed: 2023-08-02
- Published: 2024-12-05
- Earliest claimed: 2023-06-02
- Applicants: Vmware, Inc.
- Inventors: KASHISH BHATIA
- Web page: https://patentgrep.com/patent/US20240403096A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0665: {at area level, e.g. provisioning of virtual or logical volumes}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 2009/45562: {Creating, deleting, cloning virtual machine instances}
- G06F 2009/45579: {I/O management, e.g. providing access to device drivers or storage}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An example method of creating a volume for a container of container cluster executing in a computer system includes: receiving, at a container volume driver executing in the computer system, a request to create the volume from a container agent, the container agent executing in the computer system on behalf of the container; determining, by the container volume driver in cooperation with a storage stack, that insufficient available space exists in a virtual disk pool to store the volume; sending, by the container volume driver to the storage stack, a delete request targeting a portion of the physical storage that stores a freeable portion of the plurality of allocated volumes; requesting, by the container volume driver, the storage stack to activate a garbage collector that processes the delete request; and requesting, by the container volume driver, the container agent to retry the request to create the volume.

## Claims

### Claim 1

A method of creating a volume for a container of container cluster executing in a computer system and managed by a container manager, the method comprising:
receiving, at a container volume driver executing in the computer system, a request to create the volume from a container agent, the container agent executing in the computer system on behalf of the container and as a client of the container volume driver;
determining, by the container volume driver in cooperation with a storage stack, that insufficient available space exists in a virtual disk pool to store the volume, the virtual disk pool including at least one virtual disk and stored in physical storage accessible by the computer system, the virtual disk pool storing a plurality of allocated volumes previously created for the container cluster;
sending, by the container volume driver to the storage stack, a delete request targeting a portion of the physical storage that stores a freeable portion of the plurality of allocated volumes;
requesting, by the container volume driver, the storage stack to activate a garbage collector that processes the delete request; and
requesting, by the container volume driver, the container agent to retry the request to create the volume.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
receiving, at the container volume driver, another request to create the volume from the container agent;
determining, by the container volume driver in cooperation with the storage stack, that a virtual disk of the virtual disk pool has available space sufficient to store the volume;
requesting, by the container volume driver, the storage stack to allocate the volume on the virtual disk; and
updating metadata tracked by the container volume driver in response to an identifier of the container, an identifier of the virtual disk, and an identifier of the volume.

### Claim 3 (depends on 2)

The method of claim 2, wherein the other request includes volume data comprising a volume name and a volume size, and wherein the container volume driver updates the metadata further in response to the volume name, the volume size, and a reference to a unit of the available space consumed by the volume.

### Claim 4 (depends on 3)

The method of claim 3, wherein the step of updating the metadata comprises:
updating a first table that relates container identifiers, virtual disk identifiers, and volume identifiers; and
updating a second table that relates the volume identifiers, volume names, references to units of space, and volume sizes.

### Claim 5 (depends on 1)

The method of claim 1, wherein the container volume driver tracks metadata relating container identifiers, virtual disk identifiers, and volume identifiers, and wherein the step of sending the delete request comprises:
identifying a stale container identifier in the metadata, the stale container identifier having no corresponding container in the container cluster, the stale container identifier related to a volume identifier for a dangling volume and a virtual disk identifier for a virtual disk in the virtual disk pool;
wherein the dangling volume comprises the freeable portion of the plurality of allocated volumes.

### Claim 6 (depends on 1)

The method of claim 1, wherein the container volume driver maintains virtual disk metadata tracking deletions received by the container volume driver from the container cluster, and wherein the step of sending the delete request comprises:
traversing the virtual disk metadata to identify a deletion targeting a first allocated volume of the plurality of allocated volumes, the freeable portion comprising at least portion of the first allocated volume.

### Claim 7 (depends on 1)

The method of claim 1, wherein the computer system includes a hardware platform and a hypervisor executing on the hardware platform, wherein the container volume driver and the storage stack execute as part of the hypervisor, and wherein the container and the container agent execute in a virtual machine (VM) supported by the hypervisor.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
receiving, at the container manager, a configuration file including a definition of the container cluster and a definition of the volume, the definition of the volume including a creation condition;
commanding, by the container manager, the container agent to send the request to create the volume in response to determining that the creation condition in the definition of the volume has been satisfied.

### Claim 9 (depends on 8)

The method of claim 8, wherein the creation condition includes a creation time T1 after a creation time T of the container.

### Claim 10 (depends on 8)

The method of claim 8, wherein the creation condition includes a creation time T2 and a dependency on creation of another volume with a creation time of T1, T2 occurring after T1, which occurs after a creation time T of the container.

### Claim 11

A non-transitory computer readable medium comprising instructions to be executed in a computing device to cause the computing device to carry out a method of creating a volume for a container of container cluster executing in a computer system and managed by a container manager, the method comprising:
receiving a request to create the volume from a container agent, the container agent executing in the computer system on behalf of the container;
determining, in cooperation with a storage stack, that insufficient available space exists in a virtual disk pool to store the volume, the virtual disk pool including at least one virtual disk and stored in physical storage accessible by the computer system, the virtual disk pool storing a plurality of allocated volumes previously created for the container cluster;
sending, to the storage stack, a delete request targeting a portion of the physical storage that stores a freeable portion of the plurality of allocated volumes;
requesting the storage stack to activate a garbage collector that processes the delete request; and
requesting the container agent to retry the request to create the volume.

### Claim 12 (depends on 11)

The non-transitory computer readable medium of claim 11, further comprising:
receiving another request to create the volume from the container agent;
determining, in cooperation with the storage stack, that a virtual disk of the virtual disk pool has available space sufficient to store the volume;
requesting the storage stack to allocate the volume on the virtual disk; and
updating metadata in response to an identifier of the container, an identifier of the virtual disk, and an identifier of the volume.

### Claim 13 (depends on 11)

The non-transitory computer readable medium of claim 11, wherein metadata relates container identifiers, virtual disk identifiers, and volume identifiers, and wherein the step of sending the delete request comprises:
identifying a stale container identifier in the metadata, the stale container identifier having no corresponding container in the container cluster, the stale container identifier related to a volume identifier for a dangling volume and a virtual disk identifier for a virtual disk in the virtual disk pool;
wherein the dangling volume comprises the freeable portion of the plurality of allocated volumes.

### Claim 14 (depends on 11)

The non-transitory computer readable medium of claim 11, wherein virtual disk metadata tracks deletions received from the container cluster, and wherein the step of sending the delete request comprises:
traversing the virtual disk metadata to identify a deletion targeting a first allocated volume of the plurality of allocated volumes, the freeable portion comprising at least portion of the first allocated volume.

### Claim 15

A computer system, comprising:
a hardware platform configured for access to physical storage, the physical storage storing a virtual disk pool comprising at least one virtual disk, the virtual disk pool storing a plurality of allocated volumes previously created for a container cluster;
a hypervisor executing on the hardware platform, the hypervisor including a container volume driver and a storage stack;
a virtual machine (VM) managed by the hypervisor, the VM including a container of the container cluster and a container agent;
wherein the container volume driver is configured to:
receive a request to create a volume from the container agent;
determine, in cooperation with a storage stack, that insufficient available space exists in the virtual disk pool to store the volume;
send, to the storage stack, a delete request targeting a portion of the physical storage that stores a freeable portion of the plurality of allocated volumes;
request the storage stack to activate a garbage collector that processes the delete request; and
request the container agent to retry the request to create the volume.

### Claim 16 (depends on 15)

The computer system of claim 15, wherein the container volume driver is configured to:
receive another request to create the volume from the container agent;
determine, in cooperation with the storage stack, that a virtual disk of the virtual disk pool has available space sufficient to store the volume;
request the storage stack to allocate the volume on the virtual disk; and
update metadata tracked by the container volume driver in response to an identifier of the container, an identifier of the virtual disk, and an identifier of the volume.

### Claim 17 (depends on 16)

The computer system of claim 16, wherein the other request includes volume data comprising a volume name and a volume size, and wherein the container volume driver updates the metadata further in response to the volume name, the volume size, and a reference to a unit of the available space consumed by the volume.

### Claim 18 (depends on 17)

The computer system of claim 17, wherein the container volume driver is configured to:
update a first table that relates container identifiers, virtual disk identifiers, and volume identifiers; and
update a second table that relates the volume identifiers, volume names, references to units of space, and volume sizes.

### Claim 19 (depends on 15)

The computer system of claim 15, wherein the container volume driver is configured to:
track metadata relating container identifiers, virtual disk identifiers, and volume identifiers; and
identify a stale container identifier in the metadata, the stale container identifier having no corresponding container in the container cluster, the stale container identifier related to a volume identifier for a dangling volume and a virtual disk identifier for a virtual disk in the virtual disk pool;
wherein the dangling volume comprises the freeable portion of the plurality of allocated volumes.

### Claim 20 (depends on 15)

The computer system of claim 15, wherein the container volume driver is configured to:
maintain virtual disk metadata that tracks deletions received from the container cluster; and
traverse the virtual disk metadata to identify a deletion targeting a first allocated volume of the plurality of allocated volumes, the freeable portion comprising at least portion of the first allocated volume.
