-
Notifications
You must be signed in to change notification settings - Fork 275
Description
Basically, I'm looking for the inverse of GetLayerMountPath, something that I can pass a \\?\Volume{xxx} that I got from GetLayerMountPath, and get back the layer path. I have two uses-cases for this:
Containerd's unmount API for local mounts of snapshots doesn't get any context, just the path at which the mount was made. I can use GetVolumeNameForVolumeMountPointW to get the volume name from that (or just process the reparse data directly), but I cannot then map that back to a layer path (and hence a snapshot ID) without either
- Walking the snapshot list with
GetLayerMountPathuntil I find the layer - Storing the snapshot ID in an Alternative Data Stream at mount-time. I'm currently using this approach, based on previous work by others.
The other use-case is that I currently have three WCOW layer volumes visible in mountvol, and I have no idea where they are on-disk. I suspect they were left over from containerd unit-test runs, but there's absolutely no way to tell, as containerd doesn't track mounts, and I suspect the mount-point has been deleted, so I don't even have that ADS data anymore. I'd like to wclayer unmount them, if I knew where the source was.
I'm not aware of anything in the current API, but perhaps there's other information around that I'm not aware to look for. I only just discovered that mountvol can list volumes, so I'm hoping there's also something around that maps volumes to filesystem filter drivers or something.
fltmc lets me see which volumes are attached to the wcifs filter, which at least lets me know that a volume is a WCOW layer mounted from somewhere.