Reconnecting a RAID drive

  • Thread starter Thread starter Tom Del Rosso
  • Start date Start date
T

Tom Del Rosso

If a RAID drive is disconnected and the system boots without it, should that
drive be wiped before being reconnected?

Would it need to be wiped if it was reconnected by hot-plugging, so the
controller knows it is not current?

It's hypothetical, so I'm asking in general whether it's software or
hardware RAID.
 
Tom Del Rosso said:
If a RAID drive is disconnected and the system boots without it, should that
drive be wiped before being reconnected?
Would it need to be wiped if it was reconnected by hot-plugging, so the
controller knows it is not current?
It's hypothetical, so I'm asking in general whether it's software or
hardware RAID.

Unless the controller (software or hardware) is really, really broken,
it will notice that the drive was not there and a wipe will
not be necessary. What is usually done is to increase an event
conter on the other drives if one is missing. Then the one
is recognized as outdated when it is present again.

Arno
 
No, the drive does not need to be wiped.
Raid systems usually use a block of data at the start or the end of the
disk to identify it as part of a raid set, and hold some tracking
information. Depending on the details of the raid system and its setup,
when you re-connect the drive it may automatically be considered a
hot-spare (usable by any raid sets you have), or only usable for the
raid set you took it from, or not usable by any set. Your raid setup
and configuration programs will then let you choose how you re-use your
drive. Alternatively, it would be possible to wipe (zero out) the raid
configuration block on the disk - then the raid system will treat it as
a new disk.
Raid systems will never assume that a hot-plugged disk is current. With
some systems (such as Linux software raid) you can explicitly tell the
system that it is still current. If you have been using a write-intent
bitmap you can also re-attach an almost-current disk.

This is intended for a case where, say, 2 drives fell oy of a RAID5
but you know which one was the second one and re-integrating that
one gives you your data back. If you do it wrong, you can get arbitrary
corruption though.
The riskiest situation is if the system does not know that the disk has
been disconnected, such as by removing it when the system is off,
changing the disk in some way, then re-inserting it and turning the
system on again. But I think you'd have to make some effort to confuse
the system.

If you do that, you could also just do arbitrary damage to the data or
filesystem on disk ;-)

Arno
 
Back
Top