Glossary

Concept - Clusters

Previous Next

Overview

In NTFS, the Cluster is the fundamental unit of disk usage. The number of sectors that make up a cluster is always a power of 2, and the number is fixed when the volume is formatted. This number is called the Cluster Factor and is usually quoted in bytes, e.g. 8KB, 2KB. NTFS addresses everything by its Logical Cluster Number.

Logical Cluster Number (LCN)

Each cluster in a volume is given a sequential number. This is its Logical Cluster Number. LCN 0 (zero) refers to the first cluster in the volume (the boot sector).

To convert from an LCN to a physical offset in the volume, multiply the LCN by the Cluster Size.

Virtual Cluster Number (VCN)

Each cluster of a non-resident stream is given a sequential number. This is its Virtual Cluster Number. VCN 0 (zero) refers to the first cluster of the stream.

To locate the stream on disk, it's necessary to convert from a VCN to an LCN. This is done with the help of data runs.

Data Runs

Each contiguous block of LCNs is given a Data Run, which contains a VCN, an LCN and a length. When NTFS needs to to find an object on disk, it looks up the VCN in the Data Runs to get the LCN.

Notes

Other information

The Cluster Size can be chosen when the volume is formatted.

The Cluster Size for a volume is stored in $Boot. Also defined there is the size, in clusters, of an MFT File Record and an Index Record.

By using Cluster Numbers, NTFS can address larger disks than if sectors numbers were used.

A list of allowed and default cluster sizes is shown below.

Windows NT
512 bytes, 1KB, 2KB or 4KB
Windows 2000, Windows XP
512 bytes, 1KB, 2KB, 4KB, 8KB, 16KB, 32KB or 64KB
Volume Size Default Cluster Size
< 512MB Sector size
< 1GB 1KB
< 2GB 2KB
> 2GB 4KB

Questions

Why does NTFS use Virtual Cluster Numbers?


Copyright ©