Is it possible to configure the storage driver not to create a new virtual disk for each container?

Benjamin 1 Reputation point
2021-03-18T14:01:09.363+00:00

Each time when I run a docker container on a Windows 2019 VM, then a new ephemeral disk is automatically created for the container by the storage driver, and attached to the VM. When the container stops, then the disk is automatically detached from the Windows VM. Basically it's working well. You know, the behavior is different from the overlay2 on Linux. Is it possible to configure the docker engine or storage driver not to create a virtual disk for each container? Can it just use a directory on the host, just like overlay2?

The reason why I ask this is that the CSI Driver will also attach new disks to the VM, and we can't easily programmatically tell which disks are attached by the CSI Driver, and which are created & attached by the docker's storage driver.

When we rolling update a K8S cluster, we need to drain each worker node one by one. When draining each worker node, we need to wait for all the POD/containers to be evicted, and all the related PV/disks to be unmounted & detached. You know, K8S DaemonSet can't be drained, so the virtual disks (created & attached by the docker windows's storage driver) related to the DaemonSet POD/containers will never be detached. So the drain process will be blocked.

We use exactly the same drain process on Linux and Windows, and we do not see any issue on Linux. But it doesn't work on Windows, and the root cause is that a new ephemeral disk is created & attached to a Windows VM by docker's storage driver, just as I mentioned above. So is it possible to configure the docker-window's storage driver to follow the same behavior as docker-linux's storage driver, i.e. overlay2? It's appreciated if anyone can share thoughts or comments.

Thanks.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,605 questions
Windows Server Storage
Windows Server Storage
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Storage: The hardware and software system used to retain data for subsequent retrieval.
643 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaowei He 9,876 Reputation points
    2021-03-19T06:52:48.783+00:00

    Hi,

    Thanks for your post, I understand you would like to make the docker storage driver not create a new virtual disk for each container automatically, after research, it seems there's little information about this issue. Since we may have limited information about docker contaniner on forum, I would suggets you open a case with MS for better help.

    Below is the link to open a case with MS:

    https://support.microsoft.com/en-us/gp/customer-service-phone-numbers

    Thanks for your time!
    Best Regards,
    Anne

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments