Score:0

Find Windows VolumeId from FilePath

ca flag

Problem

I want to find the VolumeId that my file is on using the file path.

The Best Solution That I Can Think Of

The best way that I can think of accomplishing this is to query out via WMI/CIM all of the disk partition access paths for all of the LUN Disks, and then seeing which access path has the longest access path.

Background

I am working with Windows Virtual Hard Drives (VHD) multiple LUN disks from a storage array with mount points and want to keep track of what VHD is on what storage array LUN Disk. All of the filesystems of the disks involved are Windows NTFS.

However, I don't see a quick and easy way to do so. I've looked at using CIM_DataFile, but it doesn't have VolumeId, and I don't see it in Win32_Directory either.

I'm guessing that there isn't a simple way to fix this problem, but I'm hoping that someone knows an easy way to solve the problem.

Score:0
gr flag

Are these LUNS in a hyper-v cluster? Have you looked at Powershell and the Get-Volume command or the Get-StorageNode command? I don't have an environment here to test on right now but wanted to throw it out there.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.