Re: Recover array after I panicked

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

 



On Fri, Apr 28, 2017 at 12:31:43PM +0200, Patrik Dahlström wrote:
> Can't I reduce my risks by doing it the other way around?

Not like this.

> dd if=/dev/md6 bs=1M count=X/1M of=/dev/md5

Writes into data you haven't read yet, so you end up reading data 
you just wrote and write that again... the result will be garbage.

ddrescue has a reverse mode but implementation details matter a lot. 
It might be tempting because your progress is just 10-20%ish but 
going forwards is a lot safer here.

If you must go backwards you should use mdadm's revert-reshape 
for which you need RAID metadata that properly represents the 
current mid-grow state of your RAID (the elegant approach).

You can produce such metadata by

truncate -s <drivesize> a b c d e f
losetup --find -show
mdadm --create 5disk
mdadm --grow 6disk
<fallocate punchhole in the background>
<adapt sync_speed_min/max in the background>
<watch progress until X>
mdadm --stop
mdadm --examine <verify correct offsets and reshape pos'n>

Tadaa.

Regards
Andreas Klauer
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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