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@xxxxxxxxxxx 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
-
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