# Accessing ms-ldm-data partitions



## balanga (Mar 16, 2017)

How should I go about mounting partitions of type ms-ldm-data, rawtype 66  ?


----------



## balanga (Mar 17, 2017)

Using HDT   :-

v0.4.1 - shows the partitions as 'Linux swap (sharing disk with DR' 
v0.5.2 - shows the partitions as 'SFS (Secure Filesystem)' 

so there's some doubt about what the filesystem is...


----------



## SirDice (Mar 17, 2017)

I _think_ (not sure, can't confirm) ms-ldm-data is a dynamic drive but it could also be storage space.

https://technet.microsoft.com/en-us/library/cc737048.aspx
https://support.microsoft.com/en-us/help/12438/windows-10-storage-spaces

The most probable one appears to be dynamic drive or volume:


> On GPT disks, the database is contained in a 1-MB reserved (hidden) partition known as the Logical Disk Manager (LDM) Metadata partition.



It's the only one with references to Logical Disk Manager (LDM).


----------



## balanga (Mar 17, 2017)

I guess FreeBSD is unable to mount such a partition....


----------



## chuvy (Mar 14, 2018)

Hello,

If any need,


> geom_part_ldm_load="YES" in /boot/loader.conf


or compile `options         GEOM_PART_LDM` in the kernel.
After the installation of the custom kernel in the /dev/ were found device with Name like in the glabel:

```
fbsd  ➜  ~ » glabel list ada1p3s1
Geom name: ada1p3s1
Providers:
1. Name: ntfs/Media
   Mediasize: 499971522560 (466G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 135266304
   Mode: r1w0e0
   secoffset: 0
   offset: 0
   seclength: 976506880
   length: 499971522560
   index: 0
```

In my case the full path to the volume is /dev/ntfs/Media.
With *ntfs-3g* the volume was mounted successfully.

Regards.


----------



## tobik@ (Mar 14, 2018)

chuvy said:


> If any need, then must be "*options GEOM_PART_LDM*" in the kernel.
> After the installation of the custom kernel in the "*/dev/*" were found device with Name like in the glabel:


I don't think you need to recompile the kernel for this. Doesn't it work with geom_part_ldm_load="YES" in /boot/loader.conf?


----------



## chuvy (Mar 14, 2018)

> Doesn't it work with geom_part_ldm_load="YES" in /boot/loader.conf?



I already on the new kernel and no this option in the /boot/defaults/loader.conf


```
fbsd  ➜  ~ » grep ldm /boot/defaults/loader.conf
fbsd  ➜  ~ » uname -a
FreeBSD fbsd 11.1-RELEASE FreeBSD 11.1-RELEASE #0: Wed Mar 14 13:00:36 +07 2018     root@fbsd:/usr/obj/usr/src/sys/CSTM  amd64
```


----------



## SirDice (Mar 14, 2018)

Never edit /boot/defaults/loader.conf! Always put your changes in /boot/loader.conf.


----------



## chuvy (Mar 14, 2018)

> Never edit /boot/defaults/loader.conf!


Never touched.

But variant from *tobik@* also works well. Thanks.


----------



## sawdustdood (Aug 26, 2018)

Recently played with this and got it working.  A couple of things.  In order to mount a ms-ldm-data partition (mine was mirror set), yes, you have to load the geom.  This can be done in /boot/loader.conf at boot or via "geom part_ldm load".  After loading the geom, I had to delete and recreate the md (via mdconfig) then I could mount the slice (ntfs-3g /dev/mdXsY /ntfsmirror).


----------



## xirad (Apr 29, 2021)

sawdustdood said:


> Recently played with this and got it working.  A couple of things.  In order to mount a ms-ldm-data partition (mine was mirror set), yes, you have to load the geom.  This can be done in /boot/loader.conf at boot or via "geom part_ldm load".  After loading the geom, I had to delete and recreate the md (via mdconfig) then I could mount the slice (ntfs-3g /dev/mdXsY /ntfsmirror).


I stuck on "I had to delete and recreate the md (via mdconfig)". Could you please describe what have you done? I'm not able to remove md because it looks like not existing...


----------

