Volume GUID?

When I get a create that returns STATUS_REPARSE for a mount point. It
returns a volume name such as:
??\Volume{4116b677-9dc2-11d3-8839-806d6172696f}Just what is this number? GUID, OBJECT ID? And how can I determine the
equivalent for a device I’ve attached to? I’d like to be able to compare it
to an existing device that I’m already attached to so I don’t attached
twice. Since I typically attached via the drive name. I tried querying the
object ID via NTQueryInformation using FileObjectIdInformation and it
returns STATUS_INVALID_PARAMETER, and via FS control using
FileFsObjectIdInformation it returns something that does not look anything
like the value in the volume name above.

Thanks,
Ken


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> Subject: Volume GUID?

From: “Ken Galipeau”
> Date: Tue, 19 Dec 2000 01:12:21 -0500
> X-Message-Number: 1
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_000B_01C06958.BCBD3950
> Content-Type: text/plain;
> charset=“iso-8859-1”
> Content-Transfer-Encoding: 7bit
>
> When I get a create that returns STATUS_REPARSE for a mount point. It
> returns a volume name such as:
> ??\Volume{4116b677-9dc2-11d3-8839-806d6172696f}> Just what is this number? GUID, OBJECT ID? And how can I determine the
> equivalent for a device I’ve attached to? I’d like to be able to compare it
> to an existing device that I’m already attached to so I don’t attached
> twice. Since I typically attached via the drive name. I tried querying the
> object ID via NTQueryInformation using FileObjectIdInformation and it
> returns STATUS_INVALID_PARAMETER, and via FS control using
> FileFsObjectIdInformation it returns something that does not look anything
> like the value in the volume name above.
>
> Thanks,
> Ken
>

Ken,

The following information is in the Microsoft MSDN; I think it
answers your question.

Unique Volume Names
Two factors can make it hard to reliably mount a specific volume at a
specified volume mount point across operating system restarts. One factor
is that two different volumes can have the same label, which makes them
indistinguishable except by drive letter. The other factor is that drive
letters do not necessarily remain the same. If a computer’s administrator
does not use the Disk Administrator to enforce drive letters, then drive
letters can change as drives are removed from or added to the system.

To solve this problem, the system refers to volumes to be mounted with
unique volume names. These are strings of this form:

"\?\Volume{GUID}"

where GUID is a globally unique identifier (GUID) that identifies the
volume. The \?\ turns off path parsing and is ignored as part of the path,
as discussed in Path Lengths. Note the trailing backslash. All volume mount
point functions that take a unique volume name as a parameter require the
trailing backslash; all volume mount point functions that return a unique
volume name provide the trailing backslash. You can use CreateFile to open
a volume by referring to its unique volume name, but without a trailing
backslash. When using CreateFile, a unique volume name with a backslash
refers to the root directory of the volume.

The operating system assigns a unique volume name to a volume when the
computer first encounters it, for example during formatting or
installation. The volume mount point functions use unique volume names to
refer to volumes. To learn the unique volume name of any drive, use the
GetVolumeNameForVolumeMountPoint function.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

It answers what it is but not how to query it from the kernel. I can “open”
the volume as returned by STATUS_REPARSE but I’m not able to query that
volume and get the same name back. GetVolumeNameForVolumeMountPoint is a
win32 API and dos not help me in the kernel.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@veritas.com
Sent: Thursday, December 28, 2000 7:01 PM
To: File Systems Developers
Subject: [ntfsd] RE: Volume GUID?

Subject: Volume GUID?
From: “Ken Galipeau”
> Date: Tue, 19 Dec 2000 01:12:21 -0500
> X-Message-Number: 1
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_000B_01C06958.BCBD3950
> Content-Type: text/plain;
> charset=“iso-8859-1”
> Content-Transfer-Encoding: 7bit
>
> When I get a create that returns STATUS_REPARSE for a mount point. It
> returns a volume name such as:
> ??\Volume{4116b677-9dc2-11d3-8839-806d6172696f}> Just what is this number? GUID, OBJECT ID? And how can I determine the
> equivalent for a device I’ve attached to? I’d like to be able to compare
it
> to an existing device that I’m already attached to so I don’t attached
> twice. Since I typically attached via the drive name. I tried querying the
> object ID via NTQueryInformation using FileObjectIdInformation and it
> returns STATUS_INVALID_PARAMETER, and via FS control using
> FileFsObjectIdInformation it returns something that does not look anything
> like the value in the volume name above.
>
> Thanks,
> Ken
>

