Skip to contentSkip to conversation

Data Offset

DISCUSSION Piergiorgio Sartor 2 participants 2 messages May 10, 2012 – May 24, 2012 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi,

after the RAID-5 problem, I just realized that other RAIDs I have, including a multi RAID-6, have different data offset for each component.

This seems to be quite of a problem, in case "Create" is used to recover an array.

Obviouly, if a 4 disks RAID-5 has 2 disks with one offset and 2 with another, it will not be possible to re-create it (saving the data).

Is there any way to fix/prevent such issue? Shouldn't "mdadm" make sure all offset are the same? Or try, at least...

What I noticed is that, adding a disk later, might cause different offsets.

Any idea?

Thanks,

bye,

Signature · 1 line
piergiorgio
#1 lore raw
Quoted 6 lines · On Thu, 10 May 2012 19:42:10 +0200 Piergiorgio Sartor…

Hi,

after the RAID-5 problem, I just realized that other RAIDs I have, including a multi RAID-6, have different data offset for each component.

Quoted 6 lines

This seems to be quite of a problem, in case "Create" is used to recover an array.

Obviouly, if a 4 disks RAID-5 has 2 disks with one offset and 2 with another, it will not be possible to re-create it (saving the data).

I certainly won't be easy. Though if someone did find themselves in that situation it might motivate me to enhance mdadm in some way to make it easily fixable.

Quoted 4 lines

Is there any way to fix/prevent such issue? Shouldn't "mdadm" make sure all offset are the same? Or try, at least...

I'm not sure. Maybe...

With linux-3.5 and mdadm-3.3 (both unreleased) you will probably be able to
mdadm --grow --data-offset=5M
and that will happen. At least for RAID10. Other levels might follow later.

Should mdadm keep them always the same? The reason that it doesn't is that I thought that you could change the data offset by removing each device and adding it back as a spare with a new data_offset. Maybe that isn't such a good idea.

I suspect that I got a chorus of people all saying "please keep data_offset consistent" - and particular if I received a patch which did that - then I would probably change mdadm accordingly.

NeilBrown

Quoted 10 lines

What I noticed is that, adding a disk later, might cause different offsets.

Any idea?

Thanks,

bye,