Skip to content

Is there any way to translate a volume back into an image layer path #909

@TBBle

Description

@TBBle

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions