RE: Howto: implement AMD SB9xx RAID5 support in dmraid
Mark-Willem Jansen <[email protected]> Fri, 13 Apr 2012 09:41:21 +0200
| Newsgroups | gmane.linux.ataraid |
|---|---|
| Message-ID | <[email protected]> |
--===============6691533708727649158== Content-Type: multipart/alternative; boundary="_e9931d57-7db2-4df8-862d-050231fb2302_" --_e9931d57-7db2-4df8-862d-050231fb2302_ Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Hi All=2C Just checked the other device-mapper modules used by dmraid=2C and=20 by changing _dm_path_offset I broke the support for the other raid=20 devices. So=2C I need to make a separate function for raid4/5/6. I will also put back the rebuild and region_size information.=20 The region_size information is simple only the rebuild parameter does not except -1=2C so there will be some conditionals added to the code. Are there any devs who are willing to help get dmraid to support all=20 the device-mapper modules in the present kernel? Greetings=2C Mark-Willem Date: Fri=2C 13 Apr 2012 11:00:10 +0400 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: Howto: implement AMD SB9xx RAID5 support in dmraid =20 =20 =20 =20 Hello Mark-Willem=2C =20 Good research! Thank you for sharing. =20 -- Mary =20 On 04/13/2012 03:23 AM=2C Mark-Willem Jansen wrote: =20 =20 Hi=2C =20 Been playing with the patches you gave me. And I finally got the raid up and running=2C using the shipped dm-raid.ko module in the 3.2 kernel. =20 Lets go through the steps. =20 I have applied the dmraid_pdc_raid5.patch=2C 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. =20 $ dmraid -ay -t pdc_ciihdaafgf: 0 1953124864 raid raid5_la 2 128 nosync 3 - /dev/sdb - /dev/sdc - /dev/sdd =20 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 =20 The patch has been attached. (see that I have made some typo's in naming the patch.) =20 Now I can activate the raid and by using kpartx I can also mount the partitions on the raid. Whoot. =20 Unfortunately the fix was a bit dirty=2C 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. =20 Regards=2C =20 Mark-Willem =20 =20 Date: Tue=2C 3 Apr 2012 11:13:20 +0400 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: Howto: implement AMD SB9xx RAID5 support in dmraid =20 =20 =20 Hello=2C =20 I do have dm-raid45 patch for 3.2.=20 I do not remember where it was taken from=2C but it compiles with 3.2 :-) =20 =20 On 04/03/2012 11:13 AM=2C Mark-Willem Jansen wrote: =20 =20 Hello=2C =20 Later this day I will apply the patch. But patching the kernel will be more cumbersome. The=20 present kernel running om my system is 3.2.0 and the patches found on the web are for=20 older kernels. But maybe the module dm-raid.ko included in the kernel can be helpful. =20 Regards=2C =20 Mark-Willem =20 > Date: Mon=2C 2 Apr 2012 17:42:12 +0400 > From: [email protected] > To: [email protected] > CC: [email protected] > Subject: Re: Howto: implement AMD SB9xx RAID5 support in dmraid >=20 > hello=2C >=20 > You may try the attached patch to support RAID5 in pdc dmraid format. It=20 > works OK for me. > Be sure to patch the kernel itself to support dm-raid45 target. >=20 >=20 > On 04/02/2012 02:59 AM=2C Phillip Susi wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > On 04/01/2012 04:21 PM=2C Mark-Willem Jansen wrote: > >> ERROR: pdc: zero sectors on /dev/sdd > >> ERROR: pdc: setting up RAID device /dev/sdd > > It looks like sectors() in pdc.c is missing the case for computing the size of a RAID5. For that matter=2C there appears to be no #define for PDC_T_RAID5=2C so you will need to add one and add it to the mapping table in type() and fix sectors() to handle it and probably a few other things. > > > > > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.11 (GNU/Linux) > > Comment: Using GnuPG with Mozilla - http://enigmail.moz= dev.org/ > > > > iQEcBAEBAgAGBQJPeN2yAAoJEJrBOlT6nu75NFQIANRt6f4STTvdEV+lYbs= T8OL3 > > l22ZRVt9ReIAu7CJzRjx0yfaYAUo6Zy8fwzOjt9eF4fPYVQvnn53SYQu/qt= yv2DZ > > rDyv7owpxwcqQsZIYvBzQvWjEVT2s6VJrVtOVnZ2G1awa1SwIoc9LPnmouO= eKhQG > > auYL+O1UqfQEroJDsnOkZ8srrgc/m2zN3AxID4ps0FymQyNgy2s+HhBlsI4= LeUNK > > GimqJMwfbvaMlk0u8botcm2aMwogq+ap1GhJYddnRMluS6U4UJnS7NYrZYt= ww/1m > > 3WJWkX9hsYxo+QBA0qassg3zc/efzkC8pBBvDo7FLNGcXs2txi7dXmNXLfe= rwFo=3D > > =3Do0zP > > -----END PGP SIGNATURE----- > > > > _______________________________________________ > > Ataraid-list mailing list > > [email protected] > > https://www.redhat.com/mailman/listinfo/ataraid-list >=20 >=20 > --=20 > =D1 =F3=E2=E0=E6=E5=ED=E8=E5=EC=2C > Astarta > =C0=E4=EC=E8=ED=E8=F1=F2=F0=E0=F2=EE=F0 =D4=EE=F0=F3=EC= =E0 "=CA=F0=FB=F1=E8=ED=FB=E9 =C1=F3=EC" > http://rat.ru/forum/index.php >=20 > =93The Linux philosophy is 'Laugh in the face of danger'. > Oops. Wrong One. 'Do it yourself'. Yes=2C that's it.=94 > (c) Linus Torvalds. >=20 =20 =20 =20 =20 =20 --=20 =D1 =F3=E2=E0=E6=E5=ED=E8=E5=EC=2C Astarta =C0=E4=EC=E8=ED=E8=F1=F2=F0=E0=F2=EE=F0 =D4=EE=F0=F3=EC=E0 "=CA=F0=FB=F1=E8= =ED=FB=E9 =C1=F3=EC" http://rat.ru/forum/index.php =93The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes=2C that's it.=94 (c) Linus Torvalds.=20 =20 =20 =20 =20 = --_e9931d57-7db2-4df8-862d-050231fb2302_ Content-Type: text/html; charset="windows-1251" Content-Transfer-Encoding: quoted-printable <html> <head> </head> <body class=3D'hmmessage'><div dir=3D'ltr'> <style><!-- .hmmessage P { margin:0px=3B padding:0px } body.hmmessage { font-size: 10pt=3B font-family:Tahoma } --></style> <div dir=3D"ltr">Hi All=2C<br><br>Just checked the other device-mapper modu= les used by dmraid=2C and <br>by changing _dm_path_offset I broke the suppo= rt for the other raid <br>devices. So=2C I need to =3B make a separate = function for raid4/5/6.<br><br>I will also put back the rebuild and region_= size information. <br>The region_size information is simple only the rebuil= d parameter<br>does not except -1=2C so there will be some conditionals add= ed to the code.<br><br>Are there any devs who are willing to help get dmrai= d to support all <br>the device-mapper modules in the present kernel?<br><b= r>Greetings=2C<br><br>Mark-Willem<br><div><div id=3D"SkyDrivePlaceholder"><= /div><hr id=3D"stopSpelling">Date: Fri=2C 13 Apr 2012 11:00:10 +0400<br>Fro= m: [email protected]<br>To: [email protected]<br>CC: ataraid-list@redhat.= com<br>Subject: Re: Howto: implement AMD SB9xx RAID5 support in dmraid<br><= br> =20 <meta http-equiv=3D"Content-Type" content=3D"text/html=3B charset=3Dunicode= "> <meta name=3D"Generator" content=3D"Microsoft SafeHTML"> =20 =20 =20 Hello Mark-Willem=2C<br> <br> Good research! Thank you for sharing.<br> <br> --<br> Mary<br> <br> On 04/13/2012 03:23 AM=2C Mark-Willem Jansen wrote:<br> <br> <blockquote cite=3D"mid:[email protected]"> <div dir=3D"ltr">Hi=2C<br> <br> Been playing with the patches you gave me. And I finally got the raid up and running=2C using the shipped dm-raid.ko module in the 3.2 kernel.<br> <br> Lets go through the steps.<br> <br> I have applied the dmraid_pdc_raid5.patch=2C this caused dmraid to produce a new error related to the missing dm-raid45 module. Before activating a new raid set =3B dmraid checks if a dm-targ= et 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.<br> <br> $ dmraid -ay -t<br> pdc_ciihdaafgf: 0 1953124864 raid raid5_la 2 128 nosync 3 - /dev/sdb - /dev/sdc - /dev/sdd<br> <br> this used to be something like (I forgot some numbers)<br> $ dmraid -ay -t<br> pdc_ciihdaafgf: 0 1953124864 raid core 2 132016 nosync raid5_la 1 128 3 -1 /dev/sdb 0 /dev/sdc 0 /dev/sdd 0<br> <br> The patch has been attached. (see that I have made some typo's in naming the patch.)<br> <br> Now I can activate the raid and by using kpartx I can also mount the partitions on the raid. Whoot.<br> <br> Unfortunately the fix was a bit dirty=2C 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.<br> <br> Regards=2C<br> <br> Mark-Willem<br> <br> <div> <hr id=3D"ecxstopSpelling">Date: Tue=2C 3 Apr 2012 11:13:20 +0400= <br> From: <a class=3D"ecxmoz-txt-link-abbreviated" href=3D"mailto:ast= [email protected]">[email protected]</a><br> To: <a class=3D"ecxmoz-txt-link-abbreviated" href=3D"mailto:markw= [email protected]">[email protected]</a><br> CC: <a class=3D"ecxmoz-txt-link-abbreviated" href=3D"mailto:atara= [email protected]">[email protected]</a><br> Subject: Re: Howto: implement AMD SB9xx RAID5 support in dmraid<br> <br> =20 =20 Hello=2C<br> <br> I do have dm-raid45 patch for 3.2. <br> I do not remember where it was taken from=2C but it compiles with 3.2 :-)<br> <br> <br> On 04/03/2012 11:13 AM=2C Mark-Willem Jansen wrote: <blockquote cite=3D"mid:[email protected]= bl"> <style> .ExternalClass .ecxhmmessage P {padding:0px=3B} .ExternalClass body.ecxhmmessage {font-size:10pt=3Bfont-family:Tahoma=3B} </style> <div dir=3D"ltr"> Hello=2C<br> <br> Later this day I will apply the patch. But patching the kernel will be more cumbersome. The <br> present kernel running om my system is 3.2.0 and the patches found on the web are for <br> older kernels. But maybe the module dm-raid.ko included in the kernel can be helpful.<br> <br> Regards=2C<br> <br> Mark-Willem<br> <br> <div>>=3B Date: Mon=2C 2 Apr 2012 17:42:12 +0400<br> >=3B From: <a class=3D"ecxmoz-txt-link-abbreviated" href= =3D"mailto:[email protected]">[email protected]</a><br> >=3B To: <a class=3D"ecxmoz-txt-link-abbreviated" href=3D= "mailto:[email protected]">[email protected]</a><br> >=3B CC: <a class=3D"ecxmoz-txt-link-abbreviated" href=3D= "mailto:[email protected]">[email protected]</a><br> >=3B Subject: Re: Howto: implement AMD SB9xx RAID5 support in dmraid<br> >=3B <br> >=3B hello=2C<br> >=3B <br> >=3B You may try the attached patch to support RAID5 in pdc dmraid format. It <br> >=3B works OK for me.<br> >=3B Be sure to patch the kernel itself to support dm-raid45 target.<br> >=3B <br> >=3B <br> >=3B On 04/02/2012 02:59 AM=2C Phillip Susi wrote:<br> >=3B >=3B -----BEGIN PGP SIGNED MESSAGE-----<br> >=3B >=3B Hash: SHA1<br> >=3B >=3B<br> >=3B >=3B On 04/01/2012 04:21 PM=2C Mark-Willem Jansen wrote:<br> >=3B >=3B>=3B ERROR: pdc: zero sectors on /dev/sdd<br= > >=3B >=3B>=3B ERROR: pdc: setting up RAID device /dev/sdd<br> >=3B >=3B It looks like sectors() in pdc.c is missing the case for computing the size of a RAID5. For that matter=2C there appears to be no #define for PDC_T_RAID5=2C so you will need to add one and add it to the mapping table in type() and fix sectors() to handle it and probably a few other things.<br> >=3B >=3B<br> >=3B >=3B<br> >=3B >=3B -----BEGIN PGP SIGNATURE-----<br> >=3B >=3B Version: GnuPG v1.4.11 (GNU/Linux)<br> >=3B >=3B Comment: Using GnuPG with Mozilla - <a class= =3D"ecxmoz-txt-link-freetext" href=3D"http://enigmail.mozdev.org/" target= =3D"_blank">http://enigmail.mozdev.org/</a><br> >=3B >=3B<br> >=3B >=3B iQEcBAEBAgAGBQJPeN2yAAoJEJrBOlT6nu75NFQIANRt6f4STTvdEV+lYbs= T8OL3<br> >=3B >=3B l22ZRVt9ReIAu7CJzRjx0yfaYAUo6Zy8fwzOjt9eF4fPYVQvnn53SYQu/qt= yv2DZ<br> >=3B >=3B rDyv7owpxwcqQsZIYvBzQvWjEVT2s6VJrVtOVnZ2G1awa1SwIoc9LPnmouO= eKhQG<br> >=3B >=3B auYL+O1UqfQEroJDsnOkZ8srrgc/m2zN3AxID4ps0FymQyNgy2s+HhBlsI4= LeUNK<br> >=3B >=3B GimqJMwfbvaMlk0u8botcm2aMwogq+ap1GhJYddnRMluS6U4UJnS7NYrZYt= ww/1m<br> >=3B >=3B 3WJWkX9hsYxo+QBA0qassg3zc/efzkC8pBBvDo7FLNGcXs2txi7dXmNXLfe= rwFo=3D<br> >=3B >=3B =3Do0zP<br> >=3B >=3B -----END PGP SIGNATURE-----<br> >=3B >=3B<br> >=3B >=3B _______________________________________________<br> >=3B >=3B Ataraid-list mailing list<br> >=3B >=3B <a class=3D"ecxmoz-txt-link-abbreviated" href= =3D"mailto:[email protected]">[email protected]</a><br> >=3B >=3B <a class=3D"ecxmoz-txt-link-freetext" href=3D= "https://www.redhat.com/mailman/listinfo/ataraid-list" target=3D"_blank">ht= tps://www.redhat.com/mailman/listinfo/ataraid-list</a><br> >=3B <br> >=3B <br> >=3B -- <br> >=3B =D1 =F3=E2=E0=E6=E5=ED=E8=E5=EC=2C<br> >=3B Astarta<br> >=3B =C0=E4=EC=E8=ED=E8=F1=F2=F0=E0=F2=EE=F0 =D4=EE=F0=F3= =EC=E0 "=CA=F0=FB=F1=E8=ED=FB=E9 =C1=F3=EC"<br> >=3B <a class=3D"ecxmoz-txt-link-freetext" href=3D"http:/= /rat.ru/forum/index.php" target=3D"_blank">http://rat.ru/forum/index.php</a= ><br> >=3B <br> >=3B =93The Linux philosophy is 'Laugh in the face of danger'.<br> >=3B Oops. Wrong One. 'Do it yourself'. Yes=2C that's it.= =94<br> >=3B (c) Linus Torvalds.<br> >=3B <br> </div> </div> </blockquote> <br> <br> <pre class=3D"ecxmoz-signature">--=20 =D1 =F3=E2=E0=E6=E5=ED=E8=E5=EC=2C Astarta =C0=E4=EC=E8=ED=E8=F1=F2=F0=E0=F2=EE=F0 =D4=EE=F0=F3=EC=E0 "=CA=F0=FB=F1=E8= =ED=FB=E9 =C1=F3=EC" <a class=3D"ecxmoz-txt-link-freetext" href=3D"http://rat.ru/forum/index.php= " target=3D"_blank">http://rat.ru/forum/index.php</a> =93The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes=2C that's it.=94 (c) Linus Torvalds. </pre> </div> </div> </blockquote> <br></div></div> </div></body> </html>= --_e9931d57-7db2-4df8-862d-050231fb2302_-- --===============6691533708727649158== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ataraid-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/ataraid-list --===============6691533708727649158==--