Skip to contentSkip to conversation

raid question

DISCUSSION jshankar 2 participants 2 messages Aug 17, 2003 – Aug 20, 2003 MD RAID

lore
Share & tools
lore

jshankar

author
#0 lore raw

Hello,

I have couple of questions regarding raid routine.

1> When i do mkraid, is there any specific routines in md.c that is responsible for adding and tracking the device. I have maintain the entries in /etc/raidtab. When i copy a file into the raid device, is there any specific routine that track the device to write the next block( raid 0 case).

2> Also the routine that keeps track the amount
of buffer size that can be written to each particular device and the case when the writing to one disk fails.

3> Also i was wondering whether the source code of raid tools are availaible in
linux directory.

It would be great if somebody can throw some light.

Thanks in advance.

-Jay

Quoted 12 lines

===== Original Message From Neil Brown <[email protected]> =====

Quoted 10 lines · On Wednesday July 30, [email protected] wrote:

Hello ,

I am Jayshankar, Masters student in Colorado State UNiversity.

A small question on raid.

Suppose i have got raid0 connected to disk1, disk2 , disk3 , disk4.

The operating system writes a block of data to disk1 then to disk2, disk3, disk4. Do the I/O needs to be successful on disk1, for writing the next

block

Quoted 1 line
Quoted 1 line

of data on disk2, disk3, disk4. Or it checks the I/O is successful on

disk1,

Quoted 23 lines
Quoted 8 lines

after the block of data has been written to disk2,disk3,disk4.

Looking forward for your reply.

THanks in advance.

-Jay

Please send future questions to
[email protected]
rather than to me personally.

All disk IO in Linux is asynchronous.
i.e. submitting a block schedules it for IO. If you submit lots of blocks they all get scheduled for IO. This is true whether your are accessing a single device or a raid array.

So there is no check for success of one block before writing the next. quite often the blocks writen to the different drive will all be written at one.

NeilBrown

#1 lore raw
Quoted 9 lines · On Sunday August 17, [email protected] wrote:

Hello,

I have couple of questions regarding raid routine.

1> When i do mkraid, is there any specific routines in md.c that is responsible for adding and tracking the device. I have maintain the entries in /etc/raidtab. When i copy a file into the raid device, is there any specific routine that track the device to write the next block( raid 0 case).

There is no concept of a "next block"
raid0 gets given a number of blocks to write (or read). Each block has an address.
raid0 does some simple arithmetic to decide which device, and which block on that device, to use.
This code is in
raid0.c(raid0_make_request).

Quoted 5 lines

2> Also the routine that keeps track the amount
of buffer size that can be written to each particular device and the case when the writing to one disk fails.

This questions doesn't really make sense to me.

Quoted 5 lines

3> Also i was wondering whether the source code of raid tools are availaible in
linux directory.

google can probably find it for you.
I think there is a link somewhere like
http://www.kernel.org/pub/linux/utils/raid

NeilBrown

Quoted 53 lines

It would be great if somebody can throw some light.

Thanks in advance.

-Jay

Quoted 12 lines

===== Original Message From Neil Brown <[email protected]> =====

Quoted 10 lines · On Wednesday July 30, [email protected] wrote:

Hello ,

I am Jayshankar, Masters student in Colorado State UNiversity.

A small question on raid.

Suppose i have got raid0 connected to disk1, disk2 , disk3 , disk4.

The operating system writes a block of data to disk1 then to disk2, disk3, disk4. Do the I/O needs to be successful on disk1, for writing the next

block

Quoted 1 line
Quoted 1 line

of data on disk2, disk3, disk4. Or it checks the I/O is successful on

disk1,

Quoted 18 lines
Quoted 8 lines

after the block of data has been written to disk2,disk3,disk4.

Looking forward for your reply.

THanks in advance.

-Jay

Please send future questions to
[email protected]
rather than to me personally.

All disk IO in Linux is asynchronous.
i.e. submitting a block schedules it for IO. If you submit lots of blocks they all get scheduled for IO. This is true whether your are accessing a single device or a raid array.

Quoted 5 lines

So there is no check for success of one block before writing the next. quite often the blocks writen to the different drive will all be written at one.

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