Back to home page

OSCL-LXR

 
 

    


0001 ==========================================
0002 LDM - Logical Disk Manager (Dynamic Disks)
0003 ==========================================
0004 
0005 :Author: Originally Written by FlatCap - Richard Russon <ldm@flatcap.org>.
0006 :Last Updated: Anton Altaparmakov on 30 March 2007 for Windows Vista.
0007 
0008 Overview
0009 --------
0010 
0011 Windows 2000, XP, and Vista use a new partitioning scheme.  It is a complete
0012 replacement for the MSDOS style partitions.  It stores its information in a
0013 1MiB journalled database at the end of the physical disk.  The size of
0014 partitions is limited only by disk space.  The maximum number of partitions is
0015 nearly 2000.
0016 
0017 Any partitions created under the LDM are called "Dynamic Disks".  There are no
0018 longer any primary or extended partitions.  Normal MSDOS style partitions are
0019 now known as Basic Disks.
0020 
0021 If you wish to use Spanned, Striped, Mirrored or RAID 5 Volumes, you must use
0022 Dynamic Disks.  The journalling allows Windows to make changes to these
0023 partitions and filesystems without the need to reboot.
0024 
0025 Once the LDM driver has divided up the disk, you can use the MD driver to
0026 assemble any multi-partition volumes, e.g.  Stripes, RAID5.
0027 
0028 To prevent legacy applications from repartitioning the disk, the LDM creates a
0029 dummy MSDOS partition containing one disk-sized partition.  This is what is
0030 supported with the Linux LDM driver.
0031 
0032 A newer approach that has been implemented with Vista is to put LDM on top of a
0033 GPT label disk.  This is not supported by the Linux LDM driver yet.
0034 
0035 
0036 Example
0037 -------
0038 
0039 Below we have a 50MiB disk, divided into seven partitions.
0040 
0041 .. note::
0042 
0043    The missing 1MiB at the end of the disk is where the LDM database is
0044    stored.
0045 
0046 +-------++--------------+---------+-----++--------------+---------+----+
0047 |Device || Offset Bytes | Sectors | MiB || Size   Bytes | Sectors | MiB|
0048 +=======++==============+=========+=====++==============+=========+====+
0049 |hda    ||            0 |       0 |   0 ||     52428800 |  102400 |  50|
0050 +-------++--------------+---------+-----++--------------+---------+----+
0051 |hda1   ||     51380224 |  100352 |  49 ||      1048576 |    2048 |   1|
0052 +-------++--------------+---------+-----++--------------+---------+----+
0053 |hda2   ||        16384 |      32 |   0 ||      6979584 |   13632 |   6|
0054 +-------++--------------+---------+-----++--------------+---------+----+
0055 |hda3   ||      6995968 |   13664 |   6 ||     10485760 |   20480 |  10|
0056 +-------++--------------+---------+-----++--------------+---------+----+
0057 |hda4   ||     17481728 |   34144 |  16 ||      4194304 |    8192 |   4|
0058 +-------++--------------+---------+-----++--------------+---------+----+
0059 |hda5   ||     21676032 |   42336 |  20 ||      5242880 |   10240 |   5|
0060 +-------++--------------+---------+-----++--------------+---------+----+
0061 |hda6   ||     26918912 |   52576 |  25 ||     10485760 |   20480 |  10|
0062 +-------++--------------+---------+-----++--------------+---------+----+
0063 |hda7   ||     37404672 |   73056 |  35 ||     13959168 |   27264 |  13|
0064 +-------++--------------+---------+-----++--------------+---------+----+
0065 
0066 The LDM Database may not store the partitions in the order that they appear on
0067 disk, but the driver will sort them.
0068 
0069 When Linux boots, you will see something like::
0070 
0071   hda: 102400 sectors w/32KiB Cache, CHS=50/64/32
0072   hda: [LDM] hda1 hda2 hda3 hda4 hda5 hda6 hda7
0073 
0074 
0075 Compiling LDM Support
0076 ---------------------
0077 
0078 To enable LDM, choose the following two options: 
0079 
0080   - "Advanced partition selection" CONFIG_PARTITION_ADVANCED
0081   - "Windows Logical Disk Manager (Dynamic Disk) support" CONFIG_LDM_PARTITION
0082 
0083 If you believe the driver isn't working as it should, you can enable the extra
0084 debugging code.  This will produce a LOT of output.  The option is:
0085 
0086   - "Windows LDM extra logging" CONFIG_LDM_DEBUG
0087 
0088 N.B. The partition code cannot be compiled as a module.
0089 
0090 As with all the partition code, if the driver doesn't see signs of its type of
0091 partition, it will pass control to another driver, so there is no harm in
0092 enabling it.
0093 
0094 If you have Dynamic Disks but don't enable the driver, then all you will see
0095 is a dummy MSDOS partition filling the whole disk.  You won't be able to mount
0096 any of the volumes on the disk.
0097 
0098 
0099 Booting
0100 -------
0101 
0102 If you enable LDM support, then lilo is capable of booting from any of the
0103 discovered partitions.  However, grub does not understand the LDM partitioning
0104 and cannot boot from a Dynamic Disk.
0105 
0106 
0107 More Documentation
0108 ------------------
0109 
0110 There is an Overview of the LDM together with complete Technical Documentation.
0111 It is available for download.
0112 
0113   http://www.linux-ntfs.org/
0114 
0115 If you have any LDM questions that aren't answered in the documentation, email
0116 me.
0117 
0118 Cheers,
0119     FlatCap - Richard Russon
0120     ldm@flatcap.org
0121