Logical Disk Manager
|This article relies on references to primary sources. (July 2008)|
The Logical Disk Manager (LDM) is an implementation of a logical volume manager for Microsoft Windows NT, developed by Microsoft and Veritas Software. It was introduced with the Windows 2000 operating system, and is supported in Windows XP, Windows Server 2003, Windows Vista, Windows 7 and Windows 8. The MMC-based Disk Management snap-in (diskmgmt.msc) hosts the Logical Disk Manager. On Windows 8 and Windows Server 2012, LDM was deprecated in favor of Storage Spaces.
Logical Disk Manager enables disk volumes to be dynamic, in contrast to the standard basic volume format. Basic volumes and dynamic volumes differ in ability to extend storage beyond one physical disk. Basic partitions are restricted to a fixed size on one physical disk. Dynamic volumes can be enlarged to include more free space either from the same disk or another physical disk. (For more information on the difference, see Basic volumes and dynamic volumes, below.)
- 1 Overview
- 2 Partition table types
- 3 Basic volumes and dynamic volumes
- 4 Compatibility problems
- 5 Threatening usage
- 6 See also
- 7 References
- 8 External links
Basic storage involves dividing a disk into primary and extended partitions. This is the route that all versions of Windows that were reliant on DOS-handled storage took, and disks formatted in this manner are known as basic disks. Dynamic storage involves the use of a single partition that covers the entire disk, and the disk itself is divided into volumes or combined with other disks to form volumes that are greater in size than one disk itself. Volumes can use any supported file system.
Basic disks can be upgraded to dynamic disks; however, when this is done the disk cannot easily be downgraded to a basic disk again. To perform a downgrade, data on the dynamic disk must first be backed up onto some other storage device. Second, the dynamic disk must be re-formatted as a basic disk (erasing all data). Finally, data from the backup must be copied back over to the newly re-formatted basic disk.
Dynamic disks provide the capability for software implementations of RAID. The main disadvantage of dynamic disks in Microsoft Windows is that they can only be recognized under certain operating systems, such as Windows 2000 or later (excluding versions such as Windows XP Home Edition, and Windows Vista Home Basic and Premium), FreeBSD, or the Linux kernel starting with version 2.4.8.
Dynamic disks under Windows are provided with the use of databases stored on disk(s). The volumes are referred to as dynamic volumes. It is possible to have 2000 dynamic volumes per dynamic disk, but the maximum recommended by Microsoft is 32.
Partition table types
|ID (GUID Partition Table and MBR Partition Table)||Description|
|"metadata" partition. The area of the disc that is used for holding configuration data that describe the volumes that LDM manages.|
|"data" partition. The area of the disc that is used for holding LDM volumes themselves.|
^1 On a disk partitioned with the MBR Partition Table scheme, the Logical Disk Manager metadata are not stored in a partition, but are stored in a 1MiB area at the end of the disk that is not assigned to any partition. The disc partitioning tools in Windows XP will not use that area for disk partitions, but the tools in other operating systems might.
Basic volumes and dynamic volumes
Dynamic volume is a Microsoft proprietary format developed together with Veritas (now acquired by Symantec). Basic volumes and dynamic volumes differ in ability to extend storage beyond one physical disk. The basic partitions are confined to one disk and their size is fixed. Dynamic volumes allow to adjust size and to add more free space either from the same disk or another physical disk. Dynamic volumes using space on different physical disks are called spanned volumes. Presently spanned volume can use a maximum of 32 physical disks.
- Dynamic disks support multipartition volumes; basic disks do not.
- Windows stores basic disk partition information in the registry and dynamic disk partition information on the disk
Dynamic disks allow more flexible configuration without the need to restart the system. Some space at the end of the disk is reserved by Setup in case upgrading the disk to a dynamic disk is required. Dynamic disk information is saved at the end of the disk. The amount that is reserved is a minimum of one cylinder, or 1MB, whichever is greater. One cylinder can be up to 8MB (the reason why there is a remaining 8 MB unused partition every time windows setup is used to create a partition), depending on drive geometry and translation.
The operations common to basic and dynamic disks are the following:
- Check disk properties, such as capacity, available free space, and current status.
- View volume and partition properties, such as size, drive-letter assignment, label, type, and file system.
- Establish drive-letter assignments for disk volumes or partitions, and for CD-ROM devices.
- Establish disk sharing and security arrangements for a volume or partition.
- Upgrade a basic disk to dynamic, or revert a dynamic disk to basic.
Disk Management in Windows Vista creates partitions according to a 1-MiB alignment boundary, ignoring the previous conventions called "drive geometry" or "CHS". In other words, Vista's Disk Management acts like it is using a non-standard CHS geometry of 2048 sectors per track/head and 1 track/head per cylinder (the sectors being of 512 bytes so that 2048 sectors is 1 MiB).
Compatibility problems with using a 1-MiB alignment boundary
- Extended partition tables that are edited with Vista Disk Management should not be edited with Windows XP Disk Management. XP Disk Management may delete these extended partitions without warning. One way to correct these mixed partition tables is to delete all partitions (reboot or reconnect drive) and use only one partition editor on the drive.
- You may not be able to install XP or Windows Server 2003 to partitions created with Vista Disk Management.
- These 1 MiB alignments ignore prior CHS conventions such as the regular intervals at which partitions begin and end, and the distance between the extended boot records and their logical drives.
- Other operating systems (perhaps DOS programs used by backup or recovery software), boot loaders, or partitioners may have problems viewing or editing partitions that do not follow a CHS alignment. (Generally, unpredictable results may come from using more than one partitioner on the same partition table without checking the alignments with tools such as Ranish Partition Manager. For example, operating system installers usually start with a partition editor so it may be important that this uses the same alignments as the previous partition editors, if all partitions are not deleted (and the computer reset) before installing the operating system. The variation in CHS geometry is almost always a different number of heads per cylinder, for example, 240 instead of 255. However, partition editors may seem to ignore this sort of geometry in some situations. "Head" and "track" mean the same thing in this context.)
Advantages of using a 1-MiB alignment boundary
- Microsoft states that on large-sector drives, also known as advanced format, there is a "performance issue" (i.e., problem) when the starting offset of the first partition is an "odd" number. This partition alignment offset also affects newer generation drives not necessarily specified as advanced format such as SSD drives. Misalignment causes severe degradation not only with random write performance, but also with sequential write performance (normally to a far lesser degree).
- (Quoting Microsoft directly): "In earlier versions of Windows, the default starting offset for the first partition on a hard disk drive was sector 0x3F. Because this starting offset was an odd number, it could cause performance issues on large-sector drives because of misalignment between the partition and the physical sectors. In Windows Vista, the default starting offset will generally be sector 0x800." 
- The "starting offset" refers to the sectors before the partition. "3F" is a hexadecimal value; in decimal that is "63". This is the size of one head (or "track") in terms of a standard CHS geometry. The hex value "800", in decimal form is 2048, so this is referring to the first MiB of space, from the start of the disk. Because a 1-MiB alignment boundary is used by the Vista partitioner(s), 1 MiB is "reserved for" the Master boot record (MBR), instead of the traditional 63 sectors (31.5 KiB). Note that the MBR is only one sector in size, but many software packages use these 63 sectors of "free space" (or any "free space" preceding the partition) for their purposes. 63 sectors is the minimum space that should be reserved for the MBR or an Extended Boot Record(EBR).
- What this means is that, if there were no partitions on a disk when it was booted, a partition was created using standard CHS geometry (as would be used by most partition editors such as DOS fdisk, Linux fdisk, Ranish Partition Manager, or an XP installation disk), and this partition was created at the start of the disk, then the partition will start on the 2nd head. The partition could not begin at the first sector because the MBR located there, so instead it starts the partition on the second head. When primary partitions are created anywhere else (following typical CHS geometry alignment) they start at the beginning of a cylinder.
- If a computer is booted with no partitions defined, and the first partition is created with the Vista installation disk, it will instead use the 1-MiB alignment. (The partitioner on the Vista installation disk follows the 1-MiB alignment just as Vista Disk Management does.) By following a 1-MiB alignment, all partitions will have an even numbered offset (so long as no other partitioner is used on the drive).
- Using a 1-MiB alignment boundary allows safer editing of the partition table with Vista Disk Management.
- Partition tables using a CHS geometry (or some mix of alignments) may prevent Vista from resizing partitions or it may produce unconventional partition tables. For example, the endings of the "EBR extended partitions" (type 0x05) may overlap other partitions, and it will leave unprecedented amounts of space between an extended boot record and its logical drive. Ranish Partition Manager does not show an error if there are more than 63 sectors between the EBR and its logical volume, so long as the EBRs and VBRs are on the first sector of any track (head). If either the VBR or the EBR are not on the first sector of a head, Ranish Partition Manager shows the "partition" in red and when the partition is highlighted, this error message appears: "Boot sector doesn't have valid information". Using the 1-MiB alignment boundary will not put VBRs or EBRs on the first sector of a track (according to any standard CHS geometry) and Vista Disk Management will not use the CHS geometry of a partition table created with a different partition editor.
- A disk that is solely partitioned with Vista Disk Management can create partitions in exact MiB sizes and never leave leftover bits of space between partitions.
- With Vista DM, all the logical drives besides the one nearest the beginning of the extended partition (type 0x0F), usually reserve exactly one additional MiB, for an extended boot record, instead of the 63 sectors (31.5 KiB) that is most commonly reserved according to alignments based on a CHS geometry. If other partition editors are used on the disk then Vista DM may reserve different amounts of space for the EBRs.
General recommendation to work on drives and partitions only after prior backing up should be strongly obeyed.
The function delete partition works without any prior confirmation on impact for other partitions and may destroy other partitions without prior notice. This function is recommended to be ignored as far as no backup is available. Other vendors' solutions provide protection for other partitions.
Incorrectly displaying partition tables
Vista and Windows 7 Disk Management may incorrectly display logical drives as primary partitions, particularly when they are not labeled (or formatted?) as NTFS or FAT  (see section "You may see several primary partitions on a drive").
- Logical volume management
- Storage virtualization
- Logical Volume Manager (Linux) (LVM)
- List of Microsoft Windows components
- "Virtual Disk Service is transitioning to Windows Storage Management API (Windows)". Microsoft MSDN.
- "How Basic Disks work". Microsoft TechNet.
- "Windows Vista support for large-sector hard disk drives". Retrieved 2007-10-08.
- "How Dynamic Disks and Volumes Work". Microsoft TechNet.
- "BVERITAS Storage Foundation for Windows: The Dynamic Disk Advantage - Comparing Dynamic Disks to Basic Disks". Symantec. Archived from the original on 2012-05-29.
- "Veritas Storage Foundation for Windows by Symantec (PDF)". Symantec.
- "Basic and Dynamic Disks". Microsoft MSDN.
- "Dynamic vs. Basic Storage in Windows 2000". Microsoft Support.
- "Vista's New Partitioning Rules". Multibooters Dual and Multibooting with Vista. (Source is questionable. There is some confusion on this source page, which is clarified here.)
- "The case of the disappearing partitions". Vista Information.
- "You cannot install Windows XP successfully after you use Windows Vista or Windows PE 2.0 to create partitions on a hard disk". Microsoft Support. July 23, 2009.
- "You cannot install Windows Server 2003 successfully after you use Windows Vista or Windows PE 2.0 to create partitions on a hard disk". Microsoft Support. August 14, 2009.
- "Vista's New Partitioning Rules". Multibooters Dual and Multibooting with Vista.
- "Windows Vista support for large-sector hard disk drives". Microsoft Support. May 29, 2007.
- Captive-NTFS Logical Disk Manager FAQ
- Comparison matrix of Windows LDM and Veritas Volume Manager
- libldm — LGPL library for reading Windows LDM on Linux