Skip to contentSkip to conversation

new superblock and raid10 support in mdadm

DISCUSSION rich turner 4 participants 6 messages Sep 13, 2004 – Dec 22, 2004 MD RAID

lore
Share & tools
lore
#0 lore raw

the latest source of mdadm has ANNOUNCE-1.7.0 which indicates there will be a new superblock format. we are currently developing a process by which we read the superblock ourselves and parse through the information we need about the raid devices. our fear is that we develop the process to read the superblock and then it changes, which could cause us to completely rewrite the process.
if we develop a process based on the current superblock format, will it still work with the new superblock format?
is there any documentation for the format of the old superblock and new superblock?
will there be any indication within the superblock that indicates which format the superblock is using?

ANNOUNCE-1.7.0 also indicated support for raid10. outstanding news! while i understand this is still under development, we would like to learn as much as we can about this support so that we can support it when it is considered stable. any information you can provide is helpful.

#1 lore raw
Quoted 8 lines · On Monday September 13, [email protected] wrote:

the latest source of mdadm has ANNOUNCE-1.7.0 which indicates there will be a new superblock format. we are currently developing a process by which we read the superblock ourselves and parse through the information we need about the raid devices. our fear is that we develop the process to read the superblock and then it changes, which could cause us to completely rewrite the process.
if we develop a process based on the current superblock format, will it still work with the new superblock format?

The old (current) super block format will continue to work and will continue to be widely used. It would be entirely appropriate that you require people who use your tool/service to continue to use the old format. However I suspect it would not be a great burden for you to support the new format as well if/when it became popular.

A new format is being supported because the old format has problems. One is that it cannot work with devices larger than 2 Gigabytes (and I have had a request from someone who wanted to include such a device in an MD array).
Another is that it cannot support checkpointing of reconstruction in a backwards compatible way (we have checkpointing of resync, but not reconstruct).

If neither of these are a problem (and they won't be for many people) then the old superblock format can and will still be used.

Quoted 2 lines

is there any documentation for the format of the old superblock and new superblock?

Not in great detail. include/linux/raid/md_p.h is probably the best you will get. When I finish new superblock support in mdadm, I will probably add some documentation.

Quoted 2 lines

will there be any indication within the superblock that indicates which format the superblock is using?

Definitely. The "major_version" will be '1' for the new format, and '0' for the old.

Quoted 6 lines

ANNOUNCE-1.7.0 also indicated support for raid10. outstanding news! while i understand this is still under development, we would like to learn as much as we can about this support so that we can support it when it is considered stable. any information you can provide is helpful.

The raid10 module is in 2.4.9-rc2 and will be in 2.4.9 when it gets released.
There is a comment at the top of drivers/md/raid10.c that briefly describes the layout. More documentation should appear in the next mdadm release.

I include the mentioned comment below.

NeilBrown

/*
* RAID10 provides a combination of RAID0 and RAID1 functionality.
* The layout of data is defined by

 *    chunk_size
 *    raid_disks
 *    near_copies (stored in low byte of layout)
 *    far_copies (stored in second byte of layout)

*
* The data to be stored is divided into chunks using chunksize.
* Each device is divided into far_copies sections.
* In each section, chunks are laid out in a style similar to raid0, but
* near_copies copies of each chunk is stored (each on a different drive).
* The starting device for each section is offset near_copies from the starting
* device of the previous section.
* Thus there are (near_copies*far_copies) of each chunk, and each is on a different
* drive.
* near_copies and far_copies must be at least one, and there product is at most
* raid_disks.
*/

#2 lore raw

From: Neil Brown <[email protected]>
Date: Tue, Sep 14, 2004 at 11:08:53AM +1000

Quoted 4 lines

A new format is being supported because the old format has problems. One is that it cannot work with devices larger than 2 Gigabytes (and I have had a request from someone who wanted to include such a device in an MD array).

I presume you mean terabyte, but I'm not sure you don't mean petabyte or something else very large?

Quoted 2 lines

The raid10 module is in 2.4.9-rc2 and will be in 2.4.9 when it gets released.

2.6.9 I presume?

Quoted 7 lines

/*
* RAID10 provides a combination of RAID0 and RAID1 functionality.
* The layout of data is defined by

 *    chunk_size
 *    raid_disks
 *    near_copies (stored in low byte of layout)
 *    far_copies (stored in second byte of layout)
Quoted 10 lines

*
* The data to be stored is divided into chunks using chunksize.
* Each device is divided into far_copies sections.
* In each section, chunks are laid out in a style similar to raid0, but
* near_copies copies of each chunk is stored (each on a different drive).
* The starting device for each section is offset near_copies from the starting
* device of the previous section.
* Thus there are (near_copies*far_copies) of each chunk, and each is on a different
* drive.
* near_copies and far_copies must be at least one, and there product is at most

----------------------------------------------------------their

Quoted 2 lines

* raid_disks.
*/

Good luck,
Jurriaan

Signature · 3 lines
If you hear muffled screams, consider it a request for beam out.
	Tom Paris in Voyager
Debian (Unstable) GNU/Linux 2.6.9-rc1-mm4 2x6209 bogomips load 0.14
#3 lore raw
Quoted 9 lines · On Tuesday September 14, [email protected] wrote:

From: Neil Brown <[email protected]>
Date: Tue, Sep 14, 2004 at 11:08:53AM +1000

Quoted 4 lines

A new format is being supported because the old format has problems. One is that it cannot work with devices larger than 2 Gigabytes (and I have had a request from someone who wanted to include such a device in an MD array).

I presume you mean terabyte, but I'm not sure you don't mean petabyte or something else very large?

Yes. terabyte (2^(32+9) bytes is the max size)

Quoted 5 lines
Quoted 3 lines

The raid10 module is in 2.4.9-rc2 and will be in 2.4.9 when it gets released.

2.6.9 I presume?

You presume correctly. I type poorly :-)

