LDMTOOL(1)
β¨ LDMTOOL(1) β¨
okay so bestie, welcome to the ldmtool page β yes that's LDMTOOL(1) if you're being formal, it's from the User Commands corner of the manual, and honestly? it's giving "I speak fluent Microsoft Windows dynamic disk" and I'm obsessed. sit down, grab a strawberry π, let's get into it.
π NAME π
ldmtool β a tool to manage Microsoft Windows dynamic disks. periodt.
π SYNOPSIS π
like, here's every single way you can call her:
ldmtool [options]
ldmtool [options] scan [device...]
ldmtool [options] show diskgroup {disk group GUID}
ldmtool [options] show {volume | partition | disk} {disk group GUID}
{object name}
ldmtool [options] {create | remove} all
ldmtool [options] {create | remove} volume {disk group GUID}
{volume name}
π OPTIONS π
-d|--device deviceβ automatically scan device. like, just go ahead and check it for you, no extra steps β¨--uuid_override uuidβ you hand it your own UUID to use with device mapper. β οΈ but lowkey listen: this can only be used in single action mode, and only for a single volume. no cap, that's the whole rule.
π¦ DESCRIPTION π¦
so ldmtool is the tool for managing Microsoft Windows dynamic disks β the ones that use Microsoft's LDM metadata. she can inspect them π, and she can also create and remove the device-mapper block devices that you can actually mount. iconic behavior.
okay but here's the reality check: even though you can mount a filesystem read-write and modify its contents, ldmtool cannot modify the LDM metadata itself. like, at all. so it can't create, remove or edit dynamic disks. that's just not her job and she's not sorry π
she also can't mount RAID5 volumes that have a partition missing β though she can mount mirrored volumes with a partition missing. but fr fr, mounting a volume with a missing partition is not recommended, because ldmtool does not update the LDM metadata in any way. which means Windows will have no way to determine that the partitions are not synchronised when it subsequently mounts β and that may result in corruption. π so like, don't do that. please.
πΈ INVOCATION πΈ
ldmtool can be invoked either as a shell to run multiple actions, or to run a single action and return. if an action is given on the command line, it runs in single action mode. if no action is given, she launches a shell. cute, right?
π§ Shell mode
when invoked as a shell, ldmtool will not scan any block devices by default. if any block devices are given on the command line with the -d option, those get scanned. otherwise, block devices must be scanned explicitly with the scan action.
exit shell mode by sending an EOF, or with the quit or exit actions. bye bestie π
β Single action mode
when invoked to run a single action, all block devices will be scanned by default. in this case, if any block devices are specified with the -d option, only those block devices will be scanned.
π RESULTS π
ldmtool returns results as JSON-formatted data. the precise data returned is described in detail below. if a command fails it will not return any JSON data β instead it displays an error message. π
in shell mode, failure can be detected by the lack of a JSON-formatted result. in single action mode the caller can additionally check the exit code of the command. iykyk.
π ACTIONS π
π scan [device...]
scan all [device]s for LDM metadata.
returns a list of all known disk group GUIDs. note that it doesn't just return newly discovered disk groups β it's the whole roster, main character energy.
π show diskgroup {GUID}
return detailed information about a single disk group.
returns:
nameβ the human-readable name of the disk groupguidβ the Windows-assigned GUID of the disk groupvolumesβ a list of the names of all volumes in the disk groupdisksβ a list of the name of all disks in the disk group
π show volume {disk group GUID} {volume name}
return detailed information about a volume.
returns:
nameβ the name of the volumeguidβ the Windows-assigned GUID of the volumetypeβ the volume type. one of:simple,spanned,striped,mirrored,raid5sizeβ the size of the volume in sectorschunk-sizeβ the chunk size, in sectors, used bystripedandraid5volumes. for other volume types it will be0.hintβ the volume mounting hint. this value specifies how Windows expects the volume to be mounted. for a volume with an assigned drive letter, it might be'E:'.deviceβ the host device-mapper device which was created for this volume if any (e.g./dev/mapper/ldm_vol_Machine-Dg0_Volume1)partitionsβ a list of the names of the partitions which constitute this volume.
π show partition {disk group GUID} {partition name}
return detailed information about a partition.
returns:
nameβ the name of the partitionstartβ the offset, in sectors, of the start of the partition from the beginning of the disksizeβ the size of the partition in sectorsdiskβ the name of the disk the partition is on
π show disk {disk group GUID} {disk name}
return detailed information about a disk.
returns:
nameβ the human-readable name of the diskguidβ the GUID of the diskpresentβ whether the disk has been discovered during scanning:trueorfalse
if the disk is present, additionally returns:
deviceβ the name of the host device (e.g./dev/sda)data-startβ the start sector of the data portion of the diskdata-sizeβ the size, in sectors, of the data portion of the diskmetadata-startβ the start sector of the metadata portion of the diskmetadata-sizeβ the size, in sectors, of the metadata portion of the disk
π create {volume { disk group GUID } { volume name } | all}
create a device-mapper device for either the specified volume or all volumes in all detected disk groups.
returns a list of the device-mapper device names which were created by this action. note that if a device already existed for a volume, it will not be returned in this list. π
π remove {volume { disk group GUID } { volume name } | all}
remove device-mapper devices for either the specified volume or all volumes in all detected disk groups.
returns a list of the device-mapper device names which were removed by this action. note that if no device existed for a volume, it will not be returned in this list.
π₯ EXAMPLES π₯
these examples form a sequence from a single session of ldmtool running in shell mode. slay.
scan all loop devices for LDM metadata:
ldm> scan /dev/loop[0-9]*
[
"03c0c4fc-8b6f-402b-9431-4be2e5823b1c",
"06495a84-fbfd-11e1-8cf9-52540061f5db"
]
two disk groups were detected. the list contains their GUIDs. π
show detailed information about one of the disk groups:
ldm> show diskgroup 06495a84-fbfd-11e1-8cf9-52540061f5db
{
"name" : "WIN-ERRDJSBDAVF-Dg0",
"guid" : "06495a84-fbfd-11e1-8cf9-52540061f5db",
"volumes" : [
"Volume4",
"Volume1",
"Volume2",
"Volume3",
"Volume5"
],
"disks" : [
"Disk1",
"Disk2",
"Disk3",
"Disk4",
"Disk5",
"Disk6",
"Disk7",
"Disk8",
"Disk9"
]
}
show detailed information about one of the volumes in the disk group:
ldm> show volume 06495a84-fbfd-11e1-8cf9-52540061f5db Volume1
{
"name" : "Volume1",
"guid" : "c08309e9-1d30-43e5-8dc3-fcec8be76fcc",
"type" : "spanned",
"size" : 129024,
"chunk-size" : 0,
"hint" : "E:",
"device" : "ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume1",
"partitions" : [
"Disk1-01",
"Disk2-01"
]
}
show detailed information about one of the partitions in the volume:
ldm> show partition 06495a84-fbfd-11e1-8cf9-52540061f5db Disk1-01
{
"name" : "Disk1-01",
"start" : 65,
"size" : 96256,
"disk" : "Disk1"
}
show detailed information about the disk containing the partition:
ldm> show disk 06495a84-fbfd-11e1-8cf9-52540061f5db Disk1
{
"name" : "Disk1",
"guid" : "06495a85-fbfd-11e1-8cf9-52540061f5db",
"present" : true,
"device" : "/dev/loop15",
"data-start" : 63,
"data-size" : 100289,
"metadata-start" : 100352,
"metadata-size" : 2048
}
create a device-mapper device for a volume:
ldm> create volume 06495a84-fbfd-11e1-8cf9-52540061f5db Volume1
[
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume1"
]
a new device-mapper device has been created, called ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume1. depending on how udev is configured, it will probably now be available as /dev/mapper/ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume1. π«Ά
β οΈ note that the returned name of the created device-mapper device is unmangled and thus can contain not-whitelisted characters. user-space device-mapper tools (likedmsetup) and thelibdevmapperlibrary accept unmangled names (if properly configured) but take extra care composing the path to a created device yourself. consider using the"device"field of theshow volumecommand output. bestie, seriously, use the field, don't hand-roll the path π
create device-mapper devices for all volumes in both disk groups:
ldm> create all
[
"ldm_vol_Red-nzv8x6obywgDg0_Volume2",
"ldm_vol_Red-nzv8x6obywgDg0_Volume1",
"ldm_vol_Red-nzv8x6obywgDg0_Volume4",
"ldm_vol_Red-nzv8x6obywgDg0_Stripe1",
"ldm_vol_Red-nzv8x6obywgDg0_Raid1",
"ldm_vol_Red-nzv8x6obywgDg0_Volume3",
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume4",
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume2",
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume3",
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume5"
]
note that ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume1 is not in the list of devices which were created, as it already existed. she's been here, she's booked and busy π
remove the device-mapper device for a single volume:
ldm> remove volume 06495a84-fbfd-11e1-8cf9-52540061f5db Volume2
[
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume2"
]
ldm> remove all
[
"ldm_vol_Red-nzv8x6obywgDg0_Volume2",
"ldm_vol_Red-nzv8x6obywgDg0_Volume1",
"ldm_vol_Red-nzv8x6obywgDg0_Volume4",
"ldm_vol_Red-nzv8x6obywgDg0_Stripe1",
"ldm_vol_Red-nzv8x6obywgDg0_Raid1",
"ldm_vol_Red-nzv8x6obywgDg0_Volume3",
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume4",
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume1",
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume3",
"ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume5"
]
note that ldm_vol_WIN-ERRDJSBDAVF-Dg0_Volume2 is not in the list of devices which were removed, as it was removed previously. gone already, diva πΈ
π AUTHOR π
Matthew Booth <mbooth@redhat.com> β thank you king, we stan π
β¨ and that's the whole page, bestie β¨ this was ldmtool from the LDMTOOL(1) manual, dated 06/25/2025, and it ate, no crumbs left πππ¦
π¦ where this page comes from
- opensuse-leap 16.0: ldmtool 0.2.5-160000.2.2 Β· GPL-3.0-only
- opensuse-leap 16.0: ldmtool 0.2.5-160000.2.2 Β· GPL-3.0-only
- opensuse-leap 16.0: ldmtool 0.2.5-160000.2.2 Β· GPL-3.0-only
- opensuse-leap 16.0: ldmtool 0.2.5-160000.2.2 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms