[RFC, RFT] LDM support (aka Windows Dynamic Volumes)

Andrey V. Elsukov bu7cher at yandex.ru
Sun Mar 11 09:35:33 UTC 2012


Hi, All

i wrote GEOM_PART_LDM class. It provides basic support of Logical Disk Manager
partitioning scheme [1]. Since LDM metadata is not documented i used several
articles found in the web and linux implementation as reference [2].
Only generic volumes is supported. Spanned, striped and raid5
configurations aren't implemented. Mirrored volumes also are not shown by default,
but they can be accessed when kern.geom.part.ldm.show_mirrors=1 (by your own risk).

Currently only LDM on top of MBR is supported. Also only "gpart destroy" is allowed
with LDM scheme.

you can compile class without patching, the source code is here:
http://people.freebsd.org/~ae/LDM/

[1] http://en.wikipedia.org/wiki/Logical_Disk_Manager
[2] http://fxr.watson.org/fxr/source/fs/partitions/?v=linux-2.6

Example:
/* da1 and da2 disks without geom_part_ldm module */
# gpart show da1 da2
=>       63  104857537  da1  MBR  (50G)
         63       1985    1  ms-ldm-data  (992k)
       2048     204800    2  ms-ldm-data  [active]  (100M)
     206848  104648704    3  ms-ldm-data  (49G)
  104855552       2048       - free -  (1.0M)

=>     32  2097120  da2  MBR  (1.0G)
       32       31       - free -  (15k)
       63  2095041    1  ms-ldm-data  (1G)
  2095104     2048       - free -  (1.0M)

# kldload ./geom_part_ldm.ko
# gpart show da1 da2
=>       63  104855489  da1  LDM  (50G)
         63       1985       - free -  (992k)
       2048     204800    1  ntfs  (100M)
     206848  104648704    2  ntfs  (49G)

=>     63  2095041  da2  LDM  (1.0G)
       63       65       - free -  (32k)
      128  1024000    1  ntfs  (500M)
  1024128  1067008    2  ntfs  (521M)
  2091136     3968       - free -  (2M)

-- 
WBR, Andrey V. Elsukov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120311/0e27cd27/signature.pgp


More information about the freebsd-current mailing list