Please review: Slackware RAID How-To
As mentioned, I have created a Slackware RAID How-To and an initial draft is located here:
http://www.langefamily.ca/howto/SlackwareRaidHowTo.html
This document covers getting Slackware installed on a system with RAID. This technique does not require a temporary hard drive or anything other than a Slackware boot CD.
I am fairly new to linux software RAID so I really hope some more experienced people will take some time to read it and give me some feedback. I would hate to have some glaring errors inflicted on others!
Thanks.
Signature · 1 line
John Lange
Thanks John, I've been wrestling with this for a while. I ended up having to use a RedHat9 install to get RAID 1 working on one particular box ... RAID is my last reason to use RedHat after discovering the joy of simplicity, Slackware style. I was using mdadm in my Slackware RAID experiments, and a different approach, but it only ever half worked (almost certainly the problem was with me, not mdadm!).
Unfortunately, I don't have a spare box lying around that I can test this on right now, but I will follow this HOWTO's development with great interest and give it a go as soon as I can. I'm mainly interested in super reliable 2 disc RAID 1 setups, but it looks like most things still apply.
Any comments on SATA disks? I'm not sure where SATA fits in to all this (is it an issue?).
A reliable method for building bootable RAID on Slackware for non-gurus will propel Slackware into the realm of the "truly awesome" for me, I've been a RedHat jock for too long!
Mick
Quoted 14 lines · John Lange
As mentioned, I have created a Slackware RAID How-To and an initial draft is located here:
http://www.langefamily.ca/howto/SlackwareRaidHowTo.html
This document covers getting Slackware installed on a system with RAID. This technique does not require a temporary hard drive or anything other than a Slackware boot CD.
I am fairly new to linux software RAID so I really hope some more experienced people will take some time to read it and give me some feedback. I would hate to have some glaring errors inflicted on others!
Thanks.
Signature · 8 lines
-------------------------------------- Ninti Systems: Smart IT Solutions Michael Hall Mobile: 0429 095 392 Ph/Fax: 08 8953 1442 Email: office at ninti dot com dot au Web: http://ninti.com.au --------------------------------------
John, I've had a chance to review the Slackware RAID How-to, which I used to help build a RAID1 array with two disks under Slackware 9.1.
Building the arrays went like a dream, I don't know why I never thought of doing it this way before, rather than trying to work with degraded arrays etc after the OS was already installed.
I had some initial problems loading software, I kept getting disk full messages, but I think that was an installer script issue: it doesn't seem very tolerant of option changes being made, and there is often no going back if you make a wrong selection.
Anyway, I built the arrays and installed the OS, but can't get LILO figured out. No matter whether I try to use automatic or expert mode, I can't install LILO to either the MBR or /boot. So I never get a bootable system at the end of the process.
I've read the lilo and lilo.conf man pages to try a find out what my lilo.conf file should look like and what files should be where (eg vmLinuz etc), but they're not much use to someone new to this.
Quoted 14 lines · John Lange
As mentioned, I have created a Slackware RAID How-To and an initial draft is located here:
http://www.langefamily.ca/howto/SlackwareRaidHowTo.html
This document covers getting Slackware installed on a system with RAID. This technique does not require a temporary hard drive or anything other than a Slackware boot CD.
I am fairly new to linux software RAID so I really hope some more experienced people will take some time to read it and give me some feedback. I would hate to have some glaring errors inflicted on others!
Thanks.
Signature · 8 lines
-------------------------------------- Ninti Systems: Smart IT Solutions Michael Hall Mobile: 0429 095 392 Ph/Fax: 08 8953 1442 Email: office at ninti dot com dot au Web: http://ninti.com.au --------------------------------------
I had another go with a new slackware.iso and lilo appears to have installed OK this time (no complaints anyway), but still can't boot (kernal panics as it cant find init).
Another start up message:
RAID level 1 does not need chunksize! Continuing anyway.
Mick
Quoted 14 lines · John Lange
As mentioned, I have created a Slackware RAID How-To and an initial draft is located here:
http://www.langefamily.ca/howto/SlackwareRaidHowTo.html
This document covers getting Slackware installed on a system with RAID. This technique does not require a temporary hard drive or anything other than a Slackware boot CD.
I am fairly new to linux software RAID so I really hope some more experienced people will take some time to read it and give me some feedback. I would hate to have some glaring errors inflicted on others!
Thanks.
Signature · 8 lines
-------------------------------------- Ninti Systems: Smart IT Solutions Michael Hall Mobile: 0429 095 392 Ph/Fax: 08 8953 1442 Email: office at ninti dot com dot au Web: http://ninti.com.au --------------------------------------
If at first you don't succeed ...
Success at last, or so it seems. The new sections on lilo were quite helpful, I could have used even more hand-holding on the whole lilo thing (MBR vs root, etc), though I suppose that is a different topic really.
One of my problems previously was that the box didn't have a floppy drive, so a boot disk wasn't an option for changing lilo.conf.
Also, this time I formatted with mke2fs rather than letting setup do it, as you suggest.
I'm wondering, is the stride=32 parameter to mke2fs necessary for RAID1 arrays? I used it anyway.
If I were to suggest any new info to be included in the HOW-TO, maybe the setup of simple RAID1 with two disks could be explicitly addressed as well. Perhaps this could then lead onto RAID5 setup.
Anyway, thanks a lot John, I've still got a lot to learn, but this is a great start.
Mick
Quoted 14 lines · John Lange
As mentioned, I have created a Slackware RAID How-To and an initial draft is located here:
http://www.langefamily.ca/howto/SlackwareRaidHowTo.html
This document covers getting Slackware installed on a system with RAID. This technique does not require a temporary hard drive or anything other than a Slackware boot CD.
I am fairly new to linux software RAID so I really hope some more experienced people will take some time to read it and give me some feedback. I would hate to have some glaring errors inflicted on others!
Thanks.
Signature · 8 lines
-------------------------------------- Ninti Systems: Smart IT Solutions Michael Hall Mobile: 0429 095 392 Ph/Fax: 08 8953 1442 Email: office at ninti dot com dot au Web: http://ninti.com.au --------------------------------------
Stride=32
Using the example. md0 and md1 are RAID1, md2 is RAID5
RAID1 does not have a strip size. Therefore stride=anything would be wrong, but may not hurt, not sure. Filesystem gods watching?
md2 has 4 disks with a chunk size of 128K. Since only 3 disks are used for data, and the filesystem block size is 4K, the stride size should be 128*3/4, or 96.
Change:
mke2fs -b 4096 -R stride=32 /dev/md2 To: mke2fs -b 4096 -R stride=96 /dev/md2
Hay, I may be wrong! I have never noticed the stride option before 5 minutes ago! 10 - 15 minutes now. Got to type faster! :)
If I misread, or misunderstood anything, please correct me fast!
From "man mke2fs":
stride=stripe-size
Configure the filesystem for a RAID array with stripe-size filesystem blocks per stripe.
My logic:
"Stripe size" is "chunk size" times "number of data disks". From example:
"chunk size" = 128
"number of data disks" = "nr-raid-disks" - 1 (-2 if RAID6)
On a related subject...
I use grub, not lilo!
Please consider a grub section.
Is one better than the other?
The only reason I use grub is 2-3 years ago I was told grub was
newer.
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ninti Systems
Sent: Sunday, May 16, 2004 10:37 PM
To: John Lange
Cc: LinuxRaid
Subject: Re: Please review: Slackware RAID How-To
If at first you don't succeed ...
Success at last, or so it seems. The new sections on lilo were quite helpful, I could have used even more hand-holding on the whole lilo thing (MBR vs root, etc), though I suppose that is a different topic really.
One of my problems previously was that the box didn't have a floppy drive, so a boot disk wasn't an option for changing lilo.conf.
Also, this time I formatted with mke2fs rather than letting setup do it, as you suggest.
I'm wondering, is the stride=32 parameter to mke2fs necessary for RAID1 arrays? I used it anyway.
If I were to suggest any new info to be included in the HOW-TO, maybe the setup of simple RAID1 with two disks could be explicitly addressed as well. Perhaps this could then lead onto RAID5 setup.
Anyway, thanks a lot John, I've still got a lot to learn, but this is a great start.
Mick
Quoted 14 lines · John Lange
As mentioned, I have created a Slackware RAID How-To and an initial draft is located here:
http://www.langefamily.ca/howto/SlackwareRaidHowTo.html
This document covers getting Slackware installed on a system with RAID. This technique does not require a temporary hard drive or anything other than a Slackware boot CD.
I am fairly new to linux software RAID so I really hope some more experienced people will take some time to read it and give me some feedback. I would hate to have some glaring errors inflicted on others!
Thanks.
Signature · 13 lines
-------------------------------------- Ninti Systems: Smart IT Solutions Michael Hall Mobile: 0429 095 392 Ph/Fax: 08 8953 1442 Email: office at ninti dot com dot au Web: http://ninti.com.au -------------------------------------- - 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
I too considered lilo a relic of the past until I started using Slackware. Oh well, it seems to do much the same thing, so I'm getting used to it again. Slackware is very up to date in most other areas, so I guess Patrick Volkerding hasn't seen a good enough reason to switch to grub. I suppose newer doesn't always mean better. Still, a grub section as you suggest would help round things out. BTW John, I'm happy to help out with the HOW-TO in any way if I can, don't expect you to do everything!
Mick
Quoted 7 lines · Guy
On a related subject...
I use grub, not lilo!
Please consider a grub section.
Is one better than the other?
The only reason I use grub is 2-3 years ago I was told grub was
newer.
Quoted 8 lines · Guy
md2 has 4 disks with a chunk size of 128K. Since only 3 disks are used for data, and the filesystem block size is 4K, the stride size should be 128*3/4, or 96.
Change:mke2fs -b 4096 -R stride=32 /dev/md2 To: mke2fs -b 4096 -R stride=96 /dev/md2
Quoted 5 lines
My logic:
"Stripe size" is "chunk size" times "number of data disks". From example:
"chunk size" = 128
"number of data disks" = "nr-raid-disks" - 1 (-2 if RAID6)
I think this is incorrect. At this point I defer to the Software-RAID-HOWTO.
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.10
From that document stride is chucksize/blocksize . Number of disks does not enter into it.
So with a chunksize of 128, and a block size of 4 it would be:
128K/4K = 32 for stride.
If this is indeed correct I will be sure to expand that area of the How-To so it is more clear.
Thanks very much for your feedback.
Regards,
John Lange
But is the stride parameter required at all if I'm only building a RAID1 array with two disks?
Also, is the chunk size necessary in this case as I remember getting a message on boot up to the effect that "Chunk size not necessary here, but proceeding anyway!".
Thanks
Mick
Quoted 40 lines · John Lange
Quoted 8 lines · Guy
md2 has 4 disks with a chunk size of 128K. Since only 3 disks are used for data, and the filesystem block size is 4K, the stride size should be 128*3/4, or 96.
Change:mke2fs -b 4096 -R stride=32 /dev/md2 To: mke2fs -b 4096 -R stride=96 /dev/md2Quoted 5 lines
My logic:
"Stripe size" is "chunk size" times "number of data disks". From example:
"chunk size" = 128
"number of data disks" = "nr-raid-disks" - 1 (-2 if RAID6)I think this is incorrect. At this point I defer to the Software-RAID-HOWTO.
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.10
Quoted 1 line
From that document stride is chucksize/blocksize . Number of disks does
not enter into it.
So with a chunksize of 128, and a block size of 4 it would be:
128K/4K = 32 for stride.
If this is indeed correct I will be sure to expand that area of the How-To so it is more clear.
Thanks very much for your feedback.
Regards,
John Lange
-
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
Signature · 8 lines
-------------------------------------- Ninti Systems: Smart IT Solutions Michael Hall Mobile: 0429 095 392 Ph/Fax: 08 8953 1442 Email: office at ninti dot com dot au Web: http://ninti.com.au --------------------------------------
As I understand it, RAID1 does not have a chunk size, or a strip size. So stride should not apply.
No need to have that keyword in the config file.
RAID0 does have a chunk size.
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ninti Systems
Sent: Wednesday, May 19, 2004 10:06 PM
To: 'LinuxRaid'
Subject: RE: Please review: Slackware RAID How-To
But is the stride parameter required at all if I'm only building a RAID1 array with two disks?
Also, is the chunk size necessary in this case as I remember getting a message on boot up to the effect that "Chunk size not necessary here, but proceeding anyway!".
Thanks
Mick
Quoted 2 lines · John Lange
Quoted 1 line · Guy
md2 has 4 disks with a chunk size of 128K. Since only 3 disks are used
for
Quoted 38 lines
Quoted 7 lines
data, and the filesystem block size is 4K, the stride size should be 128*3/4, or 96.
Change:mke2fs -b 4096 -R stride=32 /dev/md2 To: mke2fs -b 4096 -R stride=96 /dev/md2Quoted 5 lines
My logic:
"Stripe size" is "chunk size" times "number of data disks". From example:
"chunk size" = 128
"number of data disks" = "nr-raid-disks" - 1 (-2 if RAID6)I think this is incorrect. At this point I defer to the Software-RAID-HOWTO.
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.10
Quoted 1 line
From that document stride is chucksize/blocksize . Number of disks does
not enter into it.
So with a chunksize of 128, and a block size of 4 it would be:
128K/4K = 32 for stride.
If this is indeed correct I will be sure to expand that area of the How-To so it is more clear.
Thanks very much for your feedback.
Regards,
John Lange
-
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
Signature · 13 lines
-------------------------------------- Ninti Systems: Smart IT Solutions Michael Hall Mobile: 0429 095 392 Ph/Fax: 08 8953 1442 Email: office at ninti dot com dot au Web: http://ninti.com.au -------------------------------------- - 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
No, stride is not needed for RAID 1 as stride is about striping and RAID 1 does not do striping, it does mirroring.
According to man raidtab, chunk-size "Sets the stripe size to size kilobytes.". So unless I'm completely off my rocker, chunk-size is also not needed for RAID 1 as it also only applies to striping.
Thanks for pointing that out. I have removed it from my HowTo.
I believe this error is also in the Software RAID HowTo which is where I copied my examples from.
Regards,
Signature · 1 line
John Lange
Quoted 53 lines · Ninti Systems
But is the stride parameter required at all if I'm only building a RAID1 array with two disks?
Also, is the chunk size necessary in this case as I remember getting a message on boot up to the effect that "Chunk size not necessary here, but proceeding anyway!".
Thanks
Mick
Quoted 40 lines · John Lange
Quoted 8 lines · Guy
md2 has 4 disks with a chunk size of 128K. Since only 3 disks are used for data, and the filesystem block size is 4K, the stride size should be 128*3/4, or 96.
Change:mke2fs -b 4096 -R stride=32 /dev/md2 To: mke2fs -b 4096 -R stride=96 /dev/md2Quoted 5 lines
My logic:
"Stripe size" is "chunk size" times "number of data disks". From example:
"chunk size" = 128
"number of data disks" = "nr-raid-disks" - 1 (-2 if RAID6)I think this is incorrect. At this point I defer to the Software-RAID-HOWTO.
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.10
Quoted 1 line
From that document stride is chucksize/blocksize . Number of disks does
not enter into it.
So with a chunksize of 128, and a block size of 4 it would be:
128K/4K = 32 for stride.
If this is indeed correct I will be sure to expand that area of the How-To so it is more clear.
Thanks very much for your feedback.
Regards,
John Lange
-
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
More info!
I found this comment in another group. It would indicate "stripe size" should be used. But it should not make a difference.
Guy
=======================================================================
The stride option places the inode and block bitmaps so that successive block groups' bitmaps are on a different RAID stripes. I suppose this might improve disk I/O performance, as the bitmaps are the most heavily used blocks on the disk. However, the cache should prevent most of the I/O in the first place...
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of John Lange
Sent: Wednesday, May 19, 2004 11:34 PM
To: [email protected]
Cc: LinuxRaid
Subject: RE: Please review: Slackware RAID How-To
No, stride is not needed for RAID 1 as stride is about striping and RAID 1 does not do striping, it does mirroring.
According to man raidtab, chunk-size "Sets the stripe size to size kilobytes.". So unless I'm completely off my rocker, chunk-size is also not needed for RAID 1 as it also only applies to striping.
Thanks for pointing that out. I have removed it from my HowTo.
I believe this error is also in the Software RAID HowTo which is where I copied my examples from.
Regards,
Signature · 1 line
John Lange
Quoted 7 lines · Ninti Systems
But is the stride parameter required at all if I'm only building a RAID1 array with two disks?
Also, is the chunk size necessary in this case as I remember getting a message on boot up to the effect that "Chunk size not necessary here, but proceeding anyway!".
Quoted 8 lines
Thanks
Mick
Quoted 2 lines · John Lange
Quoted 1 line · Guy
md2 has 4 disks with a chunk size of 128K. Since only 3 disks are
used for
Quoted 30 lines
Quoted 30 lines
Quoted 7 lines
data, and the filesystem block size is 4K, the stride size should be 128*3/4, or 96.
Change:mke2fs -b 4096 -R stride=32 /dev/md2 To: mke2fs -b 4096 -R stride=96 /dev/md2Quoted 5 lines
My logic:
"Stripe size" is "chunk size" times "number of data disks". From example:
"chunk size" = 128
"number of data disks" = "nr-raid-disks" - 1 (-2 if RAID6)I think this is incorrect. At this point I defer to the Software-RAID-HOWTO.
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.10
Quoted 1 line
From that document stride is chucksize/blocksize . Number of disks does
not enter into it.
So with a chunksize of 128, and a block size of 4 it would be:
128K/4K = 32 for stride.
If this is indeed correct I will be sure to expand that area of the How-To so it is more clear.
Thanks very much for your feedback.
Quoted 8 lines
Quoted 8 lines
Regards,
John Lange
-
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
Hey Guy. Thanks very much for your research.
Since we couldn't seem to come up with a definitive answer I decided to resort to some tests. I have a little RAID 5 array comprised of 3 8G SCSI disks in a old Dell PowerEdge (same box mentioned in the How-To).
Just for reference here is it's raidtab:
raiddev /dev/md0
raid-level 5 nr-raid-disks 3 nr-spare-disks 0 chunk-size 32 persistent-superblock 1 parity-algorithm left-symmetric device /dev/sdb1 raid-disk 0 device /dev/sdc1 raid-disk 1 device /dev/sdd1 raid-disk 2
I used mke2fs to format the drive in 3 different ways with variable stride settings then ran bonnie++ on it.
The settings were:
stride=64
stride=4
stride=512
The first two are based on the different formulas we discussed. I tried 512 just because I thought I'd do something a bit crazy to see if it made any difference.
The results in bonnie++ were almost statistically identical in every case. The only difference in performance was a 20% drop in random seeks when stride=512 but the rest of the performance indicators were almost identical. I repeated the test to make sure it wasn't a blip.
So the bottom line is; for me, neither chunk-size OR stride makes any difference to performance.
John Lange
Quoted 35 lines · Guy
More info!
I found this comment in another group. It would indicate "stripe size" should be used. But it should not make a difference.
Guy
=======================================================================
The stride option places the inode and block bitmaps so that successive block groups' bitmaps are on a different RAID stripes. I suppose this might improve disk I/O performance, as the bitmaps are the most heavily used blocks on the disk. However, the cache should prevent most of the I/O in the first place...-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of John Lange
Sent: Wednesday, May 19, 2004 11:34 PM
To: [email protected]
Cc: LinuxRaid
Subject: RE: Please review: Slackware RAID How-ToNo, stride is not needed for RAID 1 as stride is about striping and RAID 1 does not do striping, it does mirroring.
According to man raidtab, chunk-size "Sets the stripe size to size kilobytes.". So unless I'm completely off my rocker, chunk-size is also not needed for RAID 1 as it also only applies to striping.
Thanks for pointing that out. I have removed it from my HowTo.
I believe this error is also in the Software RAID HowTo which is where I copied my examples from.
Regards,
Where did you get 64 and 4?
I don't know your fs block size. I assume it is 4k. Your chunk size is 32k. Your stripe size is 32K * (3-1)
1. stride based on chunk size
Stride = chunk/block 8 = 32K/4K
2. stride based on stripe size
Stride = chunk * (N-1) / block 16 = 32*(3-1) / 4
Please re-do your tests with stride of 8 and 16.
Thanks,
Guy
-----Original Message-----
From: John Lange [mailto:[email protected]]
Sent: Thursday, May 20, 2004 3:59 AM
To: Guy
Cc: 'LinuxRaid'
Subject: RE: Please review: Slackware RAID How-To
Hey Guy. Thanks very much for your research.
Since we couldn't seem to come up with a definitive answer I decided to resort to some tests. I have a little RAID 5 array comprised of 3 8G SCSI disks in a old Dell PowerEdge (same box mentioned in the How-To).
Just for reference here is it's raidtab:
raiddev /dev/md0
raid-level 5 nr-raid-disks 3 nr-spare-disks 0 chunk-size 32 persistent-superblock 1 parity-algorithm left-symmetric device /dev/sdb1 raid-disk 0 device /dev/sdc1 raid-disk 1 device /dev/sdd1 raid-disk 2
I used mke2fs to format the drive in 3 different ways with variable stride settings then ran bonnie++ on it.
The settings were:
stride=64
stride=4
stride=512
The first two are based on the different formulas we discussed. I tried 512 just because I thought I'd do something a bit crazy to see if it made any difference.
The results in bonnie++ were almost statistically identical in every case. The only difference in performance was a 20% drop in random seeks when stride=512 but the rest of the performance indicators were almost identical. I repeated the test to make sure it wasn't a blip.
So the bottom line is; for me, neither chunk-size OR stride makes any difference to performance.
John Lange
Quoted 35 lines · Guy
More info!
I found this comment in another group. It would indicate "stripe size" should be used. But it should not make a difference.
Guy
=======================================================================
The stride option places the inode and block bitmaps so that successive block groups' bitmaps are on a different RAID stripes. I suppose this might improve disk I/O performance, as the bitmaps are the most heavily used blocks on the disk. However, the cache should prevent most of the I/O in the first place...-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of John Lange
Sent: Wednesday, May 19, 2004 11:34 PM
To: [email protected]
Cc: LinuxRaid
Subject: RE: Please review: Slackware RAID How-ToNo, stride is not needed for RAID 1 as stride is about striping and RAID 1 does not do striping, it does mirroring.
According to man raidtab, chunk-size "Sets the stripe size to size kilobytes.". So unless I'm completely off my rocker, chunk-size is also not needed for RAID 1 as it also only applies to striping.
Thanks for pointing that out. I have removed it from my HowTo.
I believe this error is also in the Software RAID HowTo which is where I copied my examples from.
Regards,
Here's a couple more Slackware RAID1 tidbits:
I'm building another RAID1 array right now on Slackware 9.1 using the "Lange Method" :-)
1. I omitted "chunk-size" from /etc/raidtab, and got an error message. I had to add it before I could proceed. I suppose that answers my own "is chnk-size really necessary for RAID1" question. I went for size=4.
2. I am trying to create 5 devices (/dev/md0 to /dev/md4). The /dev/ directory (the one on the install CD I suppose it must be) only has 4 md devices (0 to 3). I tried creating an extra /dev/md4, but couldn't make it happen. An installed system has 16 possible md devices.
Mick
That will teach you!
mkraid and raidstart are considered obsolete by this group. Use mdadm.
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ninti Systems
Sent: Thursday, May 20, 2004 10:25 PM
To: John Lange
Cc: 'LinuxRaid'
Subject: RE: Please review: Slackware RAID How-To
Here's a couple more Slackware RAID1 tidbits:
I'm building another RAID1 array right now on Slackware 9.1 using the "Lange Method" :-)
1. I omitted "chunk-size" from /etc/raidtab, and got an error message. I had to add it before I could proceed. I suppose that answers my own "is chnk-size really necessary for RAID1" question. I went for size=4.
2. I am trying to create 5 devices (/dev/md0 to /dev/md4). The /dev/ directory (the one on the install CD I suppose it must be) only has 4 md devices (0 to 3). I tried creating an extra /dev/md4, but couldn't make it happen. An installed system has 16 possible md devices.
Mick
-
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
Further to my last posting re RAID1 on Slackware 9.1 using the "Lange Method":
Building extra arrays after booting into the installed system seems to work as expected. It just means that "core" filesystems like /var or /tmp can't be easily installed across more than 4 raid arrays during setup. I guess that some filesystem copying and fstab editing might solve this if really necessary.
How/where can I access the raidtab file on the install CD during setup? This would be a good point to include in the HOW-TO.
Mick
The man page says "strip size", not "chunk size", which is correct?
RAID5:
"strip size" = ("Number of disks in array" - 1) * "chunk size"
RAID6:
"strip size" = ("Number of disks in array" - 2) * "chunk size"
"Number of disks in array" does not include spares!
It would be GREAT for performance if writes were full strips at a time, since no reads would be required.
I don't think it would help performance if writes were full chunks at a time, since the target chunk would still need to be read to compute the parity chunk.
Any filesystem gods out there? Any opinions?
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of John Lange
Sent: Wednesday, May 19, 2004 9:42 PM
To: Guy
Cc: 'LinuxRaid'
Subject: RE: Please review: Slackware RAID How-To
Quoted 1 line · Guy
md2 has 4 disks with a chunk size of 128K. Since only 3 disks are used
for
Quoted 7 lines
data, and the filesystem block size is 4K, the stride size should be 128*3/4, or 96.
Change:mke2fs -b 4096 -R stride=32 /dev/md2 To: mke2fs -b 4096 -R stride=96 /dev/md2
Quoted 5 lines
My logic:
"Stripe size" is "chunk size" times "number of data disks". From example:
"chunk size" = 128
"number of data disks" = "nr-raid-disks" - 1 (-2 if RAID6)
I think this is incorrect. At this point I defer to the Software-RAID-HOWTO.
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.10
From that document stride is chucksize/blocksize . Number of disks does not enter into it.
So with a chunksize of 128, and a block size of 4 it would be:
128K/4K = 32 for stride.
If this is indeed correct I will be sure to expand that area of the How-To so it is more clear.
Thanks very much for your feedback.
Regards,
John Lange
-
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
I looked at the code. The stride option only seems to align tables on a boundary (stride size). The stride size is only used to define the starting point of a table, not the table size. The stride size does not affect disk writes as far as I can tell. At least not directly.
Also, the change log talks about RAID0 stride size. No comments on RAID5. The comments are dated 1997 and 1998. Maybe RAID5 came after 1997/1998.
Anyway, based on what I found in the code, I bet if you base "stride size" on "chunk size" you will be fine.
But maybe "stride size" should be based on "stripe size" sometime in the future! See my comments below.
Guy
This is the code:
===========================================================================
This is the only place stride is used in the code. From misc/mke2fs.c
/*
* Allocate the block and inode bitmaps, if necessary
*/
if (fs->stride) {
start_blk = group_blk + fs->inode_blocks_per_group;
start_blk += ((fs->stride * group) %
(last_blk - start_blk));
if (start_blk > last_blk)
start_blk = group_blk;
} else
start_blk = group_blk;===========================================================================
There was also some other hard coded STRIDE_LENGTH stuff. STRIDE_LENGTH is NOT related to stride.
I think they should be the same.
The disk i/o is at a size of STRIDE_LENGTH.
If this was 1 stripe the RAID5, RAID0 or RAID6 software may go faster. This hard coded 8 seems wrong to me.
I bet it matched the writers chunk size at the time, and maybe he planned to make it a parameter after testing.
Also, next_update_incr is not used. What if num/100 is < 1? This line:
next_update += num / 100; Should be: next_update += next_update_incr;
From misc/mke2fs.c
#define STRIDE_LENGTH 8
/* Allocate the zeroizing buffer if necessary */
if (!buf) {
buf = malloc(fs->blocksize * STRIDE_LENGTH);
if (!buf) {
com_err("malloc", ENOMEM,
_("while allocating zeroizing buffer"));
exit(1);
}
memset(buf, 0, fs->blocksize * STRIDE_LENGTH);
}
/* OK, do the write loop */
next_update = 0;
next_update_incr = num / 100;
if (next_update_incr < 1)
next_update_incr = 1;
for (j=0; j < num; j += STRIDE_LENGTH, blk += STRIDE_LENGTH) {
count = num - j;
if (count > STRIDE_LENGTH)
count = STRIDE_LENGTH;
retval = io_channel_write_blk(fs->io, blk, count, buf);
if (retval) {
if (ret_count)
*ret_count = count;
if (ret_blk)
*ret_blk = blk;
return retval;
}
if (progress && j > next_update) {
next_update += num / 100;
progress_update(progress, blk);
}
}
return 0;==========================================================================
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Guy
Sent: Wednesday, May 19, 2004 11:11 PM
To: 'John Lange'
Cc: 'LinuxRaid'
Subject: RE: Please review: Slackware RAID How-To
The man page says "strip size", not "chunk size", which is correct?
RAID5:
"strip size" = ("Number of disks in array" - 1) * "chunk size"
RAID6:
"strip size" = ("Number of disks in array" - 2) * "chunk size"
"Number of disks in array" does not include spares!
It would be GREAT for performance if writes were full strips at a time, since no reads would be required.
I don't think it would help performance if writes were full chunks at a time, since the target chunk would still need to be read to compute the parity chunk.
Any filesystem gods out there? Any opinions?
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of John Lange
Sent: Wednesday, May 19, 2004 9:42 PM
To: Guy
Cc: 'LinuxRaid'
Subject: RE: Please review: Slackware RAID How-To
Quoted 1 line · Guy
md2 has 4 disks with a chunk size of 128K. Since only 3 disks are used
for
Quoted 7 lines
data, and the filesystem block size is 4K, the stride size should be 128*3/4, or 96.
Change:mke2fs -b 4096 -R stride=32 /dev/md2 To: mke2fs -b 4096 -R stride=96 /dev/md2
Quoted 5 lines
My logic:
"Stripe size" is "chunk size" times "number of data disks". From example:
"chunk size" = 128
"number of data disks" = "nr-raid-disks" - 1 (-2 if RAID6)
I think this is incorrect. At this point I defer to the Software-RAID-HOWTO.
http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.10
From that document stride is chucksize/blocksize . Number of disks does not enter into it.
So with a chunksize of 128, and a block size of 4 it would be:
128K/4K = 32 for stride.
If this is indeed correct I will be sure to expand that area of the How-To so it is more clear.
Thanks very much for your feedback.
Regards,
John Lange
-
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