Software RAID 0+1 with mdadm.
Been trying for days to get a software RAID 0+1 setup. This is on SuSe 9.2 with kernel 2.6.8-24.11-smp x86_64.
I am trying to setup a RAID 0+1 with 4 250gb SATA drives. I do the following:
mdadm --create /dev/md1 --level=0 --chunk=4 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm --create /dev/md2 --level=0 --chunk=4 --raid-devices=2 /dev/sdd1 /dev/sde1
mdadm --create /dev/md0 --level=1 --chunk=4 --raid-devices=2 /dev/md1 /dev/md2
This all works fine and I can mkreiserfs /dev/md0 and mount it. If I am then to reboot /dev/md1 and /dev/md2 will show up in the /proc/mdstat but not /dev/md0. So I create a /etc/mdadm.conf like so to see if this will work:
DEVICE partitions
DEVICE /dev/md*
ARRAY /dev/md2 level=raid0 num-devices=2 UUID=5e6efe7d:6f5de80b:82ef7843:148cd518
devices=/dev/sdd1,/dev/sde1
ARRAY /dev/md1 level=raid0 num-devices=2 UUID=e81e74f9:1cf84f87:7747c1c9:b3f08a81
devices=/dev/sdb1,/dev/sdc1
ARRAY /dev/md0 level=raid1 num-devices=2 devices=/dev/md2,/dev/md1
Everything seems ok after boot. But again no /dev/md0 in /proc/mdstat. But then if I do a mdadm --assemble --scan it will then load /dev/md0.
Also do I need to create partitions? Or can I setup the whole drives as the array?
I have since upgraded to mdadm 1.8 and setup a RAID10. However I need something that is production worthy. Is a RAID10 something I could rely on as well? Also under a RAID10 how do you tell it which drives you want mirrored?
Any help appreciated.
Thank you,
Brad Dameron
SeaTab Software
www.seatab.com
For a more stable array, build a RAID0 out of 2 RAID1 arrays.
Like this:
mdadm --create /dev/md1 --level=1 --chunk=4 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm --create /dev/md2 --level=1 --chunk=4 --raid-devices=2 /dev/sdd1 /dev/sde1
mdadm --create /dev/md0 --level=0 --chunk=4 --raid-devices=2 /dev/md1 /dev/md2
You can put a file system directly on /dev/md0
Are all of the disks on the same cable?
Not sure about your booting issue.
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Brad Dameron
Sent: Tuesday, January 25, 2005 5:28 PM
To: [email protected]
Subject: Software RAID 0+1 with mdadm.
Been trying for days to get a software RAID 0+1 setup. This is on SuSe 9.2 with kernel 2.6.8-24.11-smp x86_64.
I am trying to setup a RAID 0+1 with 4 250gb SATA drives. I do the following:
mdadm --create /dev/md1 --level=0 --chunk=4 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm --create /dev/md2 --level=0 --chunk=4 --raid-devices=2 /dev/sdd1 /dev/sde1
mdadm --create /dev/md0 --level=1 --chunk=4 --raid-devices=2 /dev/md1 /dev/md2
This all works fine and I can mkreiserfs /dev/md0 and mount it. If I am then to reboot /dev/md1 and /dev/md2 will show up in the /proc/mdstat but not /dev/md0. So I create a /etc/mdadm.conf like so to see if this will work:
DEVICE partitions
DEVICE /dev/md*
ARRAY /dev/md2 level=raid0 num-devices=2 UUID=5e6efe7d:6f5de80b:82ef7843:148cd518
devices=/dev/sdd1,/dev/sde1
ARRAY /dev/md1 level=raid0 num-devices=2 UUID=e81e74f9:1cf84f87:7747c1c9:b3f08a81
devices=/dev/sdb1,/dev/sdc1
ARRAY /dev/md0 level=raid1 num-devices=2 devices=/dev/md2,/dev/md1
Everything seems ok after boot. But again no /dev/md0 in /proc/mdstat. But then if I do a mdadm --assemble --scan it will then load /dev/md0.
Also do I need to create partitions? Or can I setup the whole drives as the array?
I have since upgraded to mdadm 1.8 and setup a RAID10. However I need something that is production worthy. Is a RAID10 something I could rely on as well? Also under a RAID10 how do you tell it which drives you want mirrored?
Any help appreciated.
Thank you,
Brad Dameron
SeaTab Software
www.seatab.com
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Guy
For a more stable array, build a RAID0 out of 2 RAID1 arrays.
Like this:
mdadm --create
/dev/md1--level=1 --chunk=4 --raid-devices=2/dev/sdb1/dev/sdc1
mdadm --create/dev/md2--level=1 --chunk=4 --raid-devices=2/dev/sdd1/dev/sde1
mdadm --create/dev/md0--level=0 --chunk=4 --raid-devices=2/dev/md1/dev/md2
Quoted 8 lines
You can put a file system directly on
/dev/md0Are all of the disks on the same cable?
Not sure about your booting issue.
Guy
Ya I did this setup as well. Still the same booting issue. Once it's booted I can run mdadm --assemble --scan and it will find just the stripe and then add it. I saw several people having this issue on a google search. But never any solutions.
Brad Dameron
SeaTab Software
www.seatab.com
Sorry, I did not intend this to be the solution to your problem. Just a much more stable method for creating the 1+0 array. With this method, losing 1 disk only requires re-syncing 1 disk. With the array as a 0+1, if you lose 1 disk, you lose the whole RAID0 array, which then requires re-syncing 2 disks of data.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Brad Dameron
Sent: Wednesday, January 26, 2005 3:33 PM
To: [email protected]
Subject: RE: Software RAID 0+1 with mdadm.
Quoted 11 lines · Guy
For a more stable array, build a RAID0 out of 2 RAID1 arrays.
Like this:
mdadm --create
/dev/md1--level=1 --chunk=4 --raid-devices=2/dev/sdb1/dev/sdc1
mdadm --create/dev/md2--level=1 --chunk=4 --raid-devices=2/dev/sdd1/dev/sde1
mdadm --create/dev/md0--level=0 --chunk=4 --raid-devices=2/dev/md1/dev/md2
Quoted 8 lines
You can put a file system directly on
/dev/md0Are all of the disks on the same cable?
Not sure about your booting issue.
Guy
Ya I did this setup as well. Still the same booting issue. Once it's booted I can run mdadm --assemble --scan and it will find just the stripe and then add it. I saw several people having this issue on a google search. But never any solutions.
Brad Dameron
SeaTab Software
www.seatab.com
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · Brad Dameron
Everything seems ok after boot. But again no
/dev/md0in/proc/mdstat. But then if I do a mdadm --assemble --scan it will then load/dev/md0.
there is a bug in mdadm, see my mail "patches for mdadm 1.8.0" or wait for 1.9.0
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
This bug that's fixed in 1.9.0, is in a bug when you create the array? ie do we need to use 1.9.0 to create the array. I'm looking to do the same but my bootdisk currently only has 1.7.soemthing on it. Do I need to make a custom bootcd with 1.9.0 on it?
Thanks,
-ryan
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Luca Berra
Sent: Wednesday, January 26, 2005 9:17 AM
To: [email protected]
Subject: Re: Software RAID 0+1 with mdadm.
Quoted 2 lines · Brad Dameron
Everything seems ok after boot. But again no
/dev/md0in/proc/mdstat. But then if I do a mdadm --assemble --scan it will then load/dev/md0.
there is a bug in mdadm, see my mail "patches for mdadm 1.8.0" or wait for 1.9.0
L.
--
Luca Berra -- [email protected]
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · On Wednesday January 26, [email protected] wrote:
This bug that's fixed in 1.9.0, is in a bug when you create the array? ie do we need to use 1.9.0 to create the array. I'm looking to do the same but my bootdisk currently only has 1.7.soemthing on it. Do I need to make a custom bootcd with 1.9.0 on it?
This issue that will be fixed in 1.9.0 has nothing to do with creating the array.
It is only relevant for stacked arrays (e.g. a raid0 made out of 2 or more raid1 arrays), and only if you are using
mdadm --assemble --scan
(or similar) to assemble your arrays, and you specify the devices to scan in mdadm.conf as
DEVICES partitions
(i.e. don't list actual devices, just say to get them from the list of known partitions).
So, no: no need for a custom bootcd.
NeilBrown
Quoted 9 lines · Neil Brown
Quoted 4 lines · On Wednesday January 26, [email protected] wrote:
This bug that's fixed in 1.9.0, is in a bug when you create the array? ie do we need to use 1.9.0 to create the array. I'm looking to do the same but my bootdisk currently only has 1.7.soemthing on it. Do I need to make a custom bootcd with 1.9.0 on it?
This issue that will be fixed in 1.9.0 has nothing to do with creating the array.
Quoted 8 lines
It is only relevant for stacked arrays (e.g. a raid0 made out of 2 or more raid1 arrays), and only if you are using
mdadm --assemble --scan
(or similar) to assemble your arrays, and you specify the devices to scan in mdadm.conf as
DEVICES partitions
(i.e. don't list actual devices, just say to get them from the list of known partitions).
actually the last statement is not true, a missing close(mdfd); causes mdadm --assemble --scan to fail the first round even if you do specify DEV /dev/mdX in mdadm.conf.
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
By the way the patches did not fix my boot issue with the RAID 1+0. I am using SuSe 9.2 if this helps. I've had to add in a few extra lines into my boot.local to get it show up at boot.
Brad Dameron
SeaTab Software
www.seatab.com
Quoted 40 lines · J. Ryan Earl
This bug that's fixed in 1.9.0, is in a bug when you create the array? ie do we need to use 1.9.0 to create the array. I'm looking to do the same but my bootdisk currently only has 1.7.soemthing on it. Do I need to make a custom bootcd with 1.9.0 on it?
Thanks,
-ryan-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Luca Berra
Sent: Wednesday, January 26, 2005 9:17 AM
To: [email protected]
Subject: Re: Software RAID 0+1 with mdadm.Quoted 2 lines · Brad Dameron
Everything seems ok after boot. But again no
/dev/md0in/proc/mdstat. But then if I do a mdadm --assemble --scan it will then load/dev/md0.there is a bug in mdadm, see my mail "patches for mdadm 1.8.0" or wait for 1.9.0
L.
--
Luca Berra -- [email protected]
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 29 lines · On Tuesday January 25, [email protected] wrote:
Been trying for days to get a software RAID 0+1 setup. This is on SuSe 9.2 with kernel 2.6.8-24.11-smp
x86_64.I am trying to setup a RAID 0+1 with 4 250gb SATA drives. I do the following:
mdadm --create
/dev/md1--level=0 --chunk=4 --raid-devices=2/dev/sdb1/dev/sdc1
mdadm --create/dev/md2--level=0 --chunk=4 --raid-devices=2/dev/sdd1/dev/sde1
mdadm --create/dev/md0--level=1 --chunk=4 --raid-devices=2/dev/md1/dev/md2This all works fine and I can mkreiserfs
/dev/md0and mount it. If I am then to reboot/dev/md1and/dev/md2will show up in the/proc/mdstatbut not/dev/md0. So I create a/etc/mdadm.conflike so to see if this will work:DEVICE partitions
DEVICE/dev/md*
ARRAY/dev/md2level=raid0 num-devices=2 UUID=5e6efe7d:6f5de80b:82ef7843:148cd518
devices=/dev/sdd1,/dev/sde1
ARRAY/dev/md1level=raid0 num-devices=2 UUID=e81e74f9:1cf84f87:7747c1c9:b3f08a81
devices=/dev/sdb1,/dev/sdc1
ARRAY/dev/md0level=raid1 num-devices=2 devices=/dev/md2,/dev/md1
Quoted 3 lines
Everything seems ok after boot. But again no
/dev/md0in/proc/mdstat. But then if I do a mdadm --assemble --scan it will then load/dev/md0.
My guess is that you are (or SuSE is) relying on "autodetect" to assemble the arrays. Autodetect cannot assemble an array made of other arrays. Just an array made of partitions.
If you disable the autodetect stuff and make sure
mdadm --assemble --scan
is in a boot-script somewhere, it should just work.
Also, you don't really want the "device=/dev/sdd1..." entries in mdadm.conf.
They tell mdadm to require the devices to have those names. If you add or remove scsi drives at all, the names can change. Just rely on the UUID.
Quoted 3 lines
Also do I need to create partitions? Or can I setup the whole drives as the array?
You don't need partitions.
Quoted 5 lines
I have since upgraded to mdadm 1.8 and setup a RAID10. However I need something that is production worthy. Is a RAID10 something I could rely on as well? Also under a RAID10 how do you tell it which drives you want mirrored?
raid10 is 2.6 only, but should be quite stable.
You cannot tell it which drives to mirror because you shouldn't care. You just give it a bunch of identical drives and let it put the data where it wants.
If you really want to care (and I cannot imagine why you would - all drives in a raid10 are likely to get similar load) then you have to build it "by hand" - a raid0 of multiple raid1s.
NeilBrown
Quoted 6 lines
Quoted 5 lines
I have since upgraded to mdadm 1.8 and setup a RAID10. However I need something that is production worthy. Is a RAID10 something I could rely on as well? Also under a RAID10 how do you tell it which drives you want mirrored?
Quoted 9 lines
raid10 is 2.6 only, but should be quite stable.
You cannot tell it which drives to mirror because you shouldn't care. You just give it a bunch of identical drives and let it put the data where it wants.If you really want to care (and I cannot imagine why you would - all drives in a raid10 are likely to get similar load) then you have to build it "by hand" - a raid0 of multiple raid1s.
But what about redundancy? The only reason why on some systems I choose raid 1+0 and not raid10, is that I want the raid 1 always on two different controllers or channels. So if there is some problem with the SCSI bus you will only loose one half of your array. I think with raid10 it can be that you loose your complete array, because a whole raid1 can sit on a single controller/channel. Is this assumption correct, or does raid10 have some magic to solve this?
Thanks,
Holger
RAID10 will work with an odd number of disks! If really is cool!
But, since you need control of what is where, you don't want RAID10.
You should create RAID1 arrays. Each of your RAID1 arrays should have 2 disks, each on a different controller/channel. Then create a single RAID0 array out of the RAID1 arrays.
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Holger Kiehl
Sent: Thursday, January 27, 2005 3:13 AM
To: Neil Brown
Cc: linux-raid
Subject: Re: Software RAID 0+1 with mdadm.
Quoted 6 lines
Quoted 5 lines
I have since upgraded to mdadm 1.8 and setup a RAID10. However I need something that is production worthy. Is a RAID10 something I could rely on as well? Also under a RAID10 how do you tell it which drives you want mirrored?
Quoted 9 lines
raid10 is 2.6 only, but should be quite stable.
You cannot tell it which drives to mirror because you shouldn't care. You just give it a bunch of identical drives and let it put the data where it wants.If you really want to care (and I cannot imagine why you would - all drives in a raid10 are likely to get similar load) then you have to build it "by hand" - a raid0 of multiple raid1s.
But what about redundancy? The only reason why on some systems I choose raid 1+0 and not raid10, is that I want the raid 1 always on two different controllers or channels. So if there is some problem with the SCSI bus you will only loose one half of your array. I think with raid10 it can be that you loose your complete array, because a whole raid1 can sit on a single controller/channel. Is this assumption correct, or does raid10 have some magic to solve this?
Thanks,
Holger
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)
Quoted 1 line · Guy
RAID10 will work with an odd number of disks! If really is cool!
It will? How? Does it just make the last mirror "pair" have 3 disks or what?
If so then wouldn't it be better just to not have that disk under md and use it for someting else?
Quoted 1 line
Quoted 1 line
Quoted 1 line
The optimum programming team size is 1.
Has Jurassic Park taught us nothing?
-- pfilandr
RE: RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)
It rotates the pairs!
Assume 3 disks, A, B and C.
Each stripe would be on these disks:
A+B
C+A
B+C
A+B
C+A
B+C
...
Maybe not exactly as above, but if not, something similar.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Andy Smith
Sent: Thursday, January 27, 2005 11:19 AM
To: 'linux-raid'
Subject: RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)
Quoted 1 line · Guy
RAID10 will work with an odd number of disks! If really is cool!
It will? How? Does it just make the last mirror "pair" have 3 disks or what?
If so then wouldn't it be better just to not have that disk under md and use it for someting else?
Quoted 1 line
Quoted 1 line
Quoted 1 line
The optimum programming team size is 1.
Has Jurassic Park taught us nothing?
-- pfilandr
Re: RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)
Quoted 10 lines · Guy
It rotates the pairs!
Assume 3 disks, A, B and C.
Each stripe would be on these disks:
A+B
C+A
B+C
A+B
C+A
B+C
...
Hmm, difficult to visualise and comprehend if there are any differences as opposed to "normal" RAID-10.
Is this anything like how RAID-1E works on IBM ServeRAID?
Re: RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)
Quoted 12 lines · Andy Smith
Quoted 10 lines · Guy
It rotates the pairs!
Assume 3 disks, A, B and C.
Each stripe would be on these disks:
A+B
C+A
B+C
A+B
C+A
B+C
...
Quoted 4 lines
Hmm, difficult to visualise and comprehend if there are any differences as opposed to "normal" RAID-10.
Is this anything like how RAID-1E works on IBM ServeRAID?
This seems relevant:
RE: RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)
A normal RAID 10 requires an even number of disks.
Neil gave a detailed description. Maybe 6 months ago. Do a search for RAID10 or raid10.
I just looked at the link you gave. RAID-1E does look like the RAID10 that md supports. Until today, I had never seen RAID-1E.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Andy Smith
Sent: Thursday, January 27, 2005 12:42 PM
To: 'linux-raid'
Subject: Re: RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)
Quoted 12 lines · Andy Smith
Quoted 10 lines · Guy
It rotates the pairs!
Assume 3 disks, A, B and C.
Each stripe would be on these disks:
A+B
C+A
B+C
A+B
C+A
B+C
...
Quoted 4 lines
Hmm, difficult to visualise and comprehend if there are any differences as opposed to "normal" RAID-10.
Is this anything like how RAID-1E works on IBM ServeRAID?
This seems relevant:
http://www.adaptec.com/worldwide/product/markeditorial.html?sess=no&language
=English+US&prodkey=raid_10_alternatives&type=White%20Papers
Re: RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)
In reply to GuyIn the past, I have found the quite often, too often, the disk errors happened in the 1st sectors of the disk (and I still have to reboot often). It does not look good when losing a whole disk, eh? b-
Quoted 30 lines · Guy
It rotates the pairs!
Assume 3 disks, A, B and C.
Each stripe would be on these disks:
A+B
C+A
B+C
A+B
C+A
B+C
...Maybe not exactly as above, but if not, something similar.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Andy Smith
Sent: Thursday, January 27, 2005 11:19 AM
To: 'linux-raid'
Subject: RAID-10 with odd number of disks (was Re: Software RAID 0+1 with mdadm.)Quoted 1 line · Guy
RAID10 will work with an odd number of disks! If really is cool!
It will? How? Does it just make the last mirror "pair" have 3 disks or what?
If so then wouldn't it be better just to not have that disk under md and use it for someting else?
Signature · 1 line
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/