Skip to contentSkip to conversation

Controlling Reading and Writing in RAID 1 configuration

DISCUSSION Rik Herrin 3 participants 5 messages Apr 25, 2006 – Apr 28, 2006 MD RAID

lore
Share & tools
lore

Rik Herrin

author
#0 lore raw

Hi,
I have a setup where I want to use RAID 1 to mirror
my data over the LAN. I am exposing 2x500 GB-sized devices via iSCSI and was wondering if I could configure the RAID 1 to write to both members of the RAID 1 configuration but only read from one as one link is 1GbE while the other is lower but sufficient for writing. Is this possible? Thanks for your help.

Regards,
Rik Herrin

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw
Quoted 8 lines · On Tuesday April 25, [email protected] wrote:

Hi,
I have a setup where I want to use RAID 1 to mirror
my data over the LAN. I am exposing 2x500 GB-sized devices via iSCSI and was wondering if I could configure the RAID 1 to write to both members of the RAID 1 configuration but only read from one as one link is 1GbE while the other is lower but sufficient for writing. Is this possible? Thanks for your help.

You'll be wanting the '--write-mostly' option to mdadm. This requires a fairly recent kernel and mdadm.

NeilBrown

#2 lore raw
Quoted 7 lines · Neil Brown
Quoted 6 lines · On Tuesday April 25, [email protected] wrote:

Hi,
I have a setup where I want to use RAID 1 to mirror
my data over the LAN. I am exposing 2x500 GB-sized devices via iSCSI and was wondering if I could configure the RAID 1 to write to both members of the RAID 1 configuration but only read from one as one

only read from one disk, shall this be a "--read-preferred" ?

i checked email archive, but still not quite understand on this "--write-mostly". for raid1, u anyway need to write all components, so why there is a "mostly"?

Quoted 11 lines
Quoted 2 lines

link is 1GbE while the other is lower but sufficient for writing. Is this possible? Thanks for your help.

You'll be wanting the '--write-mostly' option to mdadm. This requires a fairly recent kernel and mdadm.

NeilBrown
-
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

#3 lore raw
Quoted 11 lines · On Thursday April 27, [email protected] wrote:
Quoted 7 lines · Neil Brown
Quoted 6 lines · On Tuesday April 25, [email protected] wrote:

Hi,
I have a setup where I want to use RAID 1 to mirror
my data over the LAN. I am exposing 2x500 GB-sized devices via iSCSI and was wondering if I could configure the RAID 1 to write to both members of the RAID 1 configuration but only read from one as one

only read from one disk, shall this be a "--read-preferred" ?

No. The one(s) you don't read from is the odd-one-out. The one(s) you read from are 'normal' and don't get a special flag.

Quoted 5 lines

i checked email archive, but still not quite understand on this "--write-mostly". for raid1, u anyway need to write all components, so why there is a "mostly"?

Mostly it will just write to this device.
But if all the non-write-mostly device fail, then it will read from this device. So it isn't write-only. It is write-mostly.

Make sense?

NeilBrown

#4 lore raw
Quoted 22 lines · Neil Brown
Quoted 11 lines · On Thursday April 27, [email protected] wrote:
Quoted 7 lines · Neil Brown
Quoted 6 lines · On Tuesday April 25, [email protected] wrote:

Hi,
I have a setup where I want to use RAID 1 to mirror
my data over the LAN. I am exposing 2x500 GB-sized devices via iSCSI and was wondering if I could configure the RAID 1 to write to both members of the RAID 1 configuration but only read from one as one

only read from one disk, shall this be a "--read-preferred" ?

No. The one(s) you don't read from is the odd-one-out. The one(s) you read from are 'normal' and don't get a special flag.

Quoted 5 lines

i checked email archive, but still not quite understand on this "--write-mostly". for raid1, u anyway need to write all components, so why there is a "mostly"?

Quoted 5 lines

Mostly it will just write to this device.
But if all the non-write-mostly device fail, then it will read from this device. So it isn't write-only. It is write-mostly.

Make sense?

i know why my English language test had that low score now.

thx!

Quoted 2 lines

NeilBrown