LDM FAQ

(Windows Dynamic Disks - Frequently Asked Questions)

This FAQ is part of the Linux NTFS Project.
The latest version can be found online at
ldm.html

If you have an LDM question that isn't answered in this FAQ, or you have comments about the FAQ, please email me: rich@flatcap.org

Key

** - Most frequently asked questions
!! - Other interesting bits
NB - Note carefully

 Commands or output
todo - under construction? todo - m$ evil destroy non-ntfs/fat partitions todo - convert to/from ldm/dynamic disks

Contents

1. General LDM Questions

  1.1 What is the LDM?
  1.2 Why is it so good?
  1.3 Why should I use LDM?
  1.4 Who designed the LDM?
  1.5 Which operating systems use it?

2. Linux-LDM Questions

  2.1 Can Linux understand LDM?
  2.2 Which version of the driver do I have?
  2.3 What the difference between the two drivers?
  2.4 What about Spanned Volumes? Stripes? Mirrors? RAID5?
  2.5 Which Linux Distros Support LDM?
  2.6 How was the driver written?
  2.7 Where is the LDM Documented?
  2.8 Who do we thank?

3. LDM Development

  3.1 Can Linux edit LDM Partitions?
  3.2 Are there any tools for LDM?
  3.3 When will there be some tools LDM?

4. HOWTO Mount an LDM Volume

  4.1 Kernel Support
  4.2 ldminfo
  4.3 /etc/raidtab
  4.4 mount

Back to the top


1. General LDM Questions

1.1 What is the LDM?

The Logical Disk Manager (LDM) is a blanket term for a new way of partitioning a disk. The LDM controls Windows Dynamic Disks which support spanned, striped, mirrored and RAID5 volumes. The LDM stores its information in a database at the end of each physical disk.

The LDM was introduced in Windows 2000. Before that, Windows NT used volume sets, which stored their information in the registry.

Back to the top

1.2 Why is it so good?

To see why the LDM is so good, it's necessary to look at what was wrong the old method of partitioning disks. todo

The LDM is basically without limits. The old method of partitioning a disk was very limited. It has limits on its size and the geometry of the disk affected the partitions. For a brief history of partitioning, see the LDM Documentation.

limits, complicated, extendable, journalled (reliable), all on disk

Back to the top

1.3 Why should I use LDM?

TODO

Back to the top

1.4 Who designed the LDM?

TODO

Back to the top

1.5 Which operating systems use it?

TODO

Back to the top


2. Linux-LDM Questions

2.1 Can Linux understand LDM?

Yes. The LDM driver was accepted into the Linux Kernel (2.4.8) in August 2001. That driver has now been rewritten from scratch.

Back to the top

2.2 Which version of the driver do I have?

The simplest way to decide is to find out which Linux Kernel version you have. Run the command:

    uname -r
    
Kernel VersionLDM Driver
2.4.8 - 2.4.19old
2.4.20+new
2.5.0 - 2.5.28old
2.5.29+new
TODO - partition check [LDM] (same division)

Back to the top

2.3 What the difference between the two drivers?

The old driver was rather crude. It allocated a lot of memory todo

Back to the top

2.4 What about Spanned Volumes? Stripes? Mirrors? RAID5?

TODO

Back to the top

2.5 Which Linux Distros Support LDM?

At the moment, only Mandrake installs a kernel that supports LDM, though the installer doesn't understand LDM. The kernel they use has the old driver.

Back to the top

2.6 How was the driver written?

Neither Veritas nor Microsoft have released any documentation about the internals of the LDM, so we had to reverse engineer the database from scratch. The method was roughly:

  1. Look at the volume with a hex editor
  2. Perform some operation, e.g. create a partition
  3. Use the hex editor to look for changes
  4. Classify and document the changes
  5. Repeat steps 1-4 forever

If this sounds like a lot of work, then you probably understand how hard the task has been. We now understand pretty much everything about the LDM database.

Actually writing the driver was far simpler than gathering the information.

Back to the top

2.7 Where is the LDM Documented?

As we reverse engineered the database, we documented everything. The docs are available online at: ../ldm/index.html or for download at: ../downloads.html

The docs contain a high-level overview and a complete technical breakdown.

Back to the top

2.8 Who do we thank?

The LDM Driver was written by Richard Russon (FlatCap) in 2001. He has been helped by: Anton Altaparmakov and Jakob Kemi. The driver was added to the Linux Kernel in August 2001 (2.4.8).

Back to the top


3. LDM Development

3.1 Can Linux edit LDM Partitions?

Jakob Kemi has written a tool, ldmtool, to edit the partition types of LDM partition, but it can't edit anything else. The source is available in our bitkeeper respository or from our download page.

Back to the top

3.2 Are there any tools for LDM?

There are two: ldmtool, above, and ldminfo. ldminfo simply dumps the contents of an LDM database in a human-readable format. It's more of a debugging aid, than a useful utility.

Back to the top

3.3 When will there be some tools LDM?

No time soon. The LDM Driver was written for fun and there seems to be very little demand for it. As such the author will fix any bugs but is reluctant to put much more work into it.

The LDM is comprehensively documented and the author is happy to help anyone if they wish to write some utilities.

Back to the top


4. HOWTO Mount an LDM Volume

4.1 Kernel Support

TODO

Back to the top

4.2 ldminfo

TODO

Back to the top

4.3 /etc/raidtab

TODO http://tldp.org/HOWTO/Software-RAID-HOWTO.html

    raiddev /dev/md0
            raid-level              5
            nr-raid-disks           3
            chunk-size              16k
            persistent-superblock   0
            device                  /dev/hdb1
            raid-disk               0
            device                  /dev/hdc1
            raid-disk               1
            device                  /dev/hdd1
            raid-disk               2
    

Back to the top

4.4 mount

TODO

Back to the top