Documentation/admin-guide/ldm.rst

Source file repositories/reference/linux-study-clean/Documentation/admin-guide/ldm.rst

File Facts

System
Linux kernel
Corpus path
Documentation/admin-guide/ldm.rst
Extension
.rst
Size
4687 bytes
Lines
122
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

==========================================
LDM - Logical Disk Manager (Dynamic Disks)
==========================================

:Author: Originally Written by FlatCap - Richard Russon <ldm@flatcap.org>.
:Last Updated: Anton Altaparmakov on 30 March 2007 for Windows Vista.

Overview
--------

Windows 2000, XP, and Vista use a new partitioning scheme.  It is a complete
replacement for the MSDOS style partitions.  It stores its information in a
1MiB journalled database at the end of the physical disk.  The size of
partitions is limited only by disk space.  The maximum number of partitions is
nearly 2000.

Any partitions created under the LDM are called "Dynamic Disks".  There are no
longer any primary or extended partitions.  Normal MSDOS style partitions are
now known as Basic Disks.

If you wish to use Spanned, Striped, Mirrored or RAID 5 Volumes, you must use
Dynamic Disks.  The journalling allows Windows to make changes to these
partitions and filesystems without the need to reboot.

Once the LDM driver has divided up the disk, you can use the MD driver to
assemble any multi-partition volumes, e.g.  Stripes, RAID5.

To prevent legacy applications from repartitioning the disk, the LDM creates a
dummy MSDOS partition containing one disk-sized partition.  This is what is
supported with the Linux LDM driver.

A newer approach that has been implemented with Vista is to put LDM on top of a
GPT label disk.  This is not supported by the Linux LDM driver yet.


Example
-------

Below we have a 50MiB disk, divided into seven partitions.

.. note::

   The missing 1MiB at the end of the disk is where the LDM database is
   stored.

+-------++--------------+---------+-----++--------------+---------+----+
|Device || Offset Bytes | Sectors | MiB || Size   Bytes | Sectors | MiB|
+=======++==============+=========+=====++==============+=========+====+
|hda    ||            0 |       0 |   0 ||     52428800 |  102400 |  50|
+-------++--------------+---------+-----++--------------+---------+----+
|hda1   ||     51380224 |  100352 |  49 ||      1048576 |    2048 |   1|
+-------++--------------+---------+-----++--------------+---------+----+
|hda2   ||        16384 |      32 |   0 ||      6979584 |   13632 |   6|
+-------++--------------+---------+-----++--------------+---------+----+
|hda3   ||      6995968 |   13664 |   6 ||     10485760 |   20480 |  10|
+-------++--------------+---------+-----++--------------+---------+----+
|hda4   ||     17481728 |   34144 |  16 ||      4194304 |    8192 |   4|
+-------++--------------+---------+-----++--------------+---------+----+
|hda5   ||     21676032 |   42336 |  20 ||      5242880 |   10240 |   5|
+-------++--------------+---------+-----++--------------+---------+----+
|hda6   ||     26918912 |   52576 |  25 ||     10485760 |   20480 |  10|
+-------++--------------+---------+-----++--------------+---------+----+
|hda7   ||     37404672 |   73056 |  35 ||     13959168 |   27264 |  13|
+-------++--------------+---------+-----++--------------+---------+----+

The LDM Database may not store the partitions in the order that they appear on
disk, but the driver will sort them.

When Linux boots, you will see something like::

Annotation

Implementation Notes