Windows Dynamic Disk and Systemd

If you are running Windows formatted dynamic disk, you will need to setup a tool to make that available in Linux: ldmtool

For Arch users use this guide:

ldmtool is in the AUR repo: ldmtool

You need to install gtk-doc and json-glib via pacman

sudo pacman -S gtk-doc json-glib

now you can download, extract and compile ldmtool

wget https://aur.archlinux.org/packages/ld/ldmtool/ldmtool.tar.gz
 tar -xvf ldmtool.tar.gz
 cd ldmtool
 makepkg -si

 

For Fedora uses, the package: libldm has to be installed.

sudo dnf install libldm

 

Now that you have got ldmtool installed, find you disk/array with by scanning:

sudo ldmtool scan
sudo ldmtool show diskgroup 2a343e-6790-11e4-8266-fd555999 (replace with own group id)
sudo ldmtool create all

Now open your filebrowser and enjoy your newly found drive

To enable this action on bootup create this script:

/etc/systemd/system/ldmtool.service

[Unit]
Description= Windows Dynamic Disk LDMtool
After=network.target
[Service]
Type=forking
User=root
ExecStart=/usr/local/bin/ldmtool create all
[Install]
WantedBy=multi-user.target

Enable script at next boot with the command:

sudo systemctl enable ldmtool.service

/etc/systemd/system/mounts.service

[Unit]
Description= Windows Dynamic Disk Mounter
After=network.target
[Service]
Type=forking
User=thor
ExecStart=/home/thor/.config/fsmount.sh
[Install]
WantedBy=multi-user.target
sudo systemctl enable mounts.service

Create a shell script with actual command to enable desired mounts.

 

/home/thor/.config/fsmount.sh

#!/usr/bin/sh

sudo ntfs-3g /dev/disk/by-label/Gamedisk /home/thor/Gamedisk

Add lines with the desired disk-label ids, without being prompted for password.

nano /etc/sudoers

thor ALL= (root) NOPASSWD: /usr/bin/ntfs-3g /dev/disk/by-label/Gamedisk /home/thor/Gamedisk