Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232062 - Patch for dmraid to support raid 1+0 (raid10) on Intel fakeraid
Summary: Patch for dmraid to support raid 1+0 (raid10) on Intel fakeraid
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-17 10:47 UTC by Antti Mäkelä
Modified: 2009-09-18 18:12 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Dmraid ebuild with isw_raid10 patch (dmraid-1.0.0_rc14-r1.ebuild,2.17 KB, text/plain)
2008-07-17 10:48 UTC, Antti Mäkelä
Details
Patch to add Raid 1+0 support to Intel fakeraid (dmraid-iswraid_10.patch,11.62 KB, patch)
2008-07-17 10:48 UTC, Antti Mäkelä
Details | Diff
Various patches used by ubuntu (dmraid-1.0.0_rc15-ubuntu-patch-rollup.patch,17.32 KB, text/plain)
2009-06-15 16:20 UTC, Ian Stakenvicius (RETIRED)
Details
ebuild adding raid45 kernel module and patches (dmraid-1.0.0_rc15-r2.ebuild,3.88 KB, text/plain)
2009-09-14 19:07 UTC, Ian Stakenvicius (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Mäkelä 2008-07-17 10:47:19 UTC
As apparently dmraid's development has more or less grinded to a halt (or has it, anyone have info)? this patch

http://www.redhat.com/archives/ataraid-list/2007-June/msg00032.html

never got integrated to dmraid source.

Could it be added to Gentoo's dmraid ebuild?

Attaching both the patch and a new version of dmraid ebuild.
Comment 1 Antti Mäkelä 2008-07-17 10:48:08 UTC
Created attachment 160628 [details]
Dmraid ebuild with isw_raid10 patch
Comment 2 Antti Mäkelä 2008-07-17 10:48:39 UTC
Created attachment 160629 [details, diff]
Patch to add Raid 1+0 support to Intel fakeraid
Comment 3 Bjoern Thorwirth 2008-12-26 12:28:06 UTC
i have the same problem with raid5. there is a solved ubuntu bug for rc15: https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/305011
Comment 4 Ian Stakenvicius (RETIRED) gentoo-dev 2009-06-04 18:39:50 UTC
Is this still a valid bug against dmraid-1.0.0-rc15 ?
Comment 5 Antti Mäkelä 2009-06-12 12:24:58 UTC
Cannot test as genkernel refuses to work with dmraid-1.0.0-rc15...
Comment 6 Ian Stakenvicius (RETIRED) gentoo-dev 2009-06-12 18:18:29 UTC
(In reply to comment #5)
> Cannot test as genkernel refuses to work with dmraid-1.0.0-rc15...
> 

But, with this version installed, can you set up your raid by hand after booting?  Or does it still fail?

BTW -- i just built genkernel against dmraid-1.0.0_rc15 without any issues.  Did you adjust your /etc/genkernel.conf?  
Comment 7 Antti Mäkelä 2009-06-12 20:49:39 UTC
(In reply to comment #6)
> BTW -- i just built genkernel against dmraid-1.0.0_rc15 without any issues. 
> Did you adjust your /etc/genkernel.conf?  

  Yes, I did. I don't remember the exact error message right now, but fails on line 465 at compile script (something about device mapper stuff). I can check later. If I simply install dmraid-1.0.0_rc15 and try checking status ("dmraid -r", after booting off initrd with rc14) it doesn't find any raid volumes, so I figured maybe it requires also booting (thus activating) the raid volumes with rc15.
Comment 8 Ian Stakenvicius (RETIRED) gentoo-dev 2009-06-12 20:57:02 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > BTW -- i just built genkernel against dmraid-1.0.0_rc15 without any issues. 
> > Did you adjust your /etc/genkernel.conf?  
> 
>   Yes, I did. I don't remember the exact error message right now, but fails on
> line 465 at compile script (something about device mapper stuff). I can check
> later. If I simply install dmraid-1.0.0_rc15 and try checking status ("dmraid
> -r", after booting off initrd with rc14) it doesn't find any raid volumes, so I
> figured maybe it requires also booting (thus activating) the raid volumes with
> rc15.
> 

No, you only need dmraid in boot if you need to mount those drives during your boot process (ie, if they're your / ).  

Sounds like the bug still exists in _rc15 then.  i'll figure out how to apply these patches and get the ebuild updated accordingly.
Comment 9 Antti Mäkelä 2009-06-13 07:10:24 UTC
(In reply to comment #8)
> Sounds like the bug still exists in _rc15 then.  i'll figure out how to apply
> these patches and get the ebuild updated accordingly.

  No - I meant that I cannot see *any* raid volumes, no RAID1, RAID5, not just RAID10. So if it should work immediately then it probably means that rc15 is *completely* broken for me..

  (I *am* using my RAID5 volume as my / so I do need it activated at boot time)
Comment 10 Ian Stakenvicius (RETIRED) gentoo-dev 2009-06-15 15:34:46 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Sounds like the bug still exists in _rc15 then.  i'll figure out how to apply
> > these patches and get the ebuild updated accordingly.
> 
>   No - I meant that I cannot see *any* raid volumes, no RAID1, RAID5, not just
> RAID10. So if it should work immediately then it probably means that rc15 is
> *completely* broken for me..
> 
>   (I *am* using my RAID5 volume as my / so I do need it activated at boot time)
> 

I need some additional info, then (not least of which would be how you installed gentoo on the biosraid raid5 image in the first place).  Could you post the output of "dmraid -l", "dmraid -r -v" and "dmraid -s -v" with 1.0.0.rc15 for me?
Comment 11 Ian Stakenvicius (RETIRED) gentoo-dev 2009-06-15 16:20:32 UTC
Created attachment 194805 [details]
Various patches used by ubuntu

Try applying this patch, and see if it helps at all.  This is a rollup of all relevant patches that ubuntu applies to their stable package.  There are at least three fixes relating to isw, and a few other fixes and upgrades that would probably be good to integrate.
Comment 12 Antti Mäkelä 2009-06-16 11:12:39 UTC
(In reply to comment #10)
> I need some additional info, then (not least of which would be how you
> installed gentoo on the biosraid raid5 image in the first place).  Could you
> post the output of "dmraid -l", "dmraid -r -v" and "dmraid -s -v" with
> 1.0.0.rc15 for me?

  Can do that on Wednesday. 

  Oh, and I installed Gentoo by booting off Ubuntu's LiveCD way back and just doing the partitioning+śtage3 tarballing from there - I didn't have problem running Gentoo once I got it installed, it's just that Gentoo's livecd didn't have proper dmraid5 support included.

  Utilizing Ubuntu's patches sounds like a good idea.
Comment 13 Ian Stakenvicius (RETIRED) gentoo-dev 2009-06-23 14:15:45 UTC
ping, any luck?
Comment 14 Antti Mäkelä 2009-06-24 13:30:05 UTC
(In reply to comment #13)
> ping, any luck?

 Right, forgot about this. Anyway, as of now, those outputs:

With dmraid-1.0.0-rc14:

# dmraid -l
asr     : Adaptec HostRAID ASR (0,1,10)
ddf1    : SNIA DDF1 (0,1,4,5,linear)
hpt37x  : Highpoint HPT37X (S,0,1,10,01)
hpt45x  : Highpoint HPT45X (S,0,1,10)
isw     : Intel Software RAID (0,1)
jmicron : JMicron ATARAID (S,0,1)
lsi     : LSI Logic MegaRAID (0,1,10)
nvidia  : NVidia RAID (S,0,1,10,5)
pdc     : Promise FastTrack (S,0,1,10)
sil     : Silicon Image(tm) Medley(tm) (0,1,10)
via     : VIA Software RAID (S,0,1,10)
dos     : DOS partitions on SW RAIDs
# dmraid -r -v
INFO: RAID devices discovered:

/dev/sdd: isw, "isw_dcedihfbag", GROUP, ok, 1465149165 sectors, data@ 0
/dev/sdc: isw, "isw_dcedihfbag", GROUP, ok, 1465149165 sectors, data@ 0
/dev/sdb: isw, "isw_dcedihfbag", GROUP, ok, 1465149165 sectors, data@ 0
/dev/sda: isw, "isw_dcedihfbag", GROUP, ok, 1465149165 sectors, data@ 0
woodshaver ~ # dmraid -s -v
*** Group superset isw_dcedihfbag
--> Active Subset
name   : isw_dcedihfbag_RAID_5
size   : 4160750592
stride : 256
type   : raid5_la
status : ok
subsets: 0
devs   : 4
spares : 0
--> Active Subset
name   : isw_dcedihfbag_STRIPE
size   : 312896512
stride : 128
type   : stripe
status : ok
subsets: 0
devs   : 4
spares : 0


With dmraid-1.0.0rc15 as provided by Gentoo:

# dmraid -l
asr     : Adaptec HostRAID ASR (0,1,10)
ddf1    : SNIA DDF1 (0,1,4,5,linear)
hpt37x  : Highpoint HPT37X (S,0,1,10,01)
hpt45x  : Highpoint HPT45X (S,0,1,10)
isw     : Intel Software RAID (0,1,01)
jmicron : JMicron ATARAID (S,0,1)
lsi     : LSI Logic MegaRAID (0,1,10)
nvidia  : NVidia RAID (S,0,1,10,5)
pdc     : Promise FastTrack (S,0,1,10)
sil     : Silicon Image(tm) Medley(tm) (0,1,10)
via     : VIA Software RAID (S,0,1,10)
dos     : DOS partitions on SW RAIDs

# dmraid -r -v
ERROR: isw: Could not find disk /dev/sdd in the metadata
ERROR: isw: Could not find disk /dev/sdc in the metadata
ERROR: isw: Could not find disk /dev/sdb in the metadata
ERROR: isw: Could not find disk /dev/sda in the metadata
no raid disks

# dmraid -s -v
ERROR: isw: Could not find disk /dev/sdd in the metadata
ERROR: isw: Could not find disk /dev/sdc in the metadata
ERROR: isw: Could not find disk /dev/sdb in the metadata
ERROR: isw: Could not find disk /dev/sda in the metadata
no raid disks
Comment 15 Ian Stakenvicius (RETIRED) gentoo-dev 2009-06-24 13:32:29 UTC
Have you been able to try 1.0.0_rc15 along with attachment #194805 [details] ?
Comment 16 Antti Mäkelä 2009-06-25 07:39:06 UTC
(In reply to comment #15)
> Have you been able to try 1.0.0_rc15 along with attachment #194805 [details] [edit] ?

  With these, it works just as in rc14. 

  Since reporting the bug, I have actually deleted my raid 1+0 volume, but I can recreate and try that too.
Comment 17 Antti Mäkelä 2009-06-25 08:05:03 UTC
Also, this works for Raid 1+0 configuration.

So please provided update ebuild (and verify that it works with genkernel) :)
Comment 18 Martin Benz 2009-07-14 22:06:18 UTC
Can you provide me with the steps you have done to get it working with those patches? Seems to me like using genkernel even with patched dmraid packages doesn't work. Didn't manage to get dmraidinitrd script working without errors... Followed the tips in the gentoo wiki, but now i don't know what to do else....
Comment 19 Antti Mäkelä 2009-07-15 13:47:14 UTC
(In reply to comment #18)
> Can you provide me with the steps you have done to get it working with those
> patches? Seems to me like using genkernel even with patched dmraid packages
> doesn't work. Didn't manage to get dmraidinitrd script working without
> errors... Followed the tips in the gentoo wiki, but now i don't know what to do
> else....

  Ok - I have used the earlier patch here for userspace stuff.

  Also, I have patched gentoo-sources with the patch present here:

http://people.redhat.com/~heinzm/sw/dm/dm-raid45/dm-raid45_2.6.29.1_20090424.patch.bz2

  (The URL is also in #195804 ).

  So we need to have both userspace and kernelspace components aligned - probably should mark these bugs as dependencies.

  But anyway, it's just two patches - one for dmraid the userspace program, other for kernel.
Comment 20 Antti Mäkelä 2009-07-15 13:51:55 UTC
(In reply to comment #19)

  Oh and note that the dmraid-rc14 in portage works just fine with genkernel and the kernel-patch. It's just rc15 and the kernel-patch-combo that doesn't work.
Comment 21 Ian Stakenvicius (RETIRED) gentoo-dev 2009-07-15 14:06:54 UTC
The Genkernel herd (hurd?) manage and patch dmraid for their own purposes, it's not actually related to this package -- so it makes sense that rc14 works while rc15 doesn't yet.  That said, my goal is to make rc15 genkernel-compatible as well.
Comment 22 Martin Benz 2009-07-15 20:52:18 UTC
I'm using a Raid 10 (0+1) setup - so i shouldn't need the kernel patch? Gonna try it tomorrow with dmraid rc14 with the patch and latest genkernel (not svn, using ~amd64).

One thing is not clear to me - does it matter to genkernel if it uses a unpatched distfile or should it work with the provided r1 ebuild which only patches dmraid at installation. If it only builds a module it shouldn't matter!?

Comment 23 Ian Stakenvicius (RETIRED) gentoo-dev 2009-09-10 16:00:05 UTC
Hmmm..  very good point.  I just realized that setting genkernel to use this version of dmraid will use the _original_ sources (as per what's in DISTDIR), not the patched sources.  I need to make this ebuild re-package the ${WORKDIR} and provide that to genkernel.
Comment 24 Ian Stakenvicius (RETIRED) gentoo-dev 2009-09-14 19:07:04 UTC
Created attachment 204115 [details]
ebuild adding raid45 kernel module and patches

OK, if anyone's willing to try raid5 with dmraid, this ebuild adds the raid45 USE flag to build the dm-raid45 kernel module and patch the kernel appropriately.  it _doesnt_ do anything right now to add the kernel module to genkernel, though.   Should work with 2.6.29 and 2.6.30 kernels.
Comment 25 Antti Mäkelä 2009-09-15 10:41:51 UTC
(In reply to comment #24)
> OK, if anyone's willing to try raid5 with dmraid, this ebuild adds the raid45
> USE flag to build the dm-raid45 kernel module and patch the kernel
> appropriately.  it _doesnt_ do anything right now to add the kernel module to
> genkernel, though.   Should work with 2.6.29 and 2.6.30 kernels.

  I would, but does this caveat mean that the dmraid in initrd is whatever genkernel uses, which currently is rc14 => it cannot activate raid5 volumes at boottime. However, I can try with the instructions you have at the end of the ebuild. Do note that previously rc15 *didn't* compile with genkernel.

  I'll post the results.
Comment 26 Antti Mäkelä 2009-09-15 10:59:18 UTC
Ahem - the ubuntu-patch-rollup.patch is missing from your ebuild. So it's not working for me at the moment. Could you include that in as well?
Comment 27 Ian Stakenvicius (RETIRED) gentoo-dev 2009-09-15 15:53:30 UTC
(In reply to comment #25)
> 
> Does this caveat mean that the dmraid in initrd is whatever
> genkernel uses, which currently is rc14 => it cannot activate raid5 volumes at
> boottime. However, I can try with the instructions you have at the end of the
> ebuild. Do note that previously rc15 *didn't* compile with genkernel.

Genkernel builds fine for me with the patched dmraid source tarball on my systems (x86 and amd64), the post-install instructions at the end of the ebuild are all you need to do (changing two lines in /etc/genkernel.conf).  

Also, there's a --postclear option for genkernel which will remove the cache of prebuilt stuffs for the initramfs; if you find that it's not actually recompiling dmraid you can use that to clear the cache and force it to build next time.

The caveat i mentioned has to do with the dm-raid45.ko kernel module, which right now is installed to /lib/modules/ only.  I assume that genkernel will not grab that file for the initramfs as everything stands now.  However, after talking to some dev's it's been suggested that I should just provide the option to patch the whole kernel instead of separately building the module (ie, end up with the same scenario as a user downloading the patch in comment #19 and applying it themselves), which makes this a non-issue..

I'll post an updated ebuild later today.  

Comment 28 Ian Stakenvicius (RETIRED) gentoo-dev 2009-09-15 15:55:08 UTC
(In reply to comment #26)
> Ahem - the ubuntu-patch-rollup.patch is missing from your ebuild. So it's not
> working for me at the moment. Could you include that in as well?
> 

I opted to only include certain parts of the ubuntu patchset, as of the dmraid-1.0.0_rc15-r1.ebuild in portage.  This ebuild works off of that.  Did you find that the dmraid source needs more patching to work?  what issues are you finding?
Comment 29 Antti Mäkelä 2009-09-15 20:17:50 UTC
(In reply to comment #28)
> I opted to only include certain parts of the ubuntu patchset, as of the
> dmraid-1.0.0_rc15-r1.ebuild in portage.  This ebuild works off of that.  Did
> you find that the dmraid source needs more patching to work?  what issues are
> you finding?

  See my comments #14 and #16. Without Ubuntu patches dmraid didn't activate my raid5 volumes at all.
Comment 30 Ian Stakenvicius (RETIRED) gentoo-dev 2009-09-16 20:40:16 UTC
Please test the new version (sys-fs/dmraid-1.0.0_rc16).  See bug #285241 for more info and comments (note specifically that if it doesn't work for you as-is, that bug has an isw patch you can apply to see if it'll work with that)

I did away with the kernel patching for raid45 as that's really a kernel issue and beyond the scope of this dmraid package.  
Comment 31 Antti Mäkelä 2009-09-17 09:17:17 UTC
(In reply to comment #30)
> Please test the new version (sys-fs/dmraid-1.0.0_rc16).  See bug #285241 for
> more info and comments (note specifically that if it doesn't work for you
> as-is, that bug has an isw patch you can apply to see if it'll work with that)
> 
> I did away with the kernel patching for raid45 as that's really a kernel issue
> and beyond the scope of this dmraid package.  

  I will...unfortunately I'm not at my computer until next wednesday. Anyway, since rc16 probably includes all these patches already maybe this bug should be closed as UPSTREAM?