Hi,
Been playing with the patches you gave me. And I finally got the raid up and running, using the shipped dm-raid.ko module in the 3.2 kernel. Lets go through the steps. I have applied the dmraid_pdc_raid5.patch, this caused dmraid to produce a new error related to the missing dm-raid45 module. Before activating a new raid set dmraid checks if a dm-target has been registered with device-mapper. This can be changed through a struct in metadata.c. Doing this accordingly only left me with the error of raid array not activated. Going through the dmesg I found that dmraid was giving a wrong raid type to the dm-raid module. Digging deeper I wound that the arguments given to dm-raid45 and dm-raid have a different structure. So I have changed the arguments structure send to the module accordingly. $ dmraid -ay -t pdc_ciihdaafgf: 0 1953124864 raid raid5_la 2 128 nosync 3 - /dev/sdb - /dev/sdc - /dev/sdd this used to be something like (I forgot some numbers) $ dmraid -ay -t pdc_ciihdaafgf: 0 1953124864 raid core 2 132016 nosync raid5_la 1 128 3 -1 /dev/sdb 0 /dev/sdc 0 /dev/sdd 0 The patch has been attached. (see that I have made some typo's in naming the patch.) Now I can activate the raid and by using kpartx I can also mount the partitions on the raid. Whoot. Unfortunately the fix was a bit dirty, could be that I have broken dmraid for the other raid types. Also I am not sure if you need to send the region_size to the dm-raid module. Regards, Mark-Willem Date: Tue, 3 Apr 2012 11:13:20 +0400 From: astarta@xxxxxx To: markwillem@xxxxxxxxxxx CC: ataraid-list@xxxxxxxxxx Subject: Re: Howto: implement AMD SB9xx RAID5 support in dmraid Hello, I do have dm-raid45 patch for 3.2. I do not remember where it was taken from, but it compiles with 3.2 :-) On 04/03/2012 11:13 AM, Mark-Willem Jansen wrote:
-- Ñ óâàæåíèåì, Astarta Àäìèíèñòðàòîð Ôîðóìà "Êðûñèíûé Áóì" http://rat.ru/forum/index.php “The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.” (c) Linus Torvalds. |
From: Mark-Willem Jansen <rawnar@xxxxxxxxxxxxxxxxxxxxx> Date: Thu, 12 Apr 2012 22:37:12 +0200 Subject: Using target dm-raid in state off dm-raid45 --- 1.0.0.rc16/lib/activate/activate.c | 18 +++++++++--------- 1.0.0.rc16/lib/metadata/metadata.c | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/1.0.0.rc16/lib/activate/activate.c b/1.0.0.rc16/lib/activate/activate.c index 05bd610..6cc2603 100644 --- a/1.0.0.rc16/lib/activate/activate.c +++ b/1.0.0.rc16/lib/activate/activate.c @@ -114,8 +114,8 @@ static int _dm_path_offset(struct lib_context *lc, char **table, int valid, const char *path, uint64_t offset) { - return p_fmt(lc, table, " %s %U", - valid ? path : lc->path.error, offset); + return p_fmt(lc, table, " - %s", + valid ? path : lc->path.error); } /* @@ -548,13 +548,13 @@ _dm_raid45_bol(struct lib_context *lc, char **table, struct raid_set *rs, if (need_sync && !get_rebuild_drive(lc, rs, &rebuild_drive)) return 0; - return p_fmt(lc, table, "0 %U %s core 2 %u %s %s 1 %u %u %d", - sectors, get_dm_type(lc, rs->type), - calc_region_size(lc, - total_sectors(lc, rs) / - _dm_raid_devs(lc, rs, 0)), - (need_sync) ? "sync" : "nosync", get_type(lc, rs->type), - rs->stride, members, rebuild_drive.data.i32); + return p_fmt(lc, table, "0 %U %s %s 2 %u %s %u", + sectors, + get_dm_type(lc, rs->type), + get_type(lc, rs->type), + rs->stride, + (need_sync) ? "sync" : "nosync", + members); } /* Create "error target" name based on raid set name. */ diff --git a/1.0.0.rc16/lib/metadata/metadata.c b/1.0.0.rc16/lib/metadata/metadata.c index e8780ed..1e55ed0 100644 --- a/1.0.0.rc16/lib/metadata/metadata.c +++ b/1.0.0.rc16/lib/metadata/metadata.c @@ -31,11 +31,11 @@ static const struct { { t_linear, "linear", "linear"}, { t_raid0, "stripe", "striped"}, { t_raid1, "mirror", "mirror"}, - { t_raid4, "raid4", "raid45"}, - { t_raid5_ls, "raid5_ls", "raid45"}, - { t_raid5_rs, "raid5_rs", "raid45"}, - { t_raid5_la, "raid5_la", "raid45"}, - { t_raid5_ra, "raid5_ra", "raid45"}, + { t_raid4, "raid4", "raid"}, + { t_raid5_ls, "raid5_ls", "raid"}, + { t_raid5_rs, "raid5_rs", "raid"}, + { t_raid5_la, "raid5_la", "raid"}, + { t_raid5_ra, "raid5_ra", "raid"}, { t_raid6, "raid6", NULL}, };
_______________________________________________ Ataraid-list mailing list Ataraid-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/ataraid-list