From: David Brown <david@westcontrol.com>
To: linux-raid@vger.kernel.org
Subject: Re: how to recover filesystem after clobbering array?
Date: Tue, 19 Jul 2011 12:17:25 +0200 [thread overview]
Message-ID: <j03lp4$h72$1@dough.gmane.org> (raw)
In-Reply-To: <20110719104325.16112cl7f4lrzkjh@mail.sapo.pt>
On 19/07/2011 11:43, Vasco Névoa wrote:
>
> Hello people.
>
> I've messed up good, and now I need you nice folks to help me recover
> 500GB of irreplaceable home video, the full 7 years of my family trove. :(
>
> I mistakenly used mdadm to *create* an array instead of *starting* the
> array (big Duh!). Now the array has no partition table. I shudder to
> think I may have clobbered not only the array but also the file system.
> I hardly slept last night. Acceptance is a process. :/
>
> I've learned my lesson there, no more fiddling with "--assume-clean"
> (which was a stupid idea in the first place), but the issue remains: how
> do I get to the file system that I know is still there? The array is up
> but obviously it was never mounted.
>
> Can I just recreate the partition table and it works?.... or do I have
> to use some complex form of forensics to recover the data?
>
> Thank you very much,
> Vasco.
>
The first thing you should do is write out "RAID is not a backup
solution" 100 times!
Then write down all the information you know - exactly how was the array
built up, how were the disks partitioned, what filesystems, etc. And
what was the exact command you used to mess up the array, and how far
did you let it go with resynchronisation, etc. Make good notes here
before you forget.
The next step is to get a couple spare disks that are bigger than your
original disks (get 2 TB disks - they cost almost the same as anything
smaller). Make a direct copy of the entire original disks to a file on
the new disks with something like:
dd if=/dev/sda of=/mnt/backup/disk1.img bs=1M
Once you have got image files for each of your disks, make copies of
these image files to another spare disk. Keep careful notes of exactly
what you have done here, and which files are which. And put your
original disks, carefully labelled, on a shelf somewhere.
Now you are in a position to attempt data recovery on your copied files.
If you do something wrong, you can simply re-copy the image files and
try again. You still have absolutely no guarantees that you'll get
anything back - but at least you can be sure you are not going to make
anything worse.
If you have started re-syncing the two disks as a RAID1 pair, there is a
good chance that one of the disks contains the original data and
filesystem, except where it was overwritten by the new metadata for the
newly created array.
Then you sit back and hope that someone on this list can give you ideas
about getting the data back from the image file(s).
--
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
next prev parent reply other threads:[~2011-07-19 10:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 9:43 how to recover filesystem after clobbering array? Vasco Névoa
2011-07-19 9:46 ` Vasco Névoa
2011-07-19 10:17 ` David Brown [this message]
2011-07-19 10:43 ` Tyler J. Wagner
2011-07-19 11:01 ` Vasco Névoa
2011-07-19 12:44 ` Tyler J. Wagner
2011-07-23 8:19 ` Vasco Névoa
2011-07-23 8:43 ` Mikael Abrahamsson
2011-07-23 19:04 ` CoolCold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='j03lp4$h72$1@dough.gmane.org' \
--to=david@westcontrol.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).