Skip to contentSkip to conversation

RAID1 question

DISCUSSION William Thompson 3 participants 7 messages Sep 29, 2011 – Sep 30, 2011 MD RAID

lore
Share & tools
lore
#0 lore raw

Please keep me in the CC. I am not on the list.

If I have a RAID1 of 2 disks and I decide to move them to another computer and recreate the raid, does it really need to do the initial recovery?

For that matter, when creating a RAID1 on 2 disks, is it really needed to do the initial recovery?

I understand why it's needed for RAID4/5/6 though.

#1 lore raw
Quoted 5 lines · William Thompson

Please keep me in the CC. I am not on the list.

If I have a RAID1 of 2 disks and I decide to move them to another computer and recreate the raid, does it really need to do the initial recovery?

You don't need to recreate the raid at all, just reassemble it. You may want to update the homehost though, otherwise it will (IIRC) auto assemble to md_126 (or so) instead of md0.

Quoted 5 lines

For that matter, when creating a RAID1 on 2 disks, is it really needed to do the initial recovery?

I understand why it's needed for RAID4/5/6 though.

Probably not, no. Anything written would go to both mirrors, and reads of any un-mirrored areas are indeterminate anyway. You would lose the ability to check the array for mismatches though, and the recovery process would bring everything into sync whenever it's run anyway. More of a question would be why not do the initial recovery? It doesn't delay access to the array, and at least the I/O load is happening at a controlled point (rather than at recovery time, when you have no control). Anyway, if you do want to avoid the initial recovery, just use --assume-clean.

Cheers,
Robin

Signature · 4 lines
     ___        
    ( ' }     |       Robin Hill        <[email protected]> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |
#2 lore raw
Quoted 10 lines · Robin Hill
Quoted 5 lines · William Thompson

Please keep me in the CC. I am not on the list.

If I have a RAID1 of 2 disks and I decide to move them to another computer and recreate the raid, does it really need to do the initial recovery?

You don't need to recreate the raid at all, just reassemble it. You may want to update the homehost though, otherwise it will (IIRC) auto assemble to md_126 (or so) instead of md0.

The reason I asked this was because a mirrored pair that I currently have is 0.90 version and I was going to use 1.0

Quoted 7 lines
Quoted 5 lines

For that matter, when creating a RAID1 on 2 disks, is it really needed to do the initial recovery?

I understand why it's needed for RAID4/5/6 though.

Probably not, no. Anything written would go to both mirrors, and reads of any un-mirrored areas are indeterminate anyway. You would lose the

I figured this would be the case.

Quoted 2 lines

ability to check the array for mismatches though, and the recovery process would bring everything into sync whenever it's run anyway. More

I've rarely done this. On large disks, this takes may hours to perform.

Quoted 3 lines

of a question would be why not do the initial recovery? It doesn't delay access to the array, and at least the I/O load is happening at a controlled point (rather than at recovery time, when you have no

I guess the only reason I can come up with would be to avoid extra head seeks. Well, that and the time it takes.

During the initial sync, if a write happens to an area that has been synced, does it go to all drives? What about a write to an area that as not been synced yet?

Quoted 2 lines

control). Anyway, if you do want to avoid the initial recovery, just use --assume-clean.

I am aware of this option. I've have been fortunate with mdadm in the many years I've used it (except 1 time).

#3 lore raw
Quoted 8 lines · William Thompson
Quoted 7 lines · Robin Hill
Quoted 5 lines · William Thompson

Please keep me in the CC. I am not on the list.

If I have a RAID1 of 2 disks and I decide to move them to another computer and recreate the raid, does it really need to do the initial recovery?

Quoted 7 lines
Quoted 3 lines

You don't need to recreate the raid at all, just reassemble it. You may want to update the homehost though, otherwise it will (IIRC) auto assemble to md_126 (or so) instead of md0.

The reason I asked this was because a mirrored pair that I currently have is 0.90 version and I was going to use 1.0

You _should_ be able to do a --create --assume-clean there, without losing the data, but I'd go with a backup, --create, and restore jsut to be safe.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

For that matter, when creating a RAID1 on 2 disks, is it really needed to do the initial recovery?

I understand why it's needed for RAID4/5/6 though.

Probably not, no. Anything written would go to both mirrors, and reads of any un-mirrored areas are indeterminate anyway. You would lose the

Quoted 7 lines

