# Did mdadm --create rather than --assemble

## eponymous

Hi,

I have an existing array of three hard disks which form a RAID0 array which have ext3 on them. 

I accidently did an: mdadm --create command to create a new array rather than --assemble.

I can't seem to mount the /dev/md0 array as it says "mount: wrong fs type, bad option, bad superblock on /dev/md0".

What is wrong? Have I just lost all my data  :Sad: ?

Thanks.

----------

## richard.scott

Hi,

I'm sorry to say that chances are you've just wiped your data.

Try stopping the md0 and re-creating it with the correct options.

It's a slim chance, but may help.

Rich.

----------

## eponymous

 *richard.scott wrote:*   

> Hi,
> 
> I'm sorry to say that chances are you've just wiped your data.
> 
> Try stopping the md0 and re-creating it with the correct options.
> ...

 

I just tried that but the same error occurs with mount. The UUID of the three disks is now reported as being different from blkid.

I simply can't accept that it was that easy to lose all my data. There was no warning given or anything..

If this is then my faith in mdadm is shot.

----------

## richard.scott

 *eponymous wrote:*   

> I simply can't accept that it was that easy to lose all my data. There was no warning given or anything..
> 
> If this is then my faith in mdadm is shot.

 

It does ask if your sure like this:

```
 # mdadm --create /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 -n 4 -l 6

mdadm: /dev/sda1 appears to be part of a raid array:

    level=raid5 devices=4 ctime=Thu Dec 23 22:13:32 2010

mdadm: /dev/sdb1 appears to be part of a raid array:

    level=raid5 devices=4 ctime=Thu Dec 23 22:13:32 2010

mdadm: /dev/sdc1 appears to be part of a raid array:

    level=raid5 devices=4 ctime=Thu Dec 23 22:13:32 2010

mdadm: /dev/sdd1 appears to be part of a raid array:

    level=raid5 devices=4 ctime=Thu Dec 23 22:13:32 2010

Continue creating array?
```

At that point if you accidentially say Y then you loose your data.

Rich

----------

## eponymous

 *richard.scott wrote:*   

>  *eponymous wrote:*   I simply can't accept that it was that easy to lose all my data. There was no warning given or anything..
> 
> If this is then my faith in mdadm is shot. 
> 
> It does ask if your sure like this:
> ...

 

I think i'm going to throw up  :Sad: 

Surely there is some way for me to rebuild this? Please god.

----------

## eponymous

It looks like someone had sucess here:

http://ubuntuforums.org/showpost.php?p=7961195&postcount=5

But I cannot seem to get the same result.

----------

## richard.scott

have you upgraded mdadm since you created the array?

Perhaps its defaults are now different?

----------

## eponymous

 *richard.scott wrote:*   

> have you upgraded mdadm since you created the array?
> 
> Perhaps its defaults are now different?

 

I have upgraded yes - this is what led me down this path in the first place. I did w world update then did an etc-update. I was careful not to overwrite my /etc/mdadm.conf file.

I then restarted and got loads of errors about the RAID stuff.

It also seems to default and create /dev/md127 /dev/md127p1 /dev/md126 /dev/md126p1 :s

----------

