2.3.22 FSCTL_GET_NTFS_VOLUME_DATA Reply

The FSCTL_GET_NTFS_VOLUME_DATA reply message returns the results of the FSCTL_GET_NTFS_VOLUME_DATA request as an NTFS_VOLUME_DATA_BUFFER element.

The NTFS_VOLUME_DATA_BUFFER contains information on a volume. For more information about the NTFS file system, see [MSFT-NTFS].


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

VolumeSerialNumber

...

NumberSectors

...

TotalClusters

...

FreeClusters

...

TotalReserved

...

BytesPerSector

BytesPerCluster

BytesPerFileRecordSegment

ClustersPerFileRecordSegment

MftValidDataLength

...

MftStartLcn

...

Mft2StartLcn

...

MftZoneStart

...

MftZoneEnd

...

VolumeSerialNumber (8 bytes): A 64-bit signed integer that contains the serial number of the volume. This is a unique number assigned to the volume media by the operating system when the volume is formatted.

NumberSectors (8 bytes): A 64-bit signed integer that contains the number of sectors in the specified volume.

TotalClusters (8 bytes): A 64-bit signed integer that contains the total number of clusters in the specified volume.

FreeClusters (8 bytes): A 64-bit signed integer that contains the number of free clusters in the specified volume.

TotalReserved (8 bytes): A 64-bit signed integer that contains the number of reserved clusters in the specified volume. Reserved clusters are free clusters reserved for when the volume becomes full. Reserved clusters used to guarantee clusters are available at points when the file system can't properly report allocation failures.

BytesPerSector (4 bytes): A 32-bit unsigned integer that contains the number of bytes in a sector on the specified volume.

BytesPerCluster (4 bytes): A 32-bit unsigned integer that contains the number of bytes in a cluster on the specified volume. This value is also known as the cluster factor.

BytesPerFileRecordSegment (4 bytes): A 32-bit unsigned integer that contains the number of bytes in a file record segment.

ClustersPerFileRecordSegment (4 bytes): A 32-bit unsigned integer that contains the number of clusters in a file record segment.

MftValidDataLength (8 bytes): A 64-bit signed integer that contains the size of the master file table in bytes.

MftStartLcn (8 bytes): A 64-bit signed integer that contains the starting logical cluster number (LCN) of the master file table.

Mft2StartLcn (8 bytes): A 64-bit signed integer that contains the starting logical cluster number of the master file table mirror.

MftZoneStart (8 bytes): A 64-bit signed integer that contains the starting logical cluster number of the master file table zone.

MftZoneEnd (8 bytes): A 64-bit signed integer that contains the ending logical cluster number of the master file table zone. The size of the master file table zone is (MftZoneEnd - MftZoneStart) clusters.

This message also returns a status code as specified in section 2.2. Upon success, the status code returned directly by the function that processes this FSCTL is STATUS_SUCCESS. The most common error codes are listed in the following table.

 Error code

 Meaning

STATUS_INVALID_PARAMETER

0xC000000D

The handle specified is not open.

STATUS_VOLUME_DISMOUNTED

0xC000026E

The specified volume is no longer mounted.

STATUS_BUFFER_TOO_SMALL

0xC0000023

The output buffer is too small to contain an NTFS_VOLUME_DATA_BUFFER structure.