Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Mar 2012 13:35:24 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        freebsd-current <freebsd-current@freebsd.org>,  freebsd-geom@FreeBSD.org
Subject:   [RFC, RFT] LDM support (aka Windows Dynamic Volumes)
Message-ID:  <4F5C71DC.3010203@yandex.ru>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iQEcBAEBAgAGBQJPXHHhAAoJEAHF6gQQyKF6BIIH/1Rq30YX83eR+4+1i4IRYF8I
BBAsMEblYUArNkNJ+tE+El0sxSDHHYAVusR54+jTpXw8/EjHbrjaEppF+6yZZcNg
kGMZo7wiHg5ajJynjR2OritM/qP+8a4Rs1koOkVeOT1UBsOcE299JtAa5REDWkxl
CKbu60KSm8M3xCE8/BqfRqLTk7VVGPzItRUJqkGsESph73rlAeG2ju873JlBcmDa
bltifVx4DB19ZH7NbuelAgT8XY5RRw6593B6q3/ip8/j1mnSV/z3rgCuyfDbLrpc
GhgT0U7vsFJWaU3I+yeu6RDeTVSm5K2uifK5nzFMWvUn8W3d+n87nR4I4+kcivo=
=/jHf
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F5C71DC.3010203>