Re: [Clonezilla-live] Attempt to add fake RAID (dmraid) support
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
|
From: Floris B. / M. <bo...@je...> - 2012-04-20 10:08:55
|
Hi Steven,
On 04/20/2012 08:19 AM, Steven Shiau wrote:
> Thanks for asking this.
> You need to modify the function "cciss_dev_map_if_necessary" in
> /opt/drbl/sbin/ocs-functions to map that.
> If you make it, please send the patch files to us so that we can include
> that in the future release.
I already altered cciss_dev_map_if_necessary to remove the check for the
cciss module there, so that the mapping script is always executed.
The problem I had was that with cciss you only have devices like
/dev/cciss/c0d0, and the script just creates symlinks like:
/dev/sdc -> /dev/cciss/c0d0
/dev/sdc1 -> /dev/cciss/c0d0p1
However with fake RAID you have /dev/mapper/isw-nameofvolume which is
not actually a device but a symlink to /dev/dm0
When you create symlinks like:
/dev/sdc -> /dev/mapper/isw-sfdgdfd -> /dev/dm0
/dev/sdc1 -> /dev/mapper/isw-sfgdfdp1 -> /dev/dm1
Clonezilla doesn't like it because /dev/mapper/isw-sfdgdfd is not listed
in /proc/partitions
/dev/dm0 is.
So I now resolve the final device name by calling "readlink -f" first,
and Clonezilla works with normal partitions.
However I'm still having issues with LVM partitions.
Get messages like "///WARNING/// The LVM setting is not found"
Think the device name that is being searched in the LVM tool output,
might still not be the right one.
I also noticed that the size of the disk is retrieved by looking at
"/sys/block/$p/size" in various parts of the code.
Which is not going to work when $p is not the actual device name but a
"sdc" symlink.
Wonder if it perhaps isn't better to get rid of the mapping code
completely, and modify the Clonezilla code to accept the actual device
name everywhere instead of the /dev/sdX symlink.
> Steven.
>
> On 2012/4/17 下午 10:04, Floris Bos / Maxnet wrote:
>> Hi,
>>
>> I did an attempt to extend the create-cciss-mapping script a little bit
>> so that it would map other types of RAID devices as well.
>>
>> - I removed the check for the cciss module in ocs-functions and
>> create-cciss-mapping so that it is always executed.
>> - And in create-cciss-mapping I altered:
>>
>> ==
>> for cdisk in /dev/cciss/c?d? /dev/ida/c?d? /dev/rd/c?d?; do
>> ==
>>
>> to:
>>
>> ==
>> dmraid_devices=()
>> for volume in $(dmraid -s -c | grep -iv "No RAID disks"); do
>> dmraid_devices+="/dev/mapper/$volume"
>> done
>>
>> for cdisk in /dev/cciss/c?d? /dev/ida/c?d? /dev/rd/c?d?
>> ${dmraid_devices}; do
>> ==
>>
>>
>> This seems to work at first sight.
>> When ocs is started, the create-cciss-mapping script is executed, and it
>> creates /dev/sdc and /dev/sdc1 symlinks to my software raid device, and
>> the first partition on the raid device.
>>
>>
>> However in the Clonezilla savedisk screen the sdc device is still not
>> displayed.
>> Does a disk drive device need to have certain special properties to be
>> recognized by Clonezilla?
>>
>>
>> Yours sincerely,
>>
>> Floris Bos
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Better than sec? Nothing is better than sec when it comes to
>> monitoring Big Data applications. Try Boundary one-second
>> resolution app monitoring today. Free.
>> http://p.sf.net/sfu/Boundary-dev2dev
>> _______________________________________________
>> Clonezilla-live mailing list
>> Clo...@li...
>> https://lists.sourceforge.net/lists/listinfo/clonezilla-live
--
Yours sincerely,
Floris Bos
|