recovering a single device RAID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a RAID 1 array built on a single partition.  That partition has a hardware error (only one sector, but that's enough).  I guess I should have got around to adding some redundancy.
I used ddrescue to copy the partition to another disk.  What is the best way to proceed?

I thought I'd mark the bad partition as failed, but
# mdadm -v --fail /dev/sdc2; date
mdadm: /dev/sdc2 does not appear to be an md device
Apparently the array name is required as a first argument.  I have stopped it, so that
mdadm /dev/md/media5 --fail /dev/sdc2
would fail, I assume, since there is no /dev/md/media5.

The naive approach would be to reactivate the array, but there seem to be 2 risks in doing so:
  1) I have the 2 bit-identical partitions (excepting the bad sector), both of which claim to be the unique members of the array.
What if the wrong one gets picked, or both get picked and synced?
   2) Assuming I activated the array with the single failing partition, wouldn't the failure process convert it to a zero-element array?

Also, is it OK to have 2 completely identical copies of a block device that is an element of a RAID array?  My thought was that different devices should have different device UUIDs, so that a bit copy is problematic.  Of course, even with different device UUIDs there would be 2 devices claiming to be members of a single element array....

Thanks.
Ross Boylan

Some details:
~# date; mdadm -E /dev/sdc2
Fri 10 May 2019 10:42:29 AM PDT
/dev/sdc2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 4432ee71:d3f469e2:bfb17f29:67a23156
           Name : tempserver:media5
  Creation Time : Fri Feb 24 16:51:53 2017
     Raid Level : raid1
   Raid Devices : 1

 Avail Dev Size : 7813769216 (3725.90 GiB 4000.65 GB)
     Array Size : 3906884416 (3725.90 GiB 4000.65 GB)
  Used Dev Size : 7813768832 (3725.90 GiB 4000.65 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262064 sectors, after=384 sectors
          State : clean
    Device UUID : a7e01684:709e2639:2186cf57:2b3590c1

    Update Time : Thu May  9 14:58:51 2019
       Checksum : 62576dc4 - correct
         Events : 104


   Device Role : Active device 0
   Array State : A ('A' == active, '.' == missing, 'R' == replacing)





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux