All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dragos <dragos@mpigani.org>
To: linux-raid@vger.kernel.org
Subject: Re: assemble vs create an array.......
Date: Sat, 01 Dec 2007 01:48:07 -0500	[thread overview]
Message-ID: <475103A7.3070109@mpigani.org> (raw)
In-Reply-To: <47501D7E.7000804@dgreaves.com>

Thank you for your very fast answers.

First I tried 'fsck -n' on the existing array. The answer was that If I 
wanted to check a XFS partition I should use 'xfs_check'. That seems to 
say that my array was partitioned with xfs, not reiserfs. Am I correct?

Then I tried the different permutations:
mdadm --create /dev/md0 --raid-devices=3 --level=5 missing /dev/sda1 
/dev/sdb1
mount /dev/md0 temp
mdadm --stop --scan

mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sda1 missing 
/dev/sdb1
mount /dev/md0 temp
mdadm --stop --scan

mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sda1 /dev/sdb1 
missing
mount /dev/md0 temp
mdadm --stop --scan

mdadm --create /dev/md0 --raid-devices=3 --level=5 missing /dev/sda1 
/dev/sdc1
mount /dev/md0 temp
mdadm --stop --scan

mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sda1 missing 
/dev/sdc1
mount /dev/md0 temp
mdadm --stop --scan

mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sda1 /dev/sdc1 
missing
mount /dev/md0 temp
mdadm --stop --scan

mdadm --create /dev/md0 --raid-devices=3 --level=5 missing /dev/sdb1 
/dev/sdc1
mount /dev/md0 temp
mdadm --stop --scan

mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sdb1 missing 
/dev/sdc1
mount /dev/md0 temp
mdadm --stop --scan

mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sdb1 /dev/sdc1 
missing
mount /dev/md0 temp
mdadm --stop --scan

With some arrays mount reported:
    mount: you must specify the filesystem type
and with others:
    mount: Structure needs cleaning

No choice seems to have been successful.
Please let me know of other ideas.

Thank you again,
Dragos

David Greaves wrote:
> Neil Brown wrote:
>   
>> On Thursday November 29, dragos@mpigani.org wrote:
>>     
>>> 2. Do you know of any way to recover from this mistake? Or at least what 
>>> filesystem it was formated with.
>>>       
> It may not have been lost - yet.
>
>
>   
>> If you created the same array with the same devices and layout etc,
>> the data will still be there, untouched.
>> Try to assemble the array and use "fsck" on it.
>>     
> To be safe I'd use fsck -n (check the man page as this is odd for reiserfs)
>
>
>   
>> When you create a RAID5 array, all that is changed is the metadata (at
>> the end of the device) and one drive is changed to be the xor of all
>> the others.
>>     
> In other words, one of your 3 drives has just been erased.
> Unless you know the *exact* command you used and have the dmesg output to hand
> then we won't know which one.
>
> Now what you need to do is to try all the permutations of creating a degraded
> array using 2 of the drives and specify the 3rd as 'missing':
>
> So something like:
> mdadm --create /dev/md0 --raid-devices=3 --level=5 missing /dev/sdb1 /dev/sdc1
> mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sdb1 missing /dev/sdc1
> mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sdb1 /dev/sdc1 missing
> mdadm --create /dev/md0 --raid-devices=3 --level=5 missing /dev/sdb1 /dev/sdd1
> mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sdb1 missing /dev/sdd1
> mdadm --create /dev/md0 --raid-devices=3 --level=5 /dev/sdb1 /dev/sdd1 missing
> etc etc
>
> It is important to create the array using a 'missing' device so the xor data
> isn't written.
>
> There is a program here: http://linux-raid.osdl.org/index.php/Permute_array.pl
> that may help...
>
> David
>
>
>   

  reply	other threads:[~2007-12-01  6:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-30  3:42 assemble vs create an array Dragos
2007-11-30  5:32 ` Neil Brown
2007-11-30 14:26   ` David Greaves
2007-12-01  6:48     ` Dragos [this message]
2007-12-01  7:23       ` Dragos
2007-12-04 13:14     ` Dragos
2007-12-05 11:39       ` David Greaves
2007-12-06 15:17         ` Dragos
2007-12-06 16:39           ` Michael Tokarev
2007-12-06 17:12             ` Eric Sandeen
2007-12-06 21:22             ` David Chinner
2008-02-03  7:42               ` Dragos
2007-11-30 14:53 ` Bryce
2007-11-30 17:40   ` Michael Tokarev
  -- strict thread matches above, loose matches on Subject: below --
2008-01-28  7:21 Dragos
2008-01-28  7:25 Dragos

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=475103A7.3070109@mpigani.org \
    --to=dragos@mpigani.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.