I figured this would be the case.

Quoted 2 lines

ability to check the array for mismatches though, and the recovery process would bring everything into sync whenever it's run anyway. More

I've rarely done this. On large disks, this takes may hours to perform.

It can, but it also ensures the disks are readable. If you don't run regular checks, in a recovery situation you may hit a bad block on a supposedly good disk and have a heap more trouble to deal with.

Quoted 11 lines
Quoted 3 lines

of a question would be why not do the initial recovery? It doesn't delay access to the array, and at least the I/O load is happening at a controlled point (rather than at recovery time, when you have no

I guess the only reason I can come up with would be to avoid extra head seeks. Well, that and the time it takes.

During the initial sync, if a write happens to an area that has been synced, does it go to all drives? What about a write to an area that as not been synced yet?

If the area has already been synced then writes will definitely go to all members. I'm pretty sure this also happens in areas which haven't been synced as well, but I'm not 100% on that.

Cheers,
Robin

Signature · 4 lines
     ___        
    ( ' }     |       Robin Hill        <[email protected]> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |
#5 lore raw
In reply to William Thompson
Quoted 8 lines · William Thompson
Quoted 7 lines · Robin Hill
Quoted 5 lines · William Thompson

Please keep me in the CC. I am not on the list.

If I have a RAID1 of 2 disks and I decide to move them to another computer and recreate the raid, does it really need to do the initial recovery?

Quoted 6 lines
Quoted 3 lines

You don't need to recreate the raid at all, just reassemble it. You may want to update the homehost though, otherwise it will (IIRC) auto assemble to md_126 (or so) instead of md0.

The reason I asked this was because a mirrored pair that I currently have is 0.90 version and I was going to use 1.0

You'll find information about going from 0.90 to 1.0 in the archive, take a look at these links:
http://thread.gmane.org/gmane.linux.raid/34014/focus=34029
http://thread.gmane.org/gmane.linux.raid/34424/focus=34441

Signature · 1 line
Kai Stian Olstad
#4 lore raw
In reply to Robin Hill
Quoted 7 lines · Robin Hill
Quoted 5 lines · William Thompson
Quoted 3 lines · Robin Hill

You don't need to recreate the raid at all, just reassemble it. You may want to update the homehost though, otherwise it will (IIRC) auto assemble to md_126 (or so) instead of md0.

Quoted 6 lines
Quoted 3 lines

The reason I asked this was because a mirrored pair that I currently have is 0.90 version and I was going to use 1.0

You _should_ be able to do a --create --assume-clean there, without losing the data, but I'd go with a backup, --create, and restore jsut to be safe.

Agreed, however, in this case, I was going for a new raid with new data and the disks would already be in sync.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

ability to check the array for mismatches though, and the recovery process would bring everything into sync whenever it's run anyway. More

I've rarely done this. On large disks, this takes may hours to perform.

It can, but it also ensures the disks are readable. If you don't run regular checks, in a recovery situation you may hit a bad block on a supposedly good disk and have a heap more trouble to deal with.

Understood.

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

of a question would be why not do the initial recovery? It doesn't delay access to the array, and at least the I/O load is happening at a controlled point (rather than at recovery time, when you have no

I guess the only reason I can come up with would be to avoid extra head seeks. Well, that and the time it takes.

Quoted 7 lines
Quoted 4 lines

During the initial sync, if a write happens to an area that has been synced, does it go to all drives? What about a write to an area that as not been synced yet?

If the area has already been synced then writes will definitely go to all members. I'm pretty sure this also happens in areas which haven't been synced as well, but I'm not 100% on that.

Ok, thanks.

#6 lore raw
In reply to Kai Stian Olstad
Quoted 8 lines · Kai Stian Olstad
Quoted 2 lines · William Thompson

The reason I asked this was because a mirrored pair that I currently have is 0.90 version and I was going to use 1.0

You'll find information about going from 0.90 to 1.0 in the archive, take a look at these links:
http://thread.gmane.org/gmane.linux.raid/34014/focus=34029
http://thread.gmane.org/gmane.linux.raid/34424/focus=34441

I'll look at those when I have time. In this specific case, I do not care if the data is destroyed. Just wanted to know if the disks would still be in sync.

For the sync part, I don't believe it would really matter which metadata version I used, the disks would be in sync except for areas where the old metadata was stored. Am I right on this? That is assuming RAID1.