Ken,

The following information is in the Microsoft MSDN; I think it
answers your question.

Unique Volume Names
Two factors can make it hard to reliably mount a specific volume at a
specified volume mount point across operating system restarts. One factor
is that two different volumes can have the same label, which makes them
indistinguishable except by drive letter. The other factor is that drive
letters do not necessarily remain the same. If a computer’s administrator
does not use the Disk Administrator to enforce drive letters, then drive
letters can change as drives are removed from or added to the system.

To solve this problem, the system refers to volumes to be mounted with
unique volume names. These are strings of this form:

"\?\Volume{GUID}"

where GUID is a globally unique identifier (GUID) that identifies the
volume. The \?\ turns off path parsing and is ignored as part of the path,
as discussed in Path Lengths. Note the trailing backslash. All volume mount
point functions that take a unique volume name as a parameter require the
trailing backslash; all volume mount point functions that return a unique
volume name provide the trailing backslash. You can use CreateFile to open
a volume by referring to its unique volume name, but without a trailing
backslash. When using CreateFile, a unique volume name with a backslash
refers to the root directory of the volume.

The operating system assigns a unique volume name to a volume when the
computer first encounters it, for example during formatting or
installation. The volume mount point functions use unique volume names to
refer to volumes. To learn the unique volume name of any drive, use the
GetVolumeNameForVolumeMountPoint function.


You are currently subscribed to ntfsd as: xxxxx@legato.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Given volume id like ??\Volume{4116b677-9dc2-11d3-8839-806d6172696f} I am
able to attach to the drive by opening a file object. But when I query the
file object using IRP_MJ_VOLUME_QUERY_INFORMATION with
FileFsObjectIdInformation which returns a FILE_FS_OBJECTID_INFORMATION
structure, the contents of the structure looks nothing like the volume ID.
How do I get the above name of a volume name via a query in the kernel or
how is a FILE_FS_OBJECTID_INFORMATION structure converted to the above path
name, or are they not the same thing.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@veritas.com
Sent: Thursday, December 28, 2000 7:01 PM
To: File Systems Developers
Subject: [ntfsd] RE: Volume GUID?

Subject: Volume GUID?
From: “Ken Galipeau”
> Date: Tue, 19 Dec 2000 01:12:21 -0500
> X-Message-Number: 1
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_000B_01C06958.BCBD3950
> Content-Type: text/plain;
> charset=“iso-8859-1”
> Content-Transfer-Encoding: 7bit
>
> When I get a create that returns STATUS_REPARSE for a mount point. It
> returns a volume name such as:
> ??\Volume{4116b677-9dc2-11d3-8839-806d6172696f}> Just what is this number? GUID, OBJECT ID? And how can I determine the
> equivalent for a device I’ve attached to? I’d like to be able to compare
it
> to an existing device that I’m already attached to so I don’t attached
> twice. Since I typically attached via the drive name. I tried querying the
> object ID via NTQueryInformation using FileObjectIdInformation and it
> returns STATUS_INVALID_PARAMETER, and via FS control using
> FileFsObjectIdInformation it returns something that does not look anything
> like the value in the volume name above.
>
> Thanks,
> Ken
>

Ken,

The following information is in the Microsoft MSDN; I think it
answers your question.

Unique Volume Names
Two factors can make it hard to reliably mount a specific volume at a
specified volume mount point across operating system restarts. One factor
is that two different volumes can have the same label, which makes them
indistinguishable except by drive letter. The other factor is that drive
letters do not necessarily remain the same. If a computer’s administrator
does not use the Disk Administrator to enforce drive letters, then drive
letters can change as drives are removed from or added to the system.

To solve this problem, the system refers to volumes to be mounted with
unique volume names. These are strings of this form:

"\?\Volume{GUID}"

where GUID is a globally unique identifier (GUID) that identifies the
volume. The \?\ turns off path parsing and is ignored as part of the path,
as discussed in Path Lengths. Note the trailing backslash. All volume mount
point functions that take a unique volume name as a parameter require the
trailing backslash; all volume mount point functions that return a unique
volume name provide the trailing backslash. You can use CreateFile to open
a volume by referring to its unique volume name, but without a trailing
backslash. When using CreateFile, a unique volume name with a backslash
refers to the root directory of the volume.