Quoted 4 lines
Quoted 1 line

* near_copies and far_copies must be at least one, and there product is at most

----------------------------------------------------------their

Would you believe that I deliberately put in those errors just to see if anyone actually reads these comments..... no, I wouldn't either.

Thanks,
NeilBrown

#4 lore raw
In reply to Neil Brown

Hello,

I noticed some discussions on last September email log, But I am not sure.

I tried to make RAID10 or RAID01. I could make it but Problem is that I could not assemble it by "mdadm -As" When the system is rebooted.

My "mdadm.conf" is

DEVICE /dev/hd*
ARRAY /dev/md0 level=raid1 num-devices=2 devices=/dev/hda4,/dev/hdc4 ARRAY /dev/md1 level=raid1 num-devices=2 devices=/dev/hde4,/dev/hdg4 ARRAY /dev/md2 level=raid0 num-devices=2 devices=/dev/md0,/dev/md1

My S/W revs are:

Linux 2.4.20
Mdadm 1.2.0

My HDD size are all greater than 120 GB.

I tried it manually, too: first assemble the RAID1: md0 and md1. Then tried to assemble "md2" but it said "could not find devices for md2"

We do not support RAID10 or RAID01 on linux2.4.xx? or any issues on mdadm?

Please provide me any clues or advices,

Bo

#5 lore raw
Quoted 18 lines · On Wednesday December 22, [email protected] wrote:

Hello,

I noticed some discussions on last September email log, But I am not sure.

I tried to make RAID10 or RAID01. I could make it but Problem is that I could not assemble it by "mdadm -As" When the system is rebooted.

My "mdadm.conf" is

DEVICE /dev/hd*
ARRAY /dev/md0 level=raid1 num-devices=2 devices=/dev/hda4,/dev/hdc4 ARRAY /dev/md1 level=raid1 num-devices=2 devices=/dev/hde4,/dev/hdg4 ARRAY /dev/md2 level=raid0 num-devices=2 devices=/dev/md0,/dev/md1

My S/W revs are:

Quoted 8 lines

Linux 2.4.20
Mdadm 1.2.0

My HDD size are all greater than 120 GB.

I tried it manually, too: first assemble the RAID1: md0 and md1. Then tried to assemble "md2" but it said "could not find devices for md2"

That would be because /dev/md0 and /dev/md1 aren't listed in "DEVICE" lines.

NeilBrown

Quoted 8 lines

We do not support RAID10 or RAID01 on linux2.4.xx? or any issues on mdadm?

Please provide me any clues or advices,

Bo