Several years back I was helping a friend to install a dual boot system on his new laptop (happening Nth time). After starting installation I was unpleasantly surprised when I realized that his HDD was partitioned in a way unfamiliar to me; partitions were designated as “dynamic volumes”. Linux at hand was unable to use HDD partitioned in such a way which ultimately lead to tedious backup of the data and to reformatting of a whole drive (back to basic partitions or regular primary/extended partitions and logical drives we all are accustomed to).
So what was the deal there?
It turns out that since Windows 2000 Microsoft introduced a new way for partitioning called LDM (Logical Disk Manager) with volumes organized as Dynamic Disks. There were several concepts in place:
- one was to have a journaling system that will enable Windows to manage disks without the constant need for rebooting the machine;
- with dynamic disks there is a possibility for one partition to span more than one physical HDD;
- another one is to have software control over RAID functions;
- number of available partitions is very high – 2000, although MS recommended 32 (in contrast to, for example, just 4 available primary partitions)
Apart from partition table from MBR (information about the drive stored in a first block of the each HDD), dynamic disks are dependent on a hidden database which is stored in the last 1M of the HDD (so called LDM database) which holds the information about the HDD it is sitting on and about all present dynamic disks in a system as well.
It all seems nice on paper but in reality it was less than ideal:
- not all Windows versions supported all the features of dynamic disks (Fig 1.);
- only one operating system can manage HDD with dynamic disks (or to be precise only one Windows);
- switching from dynamic disks back to basic partitioning is possible through reformatting of the HDD which is detrimental for any data located on it (so backup is necessary), though there are payable 3rd party solutions for switching (possibly avoiding data loss);
- such volumes made it extremely difficult to extract the data if OS or part of HDD become compromised (because it is highly dependent on the system). Basically only simple disks are recoverable and that beats the purpose of introducing dynamic disk in the first place.
Handling by penguins
Considering that dynamic disks functioned solely under Windows and that any kind of dual boot was impossible, Linux community was slow in introducing solutions for managing them. First drivers were introduced in kernel 2.5.0 but they were highly inefficient (large memory usage).
Luckily, after a nearly decade tool for mapping Dynamic Disks is available through official repositories (
ldmtool <https://packages.debian.org/jessie/otherosfs/ldmtool>_ ) which makes it available to map a drive and be able to mount it afterwords (although an advance level of linux systems knowledge is necessary).
It can be run in a single command mode (if you invoke it with arguments) or in a shell mode (if no arguments are passed). Creating mountable volumes from Dynamic Disks can be brought down to two commands (shell mode):
# ldmtool ldm> scan all [<list of Dynamic Disk volumes>] ldm> create all [<list of mountable names>]
After exiting ldmtool shell mode, usually you can proceed mounting them as:
mount /dev/mapper/<volume_name> /mnt/target_location
Fallacies and low acceptance of the community ultimately lead to Microsoft (thankfully) declaring Dynamic Disks deprecated.
How can you come accross Dynamic Volumes these days?
- If the new computer already arived with them (I’ve seen a few partitioned in such a way, usually custom built machines);
- When there are already 4 primary partitions and user in Windows wants to make a new partition (famous D:\ partition) – user will be given an option to switch to Dynamic Volumes to be able to have another partition available. This switch is made all too easy…