From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin ESTRABAUD Subject: Re: First 12Mb of data missing after accidental deletion of first drive (4 2TB raid5) Date: Tue, 13 Oct 2015 19:09:58 +0100 Message-ID: <561D48F6.6010106@mpstor.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-raid-owner@vger.kernel.org To: Marek , Weedy Cc: Linux RAID , Alexander Afonyashin List-Id: linux-raid.ids Hi Marek, On 13/10/15 16:04, Marek wrote: > Could it be that the raid wasnt synced at the time i overwrote > /dev/sda ? i have run the command you suggested and will report after > its done. would it still be possible to recover the raid? > So what likely happened is that you wrote ontop of a RAID member drive while the RAID was likely not assembled (during your install). If you do a resync it won't unfortunately *recover* the previously written data, it will go over each stripe and recalculate the parity. It is true that it *might* have been possible to do the opposite operation by not touching anything and figuring out the previous data with the data and parity blocks from the remaining RAID members (assuming they weren't overwritten), but it would have been a tricky operation. However, since you've done the resync now, the previous parity blocks have been overwritten leaving you with a consistent RAID, but with part of the data on a disk that you want to revert. At this stage you should recover the old data from a backup. > On Tue, Oct 13, 2015 at 4:36 PM, Weedy wrote: >> >> On 13 Oct 2015 10:06 am, "Marek" wrote: >>> >>> no, i had a working raid consisting of 4 2TB drives (raid5) >>> sda,sdb,sdc,sdb ( no partitions were created on drives) - then i >>> accidentally deleted /dev/sda by installing ubuntu. when inspecting >>> dev/md127 with a hex editor i discovered first 12mb are missing. >> >> Wait, if it's a raid5 can't you just resync it? >> >> Also I believe 1.2 metadata is at the end of a partition. If your saying the >> raids hasn't noticed you can run a check and it should fix itself. >> >> echo check > /sys/block/mdX/md/sync_action > -- > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >