Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows] How to get and format a host disk inside a windows container #38479

Closed
andyzhangx opened this issue Jan 3, 2019 · 4 comments
Closed

Comments

@andyzhangx
Copy link

andyzhangx commented Jan 3, 2019

Description

The problem here is How to get and format a host disk inside a windows container?.

Background:
I am now implmenting azure disk CSI driver, it works well on Linux, while I am thinking how to enable disk CSI driver on Windows, there is a potential blocking issue here.
On Linux, we usually use volume mapping to map /dev to a container, and we could formant and mount that disk inside a container, that's the solution on Linux.
While on windows, how could I do that since there is no such /dev dir, on kubernetes, I implemented that by Get-Disk powershell command which is actually running on host, code is like following:

	cmd := `Get-Disk | select number, location | ConvertTo-Json`
	output, err := exec.Run("powershell", "/c", cmd)

How to get and format a host disk inside a windows container?
This is a common blocking issue for making all disk related CSI driver work on windows.

cc @jhowardmsft @feiskyer @khenidak @PatrickLang @KnicKnic @taylorb-microsoft

Steps to reproduce the issue:

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

(paste your output here)

Output of docker info:

(paste your output here)

Additional environment details (AWS, VirtualBox, physical, etc.):

@feiskyer
Copy link

feiskyer commented Jan 3, 2019

I don't think it's possible now. We could make CSI services running outside of containers (same as kube-proxy).

@olljanat
Copy link
Contributor

olljanat commented Jan 5, 2019

@andyzhangx I assume that you are talking about data drives here? Not the ones where container it selves is running?

On Linux, we usually use volume mapping to map /dev to a container, and we could formant and mount that disk inside a container, that's the solution on Linux.

What prevents you to just mount directory which contains VHDX files inside of container and use it same way than /dev folder on Linux?

@andyzhangx
Copy link
Author

@olljanat In that way, the host already mounts that vhdx file to a directory, while in CSI scenario, the mount process should happen inside container. This is the difference between Windows and Linux, in Linux, all devices are files while not for Windows. Anyway, I will try to set POC as a process in windows.

@lowenna
Copy link
Member

lowenna commented Feb 23, 2019

Closing. This issue is about additional functionality needing feature work from the platform. @andyzhangx Please follow up internally as a first step.

@lowenna lowenna closed this as completed Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants