xref: /linux/Documentation/admin-guide/ldm.rst (revision e65e175b07bef5974045cc42238de99057669ca7)
1==========================================
2LDM - Logical Disk Manager (Dynamic Disks)
3==========================================
4
5:Author: Originally Written by FlatCap - Richard Russon <ldm@flatcap.org>.
6:Last Updated: Anton Altaparmakov on 30 March 2007 for Windows Vista.
7
8Overview
9--------
10
11Windows 2000, XP, and Vista use a new partitioning scheme.  It is a complete
12replacement for the MSDOS style partitions.  It stores its information in a
131MiB journalled database at the end of the physical disk.  The size of
14partitions is limited only by disk space.  The maximum number of partitions is
15nearly 2000.
16
17Any partitions created under the LDM are called "Dynamic Disks".  There are no
18longer any primary or extended partitions.  Normal MSDOS style partitions are
19now known as Basic Disks.
20
21If you wish to use Spanned, Striped, Mirrored or RAID 5 Volumes, you must use
22Dynamic Disks.  The journalling allows Windows to make changes to these
23partitions and filesystems without the need to reboot.
24
25Once the LDM driver has divided up the disk, you can use the MD driver to
26assemble any multi-partition volumes, e.g.  Stripes, RAID5.
27
28To prevent legacy applications from repartitioning the disk, the LDM creates a
29dummy MSDOS partition containing one disk-sized partition.  This is what is
30supported with the Linux LDM driver.
31
32A newer approach that has been implemented with Vista is to put LDM on top of a
33GPT label disk.  This is not supported by the Linux LDM driver yet.
34
35
36Example
37-------
38
39Below we have a 50MiB disk, divided into seven partitions.
40
41.. note::
42
43   The missing 1MiB at the end of the disk is where the LDM database is
44   stored.
45
46+-------++--------------+---------+-----++--------------+---------+----+
47|Device || Offset Bytes | Sectors | MiB || Size   Bytes | Sectors | MiB|
48+=======++==============+=========+=====++==============+=========+====+
49|hda    ||            0 |       0 |   0 ||     52428800 |  102400 |  50|
50+-------++--------------+---------+-----++--------------+---------+----+
51|hda1   ||     51380224 |  100352 |  49 ||      1048576 |    2048 |   1|
52+-------++--------------+---------+-----++--------------+---------+----+
53|hda2   ||        16384 |      32 |   0 ||      6979584 |   13632 |   6|
54+-------++--------------+---------+-----++--------------+---------+----+
55|hda3   ||      6995968 |   13664 |   6 ||     10485760 |   20480 |  10|
56+-------++--------------+---------+-----++--------------+---------+----+
57|hda4   ||     17481728 |   34144 |  16 ||      4194304 |    8192 |   4|
58+-------++--------------+---------+-----++--------------+---------+----+
59|hda5   ||     21676032 |   42336 |  20 ||      5242880 |   10240 |   5|
60+-------++--------------+---------+-----++--------------+---------+----+
61|hda6   ||     26918912 |   52576 |  25 ||     10485760 |   20480 |  10|
62+-------++--------------+---------+-----++--------------+---------+----+
63|hda7   ||     37404672 |   73056 |  35 ||     13959168 |   27264 |  13|
64+-------++--------------+---------+-----++--------------+---------+----+
65
66The LDM Database may not store the partitions in the order that they appear on
67disk, but the driver will sort them.
68
69When Linux boots, you will see something like::
70
71  hda: 102400 sectors w/32KiB Cache, CHS=50/64/32
72  hda: [LDM] hda1 hda2 hda3 hda4 hda5 hda6 hda7
73
74
75Compiling LDM Support
76---------------------
77
78To enable LDM, choose the following two options:
79
80  - "Advanced partition selection" CONFIG_PARTITION_ADVANCED
81  - "Windows Logical Disk Manager (Dynamic Disk) support" CONFIG_LDM_PARTITION
82
83If you believe the driver isn't working as it should, you can enable the extra
84debugging code.  This will produce a LOT of output.  The option is:
85
86  - "Windows LDM extra logging" CONFIG_LDM_DEBUG
87
88N.B. The partition code cannot be compiled as a module.
89
90As with all the partition code, if the driver doesn't see signs of its type of
91partition, it will pass control to another driver, so there is no harm in
92enabling it.
93
94If you have Dynamic Disks but don't enable the driver, then all you will see
95is a dummy MSDOS partition filling the whole disk.  You won't be able to mount
96any of the volumes on the disk.
97
98
99Booting
100-------
101
102If you enable LDM support, then lilo is capable of booting from any of the
103discovered partitions.  However, grub does not understand the LDM partitioning
104and cannot boot from a Dynamic Disk.
105
106
107More Documentation
108------------------
109
110There is an Overview of the LDM together with complete Technical Documentation.
111It is available for download.
112
113  http://www.linux-ntfs.org/
114
115If you have any LDM questions that aren't answered in the documentation, email
116me.
117
118Cheers,
119    FlatCap - Richard Russon
120    ldm@flatcap.org
121
122