#110 Regex fixes for dm_mod

Steven Shiau

One of my systems has an OCZ RevoDrive in it (the 80GB model OCZSSDPX-1RVD0080), which uses a Silicon Image SiI 3124 controller with two 40GB SSD disks in a RAID 0 configuration.

I am attempting to use CloneZilla Live 1.2.8-42 in a PXE configuration in order to clone the 80GB RAID 0 disk. However, when CloneZilla Live starts up, it reads only the two 40GB disks that make up the "fakeraid" RAID 0 as /dev/sda and /dev/sdb. Of course, the partition structure and file systems are totally unreadable since accessing the members of the RAID 0 directly won't ever work properly.

I have found that running the command "modprobe dm_mod" will result in loading all the modules needed to access the 80GB RAID 0 disk at /dev/mapper/si* (disk) and /dev/mapper/si*1 (first partition) devices, or via the /dev/dm-0 (disk) and /dev/dm-1 (first partition).

So, in order to get dm_mod loaded when CloneZilla Live PXE starts, I've added the pxelinux.cfg/default APPEND option ocs_prerun="modprobe dm_mod" This allows me to start CloneZilla Live via PXE and instantly have access to the /dev/mapper/si* disk devices without having to manually drop to a shell and load this module by hand.

The next problem is that the multitude of scripts and functions contained beneath /opt/drbl/sbin all contain regular expressions designed to filter out /dev and /proc/partitions entries that to not start with a [hsv]. e.g.:

/opt/drbl/sbin/drbl-functions: disk_proc="$(LC_ALL=C awk '/[hsv]d[a-z]+($| )/ { print $4; }' /proc/partitions)"

Re-writing regular expressions like this:

/opt/drbl/sbin/drbl-functions: disk_proc="$(LC_ALL=C awk '/(dm-[0-9]+|[hsv]d[a-z]+)($| )/ { print $4; }' /proc/partitions)"

Allows some of the scripts to access the dm-* devices that make up the fakeraid device-mapper based disks.

It would greatly increase CloneZilla support of these fakeraid devices and therefore I suspect make a lot of people very happy if only we loaded dm_mod by default and adjusted the shell scripts' regular expressions so that we do not strip out the devices which do not conform to the /dev/sdx, /dev/hdx, or /dev/vdx standard.

I like CloneZilla very much as a project and would by thrilled if support for dm-* drives were made available. Even if these dm-* drives are not shown by default it would be great if there were at least an option to show these devices so that we could successfully clone our drives.

Thank you very much for your consideration and please let me know if you'd like to use my setup as a testing platform for potential fixes.

I may consider doing a mass-regex replace on the source files where the [hsv] character class shows up and seeing if I can produce a patch... I don't know your software well enough to be able to do that safely, but if no one has the development time to be able to look into this, I might resort to it to see if I can get it working.


  • Steven Shiau
    Steven Shiau

    Yes, that's part of it, and more have to be implemented...
    If you make that, please create a patch file and post it. We will try to merge that.
    Thanks in advance.


  • Steven Shiau
    Steven Shiau

    • assigned_to: nobody --> steven_shiau