The operating system assigns a unique volume name to a volume when the
computer first encounters it, for example during formatting or
installation. The volume mount point functions use unique volume names to
refer to volumes. To learn the unique volume name of any drive, use the
GetVolumeNameForVolumeMountPoint function.


You are currently subscribed to ntfsd as: xxxxx@legato.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi, Ken!

They are not the same thing. To get the volume name, with GUID, you need
to send IOCTL_MOUNTMGR_QUERY_POINTS down to the storage stack. This will
get all the mount points on the volume, including the “volume name”
mount point. Then you call the MOUNTMGR_IS_VOLUME_NAME macro to
determine which of these is the volume name mount point.

The IOCTL and the macro are both defined in mountmgr.h (not ntifs.h).
The IOCTL is documented in the DDK Storage Devices Reference (under
“Mount Manager I/O Control Codes”). Note that in the docs, the GUID is
called the “unique ID.”

If you have any questions about this, let me know. BTW, one of my New
Year’s resolutions for the IFS Kit is to add a bunch of sorely needed
pointers from the IFS Kit docs to the DDK Storage driver docs.

–Diane

-----Original Message-----
From: Ken Galipeau [mailto:xxxxx@legato.com]
Sent: Friday, January 05, 2001 2:03 PM
To: File Systems Developers
Subject: [ntfsd] RE: Volume GUID?

Given volume id like ??\Volume{4116b677-9dc2-11d3-8839-806d6172696f} I
am
able to attach to the drive by opening a file object. But when I query
the
file object using IRP_MJ_VOLUME_QUERY_INFORMATION with
FileFsObjectIdInformation which returns a FILE_FS_OBJECTID_INFORMATION
structure, the contents of the structure looks nothing like the volume
ID.
How do I get the above name of a volume name via a query in the kernel
or
how is a FILE_FS_OBJECTID_INFORMATION structure converted to the above
path
name, or are they not the same thing.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@veritas.com
Sent: Thursday, December 28, 2000 7:01 PM
To: File Systems Developers
Subject: [ntfsd] RE: Volume GUID?

Subject: Volume GUID?
From: “Ken Galipeau”
> Date: Tue, 19 Dec 2000 01:12:21 -0500
> X-Message-Number: 1
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_000B_01C06958.BCBD3950
> Content-Type: text/plain;
> charset=“iso-8859-1”
> Content-Transfer-Encoding: 7bit
>
> When I get a create that returns STATUS_REPARSE for a mount point. It
> returns a volume name such as:
> ??\Volume{4116b677-9dc2-11d3-8839-806d6172696f}<br>> Just what is this number? GUID, OBJECT ID? And how can I determine the
> equivalent for a device I’ve attached to? I’d like to be able to
compare
it
> to an existing device that I’m already attached to so I don’t attached
> twice. Since I typically attached via the drive name. I tried querying
the
> object ID via NTQueryInformation using FileObjectIdInformation and it
> returns STATUS_INVALID_PARAMETER, and via FS control using
> FileFsObjectIdInformation it returns something that does not look
anything
> like the value in the volume name above.
>
> Thanks,
> Ken
>

Ken,

The following information is in the Microsoft MSDN; I think it
answers your question.

Unique Volume Names
Two factors can make it hard to reliably mount a specific volume at a
specified volume mount point across operating system restarts. One
factor
is that two different volumes can have the same label, which makes them
indistinguishable except by drive letter. The other factor is that drive
letters do not necessarily remain the same. If a computer’s
administrator
does not use the Disk Administrator to enforce drive letters, then drive
letters can change as drives are removed from or added to the system.

To solve this problem, the system refers to volumes to be mounted with
unique volume names. These are strings of this form:

"\?\Volume{GUID}"

where GUID is a globally unique identifier (GUID) that identifies the
volume. The \?\ turns off path parsing and is ignored as part of the
path,
as discussed in Path Lengths. Note the trailing backslash. All volume
mount
point functions that take a unique volume name as a parameter require
the
trailing backslash; all volume mount point functions that return a
unique
volume name provide the trailing backslash. You can use CreateFile to
open
a volume by referring to its unique volume name, but without a trailing
backslash. When using CreateFile, a unique volume name with a backslash
refers to the root directory of the volume.

The operating system assigns a unique volume name to a volume when the
computer first encounters it, for example during formatting or
installation. The volume mount point functions use unique volume names
to
refer to volumes. To learn the unique volume name of any drive, use the
GetVolumeNameForVolumeMountPoint function.


You are currently subscribed to ntfsd as: xxxxx@legato.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com