[svlug] RAID1 on non-identical disks

Mark msalists at gmx.net
Tue Feb 27 12:05:57 PST 2007


Hello,

I was running RAID1 on two identical disks with identical partition layout. One of the two died and the replacement disk is a
different one.

Here is the info of the old disk (SDD):
Disk /dev/sdd: 18.2 GB, 18209320960 bytes
255 heads, 63 sectors/track, 2213 cylinders, total 35565080 sectors
Units = sectors of 1 * 512 = 512 bytes


Here is the info for the new one (SDC):
Disk /dev/sdc: 18.3 GB, 18389272576 bytes
64 heads, 32 sectors/track, 17537 cylinders, total 35916548 sectors
Units = sectors of 1 * 512 = 512 bytes


The old disks had only one partition that spans (almost?) the entire disk:
/dev/sdd1   *          63    35551844    17775891   fd  Linux raid autodetect

I now have several options of what to do on the new one:
a) Create a new partition with the same start and end sector numbers. That way I have an identical size partition (am I right?) with
a little more unused space 
b) Use the full space meaning I get a slightly bigger partition which will not be used to its full extend because the software raid
is resticted by the smaller size of the smaller RAID1 element

The problem with b) is probably that in case SDD gets removed from the RAID1, nothing is preventing the controller from using the
extra space that it has on SDC. 
If I then want to plug SDC back in, the RAID needs to downsize the used space on SDC again.
So the question is what happens if a RAID1 needs to be downsized. Does that cause problems or in an extreme case data loss?
Or will it not expand to the full usable size of SDC in the first place?

So I am inclined to go with a), but thought I'd ask if there is a good reason against a) and for b) - or an option c) that I have
overlooked?


And a different (but related) question:
How is a RAID1 setup mirrored? Does the controller mirror sector by sector?
How does RAID1 handle situations in which two identical disks are used when one of them starts having damaged sectors? I assume that
the sectors or the damaged disk are marked as such and not used any more?! What happens to the mirror image on the good disk? Are
the sectors blocked there as well? Is the data on them evacuated to other sectors which are good on both disks? If so, what happens
if not enough good sectors are available to move data from failing sectors to good sectors? Or does the raid controller just fail
the entire disk once it starts having bad sectors and continues operating only on the remaining disk that does not have any bad
sectors, esssentially degrading the RAID?

Thanks, 

MARK





More information about the svlug mailing list