# [CLOSED] Raid0 / and mdadm no arrays found in config file or

## sinanqapudan

Hi there,

After running smoothly for some time,  my raid configuration broke down. 

This happened after I plugged in a new hard disk and was then forced to reboot as the system froze.

My fstab looks like:

```

/dev/md1          /boot                   ext2  noauto,noatime  1 2

/dev/sda2         none                    swap  sw,pri=1        0 0

/dev/sdb2         none                    swap  sw,pri=1        0 0

/dev/md3          /                       ext4  noatime         0 1

.....

```

The volume /dev/md1 is raid1, /dev/md3 is raid0

Since the hard reboot mentioned above, I have this message during the boot process

```

mdadm: no arrays found in config file or automatically

```

the boot process then goes on, and ext4 attempts to fix /dev/md3, but fails. Boot goes on and at the end I'm prompted to log in. When I do, the environment is strange, something like:

```

(none) ~#

```

if run:

```

(none) ~# ls -la

```

the only thing it list is text a file named "dead.letter".

The strange is that if run:

```

(none) ~#cd /

```

I'm then able to list all of my directories. I have only read only privileges (despite being logged in as root). I cannot start sshd or any other daemon.

I've been reading forums for a solution to my problem, but found none workable as I cannot change anything.

When I run:

```

mdadm --examine /dev/sd* | grep -E "(^\/dev|UUID)"

mdadm: No md superblock detected on /dev/sda.

mdadm: No md superblock detected on /dev/sdb.

```

If I run:

```

(none) /#mdadm --examine /dev/sda

```

I get something similar to what I've seen around in various forums, e.g. (not the actual output):

```

/dev/sda: 

          Magic : a92b4efc 

        Version : 0.90.00 

           UUID : 1072c19c:6a50e9c5:188edc34:4aa1c004 (local to host darwin) 

  Creation Time : Sun Nov  8 07:36:27 2009 

     Raid Level : raid1 

  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB) 

     Array Size : 976759936 (931.51 GiB 1000.20 GB) 

   Raid Devices : 2 

  Total Devices : 2 

Preferred Minor : 3 

    Update Time : Thu May 17 11:49:12 2012 

          State : clean 

 Active Devices : 2 

Working Devices : 2 

 Failed Devices : 0 

  Spare Devices : 0 

       Checksum : 5c046f76 - correct 

         Events : 44868 

```

No use trying to assemble or create anew, even when performed by the install CD. 

Any suggestions?

Thanks[/quote]Last edited by sinanqapudan on Thu Oct 24, 2013 10:21 pm; edited 1 time in total

----------

## DaggyStyle

does /etc/mdadm.conf contains something?

what kernel and what metadata version are you using?

----------

## sinanqapudan

Hi there, thanks for the prompt reply.

/etc/mdadm.conf contains only remmed lines.

Metadata is 0.90.

Kernel is 3.8.13-gentoo

Regards

----------

## sinanqapudan

Any suggestions, guys?

----------

## NeddySeagoon

sinanqapudan,

Boot with a CD and post the real output from 

```
mdadm -E /dev/sd
```

for all the partitions in all your raid sets.

You get that strange login as rootfsck failed so root stayed read only.  As a result, nothing can start as everything needs to write PID and/or lock files.

Its possible to remount the filesystem read/write but don't. Until we understand what happened, it may do more harm.

For rootfsck to fail, something happened to the root filesystem that it couldn't fix.  It follows that the root filesystem is damaged somehow and needs some help to get fixed.  Running fsck is also a bad idea as it can make things worse, not better.  Understand that fsck makes the filesystem metadata self consistent. User data can be trashed in the process.

Did you try to create a new raid set in the same space?

If so, exactly what command did you use.

----------

## sinanqapudan

Neddy,

this is the output of

```
mdadm -E /dev/sda

dev/sda:

Magic : a92b4efc

Version : 0.90.00

UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

Creation Time : Tue Jul  9 20:21:48 2013

Raid Level : raid0

Raid Devices : 2

Total Devices : 2

Preferred Minor : 3

Update Time : Tue Jul  9 20:21:48 2013

State : Clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Checksum : 5dbd61d9 - correct

Events : 1

Chunk Size : 512K

        Number   Major   Minor   RaidDevice   State

this       0       8      3         0             active sync    /dev/sda3

 

   0       0       8      3         0             active sync    /dev/sda3

   1       1       8     19         1             active sync    /dev/sdb3

```

and of 

```
mdadm -E /dev/sdb

dev/sdb:

Magic : a92b4efc

Version : 0.90.00

UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

Creation Time : Tue Jul  9 20:21:48 2013

Raid Level : raid0

Raid Devices : 2

Total Devices : 2

Preferred Minor : 3

Update Time : Tue Jul  9 20:21:48 2013

State : Clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Checksum : 5dbd61eb - correct

Events : 1

Chunk Size : 512K

        Number   Major   Minor   RaidDevice   State

this       0       8      19         1             active sync    /dev/sdb3

 

   0       0       8      3         0             active sync    /dev/sda3

   1       1       8     19         1             active sync    /dev/sdb3

```

and of

```
mdadm -E /dev/sda1

dev/sda:

Magic : a92b4efc

Version : 0.90.00

UUID : b1cb8381:e1eac802:cb201669:f728008a (local to host livecd)

Creation Time : Tue Jul  9 20:21:04 2013

Raid Level : raid1

Used Dev Size : 153536 (149.96 MiB 157.22 MB)

Array Size : 153536 (149.96 MiB 157.22 MB)

Raid Devices : 2

Total Devices : 2

Preferred Minor : 1

Update Time : Mon Oct 7 18:545:07 2013

State : Clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Checksum : a35b7dfd - correct

Events : 18

        Number   Major   Minor   RaidDevice   State

this       0       8      1         0             active sync    /dev/sda1

 

   0       0       8      3         0             active sync    /dev/sda1

   1       1       8     17         1             active sync    /dev/sdb1

```

and of

```
mdadm -E /dev/sdb1

dev/sda:

Magic : a92b4efc

Version : 0.90.00

UUID : b1cb8381:e1eac802:cb201669:f728008a (local to host livecd)

Creation Time : Tue Jul  9 20:21:04 2013

Raid Level : raid1

Used Dev Size : 153536 (149.96 MiB 157.22 MB)

Array Size : 153536 (149.96 MiB 157.22 MB)

Raid Devices : 2

Total Devices : 2

Preferred Minor : 1

Update Time : Mon Oct 7 18:545:07 2013

State : Clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Checksum : a35b7e0f - correct

Events : 18

        Number   Major   Minor   RaidDevice   State

this       0       8      17        0             active sync    /dev/sdb1

 

   0       0       8      1         0             active sync    /dev/sda1

   1       1       8     17         1             active sync    /dev/sdb1

```

and of

```
mdadm -E /dev/sda3

dev/sda3:

Magic : a92b4efc

Version : 0.90.00

UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

Creation Time : Tue Jul  9 20:21:48 2013

Raid Level : raid0

Raid Devices : 2

Total Devices : 2

Preferred Minor : 3

Update Time : Tue Jul  9 20:21:48 2013

State : Clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Checksum : 5dbd61d9 - correct

Events : 1

Chunk Size : 512K

        Number   Major   Minor   RaidDevice   State

this       0       8      3         0             active sync    /dev/sda3

 

   0       0       8      3         0             active sync    /dev/sda3

   1       1       8     19         1             active sync    /dev/sdb3

```

and of 

```
mdadm -E /dev/sdb3

dev/sdb3:

Magic : a92b4efc

Version : 0.90.00

UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

Creation Time : Tue Jul  9 20:21:48 2013

Raid Level : raid0

Raid Devices : 2

Total Devices : 2

Preferred Minor : 3

Update Time : Tue Jul  9 20:21:48 2013

State : Clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Checksum : 5dbd61eb - correct

Events : 1

Chunk Size : 512K

        Number   Major   Minor   RaidDevice   State

this       0       8      19         1             active sync    /dev/sdb3

 

   0       0       8      3         0             active sync    /dev/sda3

   1       1       8     19         1             active sync    /dev/sdb3

```

and of

```
mdadm -E /dev/sdc

mdadm: No md superblock detected on dev/sdc.

mdadm -E /dev/sdd

mdadm: No md superblock detected on dev/sdd.

mdadm -E /dev/sde

mdadm: No md superblock detected on dev/sde.

```

To try and recreate md3 I issued:

```
livecd ~ #mdadm --create /dev/md3 --level=0 --raid-devices=2 /dev/sda3 /dev/sdb3
```

To try and assemble md3 I issued:

```
(none) ~#mdadm --assemble /dev/md3 --uuid=95c2f325:b8c6265d:cb201669:f728008a
```

and

```
livecd ~ #mdadm --assemble /dev/md3 --uuid=95c2f325:b8c6265d:cb201669:f728008a
```

By the way, I had to copy the above manually. Is there a command that I can use to copy outputs directly (i.e. not by hand?)

Last, I did not try to create any new raid set in the same space.

Thanks

----------

## sinanqapudan

Ciao Neddy,

forget about the "command that I can use to copy outputs directly" question. I've come to my senses and realised that I could have opened an ssh session as I wasn't working from my broken system where I can't start sshd.

Must have been very tired yesterday night...

----------

## sinanqapudan

Neddy Seagoon,

this is the actual (i.e. not copied by hand) output from

```
livecd ~ # mdadm -E /dev/sd*

/dev/sda:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61d9 - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     0       8        3        0      active sync   /dev/sda3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

/dev/sda1:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : b1cb8381:e1eac802:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:04 2013

     Raid Level : raid1

  Used Dev Size : 153536 (149.96 MiB 157.22 MB)

     Array Size : 153536 (149.96 MiB 157.22 MB)

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 1

    Update Time : Mon Oct  7 18:54:07 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : a35b7dfd - correct

         Events : 18

      Number   Major   Minor   RaidDevice State

this     0       8        1        0      active sync   /dev/sda1

   0     0       8        1        0      active sync   /dev/sda1

   1     1       8       17        1      active sync   /dev/sdb1

mdadm: No md superblock detected on /dev/sda2.

/dev/sda3:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61d9 - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     0       8        3        0      active sync   /dev/sda3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

/dev/sdb:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61eb - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     1       8       19        1      active sync   /dev/sdb3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

/dev/sdb1:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : b1cb8381:e1eac802:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:04 2013

     Raid Level : raid1

  Used Dev Size : 153536 (149.96 MiB 157.22 MB)

     Array Size : 153536 (149.96 MiB 157.22 MB)

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 1

    Update Time : Mon Oct  7 18:54:07 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : a35b7e0f - correct

         Events : 18

      Number   Major   Minor   RaidDevice State

this     1       8       17        1      active sync   /dev/sdb1

   0     0       8        1        0      active sync   /dev/sda1

   1     1       8       17        1      active sync   /dev/sdb1

mdadm: No md superblock detected on /dev/sdb2.

/dev/sdb3:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61eb - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     1       8       19        1      active sync   /dev/sdb3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

mdadm: No md superblock detected on /dev/sdc.

mdadm: No md superblock detected on /dev/sdc1.

mdadm: No md superblock detected on /dev/sdd.

mdadm: No md superblock detected on /dev/sdd1.

mdadm: No md superblock detected on /dev/sde.

mdadm: No md superblock detected on /dev/sde1.

mdadm: No md superblock detected on /dev/sde2.

mdadm: No md superblock detected on /dev/sde3.

mdadm: No md superblock detected on /dev/sde4.

mdadm: cannot open /dev/sdf: No medium found

mdadm: cannot open /dev/sdg: No medium found

mdadm: cannot open /dev/sdh: No medium found

livecd ~ #

```

regards

----------

## NeddySeagoon

sinanqapudan

```
livecd ~ #mdadm --create /dev/md3 --level=0 --raid-devices=2 /dev/sda3 /dev/sdb3
```

If that was exactly what you did, is a very bad thing.  It makes you a raid metadata 1.2 raid set where you had an metadata 0.90 before.

Maybe thats not what you did as your post says

```
/dev/sdb3:

          Magic : a92b4efc

        Version : 0.90.00 
```

This can be fixed - but we need to know exactly what you did. --creating a raid 1.2 on top of a raid 0.90 destroys the primary filesystem superblock, but there are backup superblocks to fix that - if you use an extX filesystem anyway.

The other complication is that the default chunk size is now 512k and it used to be 64k.  We need to know when you originally created the raid.

Your post says   

```
Creation Time : Tue Jul  9, <time>  2013 
```

for all the sets but 

It appears that /dev/md3 has not been updated since Tue Jul  9 20:21:48 2013, which is also its create time.  That is supported by the Events : 1 

Is there data on /dev/md3 that you want to recover?

You may yet get your data back if there is.  It depends on knowing how the raid was originally made and what filesystem you used.

A degree of trial an error can be used but not yet.

sda3

```
State : clean 

Checksum : 5dbd61d9 - correct 

Events : 1
```

sdb3 says

```
State : clean 

Checksum : 5dbd61eb - correct 

Events : 1 
```

I would expect md3 to assemble but if the raid metadata version or the chunk size has changed, the filesystem will not appear.

The data is (mostly) still there but its not being read the way it was written.

While you can make a raid set using whole drives /dev/sda and /dev/sdb such a raid set cannot be auto assembled as there is no partition table.

Auto assembly works only with partitions that are of type 0xfd.

----------

## sinanqapudan

NeddySeagoon,

the filesystem on /dev/md3 is Ext4.

It was created using the exact command in the "Gentoo Linux x86 with Software Raid and LVM2 Quick Install Guide" for raid0 arrays, that is:

```
livecd ~ # mdadm --create /dev/md4 --level=0 --raid-devices=2 /dev/sda3 /dev/sdb3
```

I then mistakenly (now I realize) tried to recover it by issuing:

```

livecd ~ # mdadm --create /dev/md3 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3
```

By the way, the system appears to be not entirely broken as I can log in and still find the filesystem that should not have mounted in the first place. If I log in with my regular user (that is not root) I find myself in my home directory and all files are regularly there. I can even move around and read config files using nano etc. No part of the system appears top be missing (sources, programs etc.).

This can be due to the fact that the Ext4 filesystem start to heal itself at boot (see my first post) but then fails to complete. I can try to recover the information in the boot log, but please give advice on how to retrieve it without having to key it in exactly as it is (the "command that I can use to copy outputs directly" question).

The filesystem does not contain crucial data, but I would like to recover it anyway as I would like to spare myself the hassle of rebuilding the system from scratch. At least I would like to recover the .config file for the kernel, the make.conf file the fstab file etc.

Regards

----------

## NeddySeagoon

sinanqapudan,

ext4 will replay the journal at the next mount, if it was not cleanly unmounted.  This fixes many errors but not all.

```
# mdadm --create /dev/md3 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3
```

is harmless to the data on your raid and the filesystem it holds.

The metadata has been rewritten in the same place as the old metadata - or the filesystem would not mount.

As you are using raid1, (mirroring) the chunk size does not matter. All data is on all partitions.

Thus the filesystem must be damaged.

```
echo check > /sys/block/mdX/md/sync_action
```

may produce some useful info.  It will compare blocks on both parts of the mirror and produce a count of those that differ. See https://raid.wiki.kernel.org/index.php/RAID_Administration.

The repair option is not so useful on a two element mirror, since differences can be detected - but which is right ?

If one drive has read errors, repair will copy the data from the other part of the mirror, which will force a bad block relocation.

The check will take some time as it reads both parts of the mirror.  If all is well, it will output zero.

look in dmesg at the end of the check for any read errors.

Check only says that both parts of the mirror are the same - it says nothing about the validity or otherwise of the filesystem.

Once we know what check says, we can look at the options.

----------

## sinanqapudan

Neddy Seagoon,

I'm afraid I've given some false information in my previous post. I have issued:

```
# mdadm --create /dev/md3 --level=0 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3
```

and NOT:

```
# mdadm --create /dev/md3 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3
```

This is the result of

```
livecd ~ # echo check > /sys/block/mdX/md/sync_action

-bash: /sys/block/mdX/md/sync_action: No such file or directory
```

Regards,

Sinanqapudan[/quote]

----------

## sinanqapudan

NeddySeagoon,

I'm not using raid1, in /dev/md3 the raid level is 0.

regards

----------

## sinanqapudan

So, where do we go from here?

Suggestions anyone??

Regards

----------

## NeddySeagoon

sinanqapudan,

There is still no damage done because raid0 does not sync the drives - there is nothing to sync.

We do need to be sure of the chunk size now though.

Find a single file bigger than 64k and verify the content.

Do the same for a file bigger then 512k.

If you have a video saved on the filesystem, playing it would do, you would notice it if the chunks were played in the wrong order.

Another method is to validate a file you already know the checksum of.  A wrong chunk size will change the checksum.

----------

## sinanqapudan

NeddySeagoon,

I did not store large files on /dev/md3 as I preferred to have data on separate hard disks.

I have found a pdf file which looks promising (35258984 its size) the point now is how do I visualise it, as X is not working and I have no other means of checking it.

Anyway I created lvms in July 2013 and would therefore go for the 512k chunk hypothesis if this was the default size at that time. I did not change any default values as this was one my first experiments with raid and lvm, and I followed the "Gentoo Linux x86 with Software Raid and LVM2 Quick Install Guide" rather blindly.

Regards

----------

## NeddySeagoon

sinanqapudan,

In July 2013, the default chunk was 512kB.

Boot with a live CD/USB, --assemble the raid, if it does not auto assemble, if it is mounted too, unmount it.

Now to try mounting manually, with an alternate superblock.

```
mount -o ro,sb=131072 /dev/mdX /mnt/gentoo
```

This uses the first backup superblock on mdX and mounts read only.

Are there any errors reported on screen?

Post them.

Have a look at the content of /mnt/gentoo ... does it look OK?

Look at the end of dmesg for any errors - post them before you continue.

If there are no errors with the ro mount umount /mnt/gentoo and test with  

```
mount -o rw,sb=131072 /dev/mdX /mnt/gentoo
```

for a read/write mount.

If there are errors post them - check dmesg too.

If there are no errors, it looks like the first filesystem superblock is damaged.

There may be other damage too.

unmount the filesystem again and run 

```
fsck /dev/mdX
```

This step may trash your data, depending on the errors but it will sake you for every change it wants to make.

If you add -y to the command, fsck will 'just fix it' without asking ... it may work, it may not. 

Read man fsck  before you do this or recover all the data you need first.

----------

## sinanqapudan

NeddySeagoon,

this is the output:

```

livecd ~ # mdadm --assemble /dev/md1 --uuid=b1cb8381:e1eac802:cb201669:f728008a

livecd ~ # mdadm --assemble /dev/md3 --uuid=95c2f325:b8c6265d:cb201669:f728008a

livecd ~ # cat /proc/mdstat

Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear] [multipath]

md126 : active raid0 sda3[0] sdb3[1]

      318076928 blocks 512k chunks

md127 : active (auto-read-only) raid1 sda1[0] sdb1[1]

      153536 blocks [2/2] [UU]

unused devices: <none>

livecd ~ # mount /dev/md3 /mnt/gentoo

mount: special device /dev/md3 does not exist

livecd ~ # mount -o ro,sb=131072 /dev/md3 /mnt/gentoo

mount: special device /dev/md3 does not exist

livecd ~ # umount /dev/md3

umount: /dev/md3: not found

livecd ~ # umount /dev/md3

umount: /dev/md3: not found

```

Regards

----------

## DaggyStyle

 *sinanqapudan wrote:*   

> NeddySeagoon,
> 
> this is the output:
> 
> ```
> ...

 

try mounting either md126 or md127, if I'm not wrong, md126=md1

----------

## sinanqapudan

Ok, now that I have mounted md127 and md126 in the directories they are supposed to be mounted (/mnt/gentoo and /mnt/gentoo/boot respectively) what am I supposed to do?

----------

## NeddySeagoon

sinanqapudan,

Go back to my previous post and do the tests I suggested there but with md126 instead of md3.

It looks like the liveCD has renumbered your raid.

----------

## sinanqapudan

NeddySeagoon,

I performed the test and this is the result:

```
livecd ~ # umount /dev/md127

livecd ~ # umount /dev/md126

livecd ~ # mount -o ro,sb=131072 /dev/md126 /mnt/gentoo

livecd ~ # mount -o ro,sb=131072 /dev/md127 /mnt/gentoo/boot

mount: wrong fs type, bad option, bad superblock on /dev/md127,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail or so

livecd ~ #

```

and this the output of 

```
livecd ~ # dmesg | tail

[20206.491561] EXT4-fs (md126): error count: 124

[20206.491566] EXT4-fs (md126): initial error at 1381108841: ext4_journal_start_sb:349

[20206.491570] EXT4-fs (md126): last error at 1381529772: ext4_find_entry:1273: inode 1835869

[27996.020250] EXT4-fs (md126): mounted filesystem with ordered data mode. Opts: sb=131072

[28006.056394] EXT2-fs (md127): error: can't find an ext2 filesystem on dev md127.

[28123.792606] EXT2-fs (md127): error: can't find an ext2 filesystem on dev md127.

[28366.094195] EXT4-fs (md126): mounted filesystem with ordered data mode. Opts: sb=131072

[28453.386440] EXT4-fs (md126): warning: mounting unchecked fs, running e2fsck is recommended

[28453.440215] EXT4-fs (md126): mounted filesystem with ordered data mode. Opts: sb=131072

[28474.582230] EXT2-fs (md127): error: can't find an ext2 filesystem on dev md127.

```

regards

----------

## NeddySeagoon

sinanqapudan,

The error for /dev/md126 is expected.  The sb= is the number of 1k blocks from the start of the filesystem to use as the position of the superblock.

On large filesystems, like your raid0, Ext4 uses 4kb per filesystem block, on smaller filesystems, it uses 2kB or even 1kB filesystem blocks.

The first backup superblock is a fixed number of filesystem blocks rom the start of the filesystem, so the correcr sb= depends on the filesystem block size.

As you still have errors using a backup superblock, its unlikely the primary superblock is damaged.

Recover the data you need then run 

```
fsck -y /dev/md126
```

If you do not add the -y option, fsck will ask you what to do at each error and exit if you say N to not fix it.

If you are lucky, all will be well. However fsck only makes the filesystem metadata self consistent. Its says nothing about user data.

----------

## sinanqapudan

NeddySeagoon,

I run 

```
fsck -y /dev/md126
```

and fixed some errors. What now?

Regards

----------

## NeddySeagoon

sinanqapudan,

Your filesystem should be fixed ... fixed means the filesystem metadata is self consistent. It says nothing about user data.

Mount the filesystem read only and have a look around.

The mount point will have a directory called lost+found.  It should be empty.

If not, it will contain directories and file fragments that fsck 'found' while it was fixing your metadata.

As fsck has no idea of file names, the names are the inode numbers.

Your mdX numbers have probably been changed permanently so update /etc/fstab and grub.conf before yoy try to boot normally.

----------

## sinanqapudan

NeddySeagoon,

should I also make a new initramfs?

Regards

----------

## NeddySeagoon

sinanqapudan,

If you are a genkernel user, it will do this for you anyway.

If your initramfs contains kernel modules, then the kernel will check versions, so yes again.

If your initramfs only contains user space tools, its not required unless you have hard coded /dev/md3 and so on in the init script.

----------

## sinanqapudan

NeddySeagoon,

big trouble (I think)!! This is what I get now after having tried to boot yesterday without changing my fstab etc. etc. first:

```
livecd ~ # mdadm --examine /dev/sd*

/dev/sda:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61d9 - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     0       8        3        0      active sync   /dev/sda3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

/dev/sda1:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : b1cb8381:e1eac802:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:04 2013

     Raid Level : raid1

  Used Dev Size : 153536 (149.96 MiB 157.22 MB)

     Array Size : 153536 (149.96 MiB 157.22 MB)

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 127

    Update Time : Sat Oct 12 21:04:17 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : a362347d - correct

         Events : 18

      Number   Major   Minor   RaidDevice State

this     0       8        1        0      active sync   /dev/sda1

   0     0       8        1        0      active sync   /dev/sda1

   1     1       8       17        1      active sync   /dev/sdb1

mdadm: No md superblock detected on /dev/sda2.

/dev/sda3:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61d9 - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     0       8        3        0      active sync   /dev/sda3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

mdadm: No md superblock detected on /dev/sdb.

mdadm: No md superblock detected on /dev/sdb1.

mdadm: No md superblock detected on /dev/sdb2.

mdadm: No md superblock detected on /dev/sdb3.

mdadm: No md superblock detected on /dev/sdc.

mdadm: No md superblock detected on /dev/sdc1.

mdadm: No md superblock detected on /dev/sdd.

mdadm: No md superblock detected on /dev/sdd1.

mdadm: No md superblock detected on /dev/sde.

mdadm: cannot open /dev/sdf: No medium found

mdadm: cannot open /dev/sdg: No medium found

mdadm: cannot open /dev/sdh: No medium found

livecd ~ #

```

The superblock is now missing from the second hard disk!!

I'm not a genkernel user, but I had the /usr in a separate partition and was forced to use initramfs since some update I do not recall exactly now.

Anyway I think that the latest error has put paid to any recovery attempt.

Thank you very much for your time and effort. Very appreciated

Kind regards,

Sinanqapudan

----------

## NeddySeagoon

sinanqapudan,

I think you are too pessimistic.

First, fsck did not touch your raid superblocks - the raid superblocks are outside of the filesystems.

In the case of version 0.90, they are at the end of the partition and the filesystem starts in the normal place.

You appear to have lost both the sdb1 and sdb3 raid superblocks.  Its unlikely that loss of both superblocks was caused by the same thing unless sdb has vanished for some reason. A dead or dying HDD, fairly rare or a failing SATA data cable ... much more common, come to mind.

If we can prove that the superblocks really have vanished, they can be rewritten with careful use of mdadm --create and  the rest of your data should still be there.

Anyway, I suspect a single failure elsewhere.

What does dmesg say ... anything about /dev/sdb errors?

----------

## sinanqapudan

NeddySeagoon,

thank you for your unwavering support!

As I am about to leave for a business trip, I won't be able to access my pc with the faulty filesystem for some 5 days. 

We will resume this thread when I come back.

Yours truly,

Sinanqapudan

P.S. For what matters, the faulty filesystem is on a PATA Hard Disk...

P.P.S. BTW, I rebooted after disconnecting a hard disk identified as BAD by my bios and lo and behold:

```
livecd ~ # mdadm --examine /dev/sd*

/dev/sda:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61d9 - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     0       8        3        0      active sync   /dev/sda3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

/dev/sda1:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : b1cb8381:e1eac802:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:04 2013

     Raid Level : raid1

  Used Dev Size : 153536 (149.96 MiB 157.22 MB)

     Array Size : 153536 (149.96 MiB 157.22 MB)

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 127

    Update Time : Sat Oct 12 21:04:17 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : a362347d - correct

         Events : 18

      Number   Major   Minor   RaidDevice State

this     0       8        1        0      active sync   /dev/sda1

   0     0       8        1        0      active sync   /dev/sda1

   1     1       8       17        1      active sync   /dev/sdb1

mdadm: No md superblock detected on /dev/sda2.

/dev/sda3:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61d9 - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     0       8        3        0      active sync   /dev/sda3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

/dev/sdb:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61eb - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     1       8       19        1      active sync   /dev/sdb3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

/dev/sdb1:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : b1cb8381:e1eac802:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:04 2013

     Raid Level : raid1

  Used Dev Size : 153536 (149.96 MiB 157.22 MB)

     Array Size : 153536 (149.96 MiB 157.22 MB)

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 127

    Update Time : Sat Oct 12 21:04:17 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : a362348f - correct

         Events : 18

      Number   Major   Minor   RaidDevice State

this     1       8       17        1      active sync   /dev/sdb1

   0     0       8        1        0      active sync   /dev/sda1

   1     1       8       17        1      active sync   /dev/sdb1

mdadm: No md superblock detected on /dev/sdb2.

/dev/sdb3:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 95c2f325:b8c6265d:cb201669:f728008a (local to host livecd)

  Creation Time : Tue Jul  9 20:21:48 2013

     Raid Level : raid0

   Raid Devices : 2

  Total Devices : 2

Preferred Minor : 3

    Update Time : Tue Jul  9 20:21:48 2013

          State : clean

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 5dbd61eb - correct

         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State

this     1       8       19        1      active sync   /dev/sdb3

   0     0       8        3        0      active sync   /dev/sda3

   1     1       8       19        1      active sync   /dev/sdb3

mdadm: No md superblock detected on /dev/sdc.

mdadm: No md superblock detected on /dev/sdc1.

mdadm: No md superblock detected on /dev/sdd.

mdadm: cannot open /dev/sde: No medium found

mdadm: cannot open /dev/sdf: No medium found

mdadm: cannot open /dev/sdg: No medium found

livecd ~ #
```

----------

## sinanqapudan

Oh, and since we are at it:

```
livecd ~ # mount //dev/md127 /mnt/gentoo

livecd ~ # ls /mnt/gentoo

4.5.3  etc  lost+found  usr

livecd ~ # ls /mnt/gentoo/lost+found

#10878979  #12320772  #12320776  #12320778  #12320784

livecd ~ #

```

and

```
[   48.015045] md: bind<sdb3>

[   48.018077] md: bind<sdb1>

[   48.022434] md: bind<sda1>

[   48.025080] md: bind<sda3>

[   48.155647] usb 5-4: New USB device found, idVendor=0409, idProduct=0058

[   48.155652] usb 5-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[   48.155656] usb 5-4: Product: USB2.0 Hub Controller

[   48.155658] usb 5-4: Manufacturer: NEC Corporation

[   48.155929] hub 5-4:1.0: USB hub found

[   48.156017] hub 5-4:1.0: 4 ports detected

[   48.235020] usb 5-1.3: new high-speed USB device number 4 using ehci-pci

[   48.383069] md/raid0:md127: md_size is 636153856 sectors.

[   48.383074] md: RAID0 configuration for md127 - 1 zone

[   48.383075] md: zone0=[sda3/sdb3]

[   48.383082]       zone-offset=         0KB, device-offset=         0KB, size= 318076928KB

[   48.383098] md127: detected capacity change from 0 to 325710774272

[   48.388856] systemd-udevd[21457]: renamed network interface eth0 to enp1s0

[   48.389680] md/raid1:md126: active with 2 out of 2 mirrors

[   48.389714] md126: detected capacity change from 0 to 157220864

[   48.391658] systemd-udevd[21454]: renamed network interface eth1 to enp5s1

[   48.392891] usb 5-1.3: New USB device found, idVendor=03f0, idProduct=b116

[   48.392897] usb 5-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=3

[   48.392900] usb 5-1.3: Product: CNF8215

[   48.392903] usb 5-1.3: Manufacturer: Chicony Electronics Co., Ltd.

[   48.392905] usb 5-1.3: SerialNumber: SN0001

[   48.416982]  md126: unknown partition table

[   48.418875]  md127: unknown partition table

[   48.475027] usb 5-1.4: new high-speed USB device number 5 using ehci-pci

[   48.585400] usb 5-1.4: New USB device found, idVendor=0409, idProduct=005a

[   48.585405] usb 5-1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[   48.585682] hub 5-1.4:1.0: USB hub found

[   48.585768] hub 5-1.4:1.0: 2 ports detected

[   48.774370] hda_intel: msi for device 1849:0888 set to 0

[   48.774374] hda_intel: position_fix set to 1 for device 1849:0888

[   48.995025] usb 5-4.1: new low-speed USB device number 6 using ehci-pci

[   49.109139] usb 5-4.1: New USB device found, idVendor=04f3, idProduct=02f4

[   49.109144] usb 5-4.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0

[   49.109147] usb 5-4.1: Product: 2.4G Wireless Mouse

[   49.112685] input: 2.4G Wireless Mouse as /devices/pci0000:00/0000:00:1d.7/usb5/5-4/5-4.1/5-4.1:1.0/input/input4

[   49.113287] hid-generic 0003:04F3:02F4.0002: input,hiddev0,hidraw0: USB HID v1.11 Mouse [2.4G Wireless Mouse] on usb-0000:00:1d.7-4.1/input0

[   49.195027] usb 5-1.4.2: new high-speed USB device number 7 using ehci-pci

[   49.306769] usb 5-1.4.2: New USB device found, idVendor=03f0, idProduct=3724

[   49.306775] usb 5-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[   49.306778] usb 5-1.4.2: Product: Digital Picture Frame

[   49.306781] usb 5-1.4.2: Manufacturer: Hewlett-Packard

[   49.306783] usb 5-1.4.2: SerialNumber: 06PD890900001

[   49.307422] scsi7 : usb-storage 5-1.4.2:1.0

[   49.315358] hda_codec: ALC888: SKU not ready 0x411111f0

[   49.329636] 4:3:1: cannot get freq at ep 0x84

[   49.344483] usbcore: registered new interface driver snd-usb-audio

[   50.305921] scsi 7:0:0:0: Direct-Access     HP       DPF              0001 PQ: 0 ANSI: 2

[   50.306662] scsi 7:0:0:1: Direct-Access     HP       DPF              0001 PQ: 0 ANSI: 2

[   50.307284] scsi 7:0:0:2: Direct-Access     HP       DPF              0001 PQ: 0 ANSI: 2

[   50.309333] sd 7:0:0:0: Attached scsi generic sg5 type 0

[   50.312063] sd 7:0:0:0: [sde] Attached SCSI removable disk

[   50.312970] sd 7:0:0:1: Attached scsi generic sg6 type 0

[   50.314157] sd 7:0:0:2: Attached scsi generic sg7 type 0

[   50.326661] sd 7:0:0:1: [sdf] Attached SCSI removable disk

[   50.332290] sd 7:0:0:2: [sdg] Attached SCSI removable disk

[   51.989205] Real Time Clock Driver v1.12b

[   57.360987] warning: process `hwsetup' used the deprecated sysctl system call with 1.23.

[   65.474976] NET: Registered protocol family 10

[   67.682498] r8169 0000:01:00.0 enp1s0: unable to load firmware patch rtl_nic/rtl8168d-1.fw (-2)

[   67.706230] r8169 0000:01:00.0 enp1s0: link down

[   67.706266] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready

[   67.725445] r8169 0000:05:01.0 enp5s1: link down

[   67.725469] IPv6: ADDRCONF(NETDEV_UP): enp5s1: link is not ready

[   70.024358] r8169 0000:01:00.0 enp1s0: link up

[   70.024369] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready

[  475.835060] EXT4-fs (md127): mounted filesystem with ordered data mode. Opts: (null)

```

Regards,

Sinanqapudan

----------

## NeddySeagoon

sinanqapudan,

```
[   48.383098] md127: detected capacity change from 0 to 325710774272

[   48.388856] systemd-udevd[21457]: renamed network interface eth0 to enp1s0

[   48.389680] md/raid1:md126: active with 2 out of 2 mirrors

[   48.389714] md126: detected capacity change from 0 to 157220864 
```

Thats the raid sets assembling and running - so raid wise, they are clean.

At 48 seconds after startup, your raid superblocks were all present and correct.

It mounted too

```
[  475.835060] EXT4-fs (md127): mounted filesystem with ordered data mode. Opts: (null) 
```

with no errors.

```
#10878979  #12320772  #12320776  #12320778  #12320784
```

Those are the inode numbers of found fragments of your data.  The colours tell what they are.

You can also try feeding them to file and see if file can work out what they are.

You should be able to do the chroot steps to get into your own system.  That will give you a warm fuzzy feeling :)

Follow the handbook for the rest of the mounts and chrooting steps.

In short, other than things in lost+found, it all looks good.

----------

## sinanqapudan

NeddySeagoon,

I'm afraid I need more detailed instructions on how to proceed.

First, in my lost+found directory

```
livecd lost+found # ls

#10878979  #12320772  #12320776  #12320778  #12320784
```

there are some numbers, one of them is blue, the othera are white with red backgroud. I could not find anywhere an explaination on their meaning.

Second, I couldn't do chrooting. If I follow the "Gentoo Linux x86 with Software Raid and LVM2 Quick Install Guide" I get the following errors:

```
livecd / # mount -t proc proc /mnt/gentoo/proc

mount: mount point /mnt/gentoo/proc does not exist

livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/

livecd / # chroot /mnt/gentoo /bin/bash

chroot: failed to run command '/bin/bash': No such file or directory

livecd / # mount -t proc proc /mnt/gentoo/proc

mount: mount point /mnt/gentoo/proc does not exist

livecd / # mount --rbind /dev /mnt/gentoo/dev

mount: mount point /mnt/gentoo/dev does not exist

livecd / # mount --rbind /sys /mnt/gentoo/sys

mount: mount point /mnt/gentoo/sys does not exist

livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/

livecd / # chroot /mnt/gentoo /bin/bash

chroot: failed to run command '/bin/bash': No such file or directory

```

So the question is: how should I proceed?

Thanks and regards

Sinanqapudan

----------

## NeddySeagoon

sinanqapudan,

```
ls -l 
```

will give some details about the files

light blue (cyan) is a symlink to something - like /usr/src/linux is a symlink

dark blue is a directory

white text on a red background is a program with the SUID bit set.

If it flashes, its a broken symlink.

You need to assemble your raids and mount your root at /mnt/gentoo before /mnt/gentoo/proc will exist.

----------

## sinanqapudan

NeddySeagoon,

so the colour code in the lost+found is the same as the ordinary one! I thought it would be different.

On one thing I need some clarifications:

after assembling raids and mounting /dev/md126 (my system /) at mountpoint /mnt/gentoo, I get:

```
livecd ~ # ls -la /mnt/gentoo

total 28

drwxr-xr-x 5 root root  4096 Jul  9 19:23 .

drwxr-xr-x 6 root root   120 Oct 20 07:53 ..

lrwxrwxrwx 1 root root    36 Nov  4  2011 4.5.3 -> /usr/i686-pc-linux-gnu/gcc-bin/4.5.3

drwxr-xr-x 6 root root  4096 Oct 19 16:49 etc

drwx------ 3 root root 16384 Sep  6  2011 lost+found

drwxr-xr-x 4 root root  4096 Mar  5  2013 usr

```

the /mnt/gentoo/boot is missing. The /mnt/gentoo/boot is the mountpoint for my other raid /dev/md127.

This is the content of the lost+found:

```
livecd ~ # ls -la /mnt/gentoo/lost+found

total 24

lrwxrwxrwx 1 root root    20 Sep 16 19:41 #10878979 -> A-Trust-nQual-03.pem

drwxr-xr-x 2 root root  4096 Jul 20 11:21 #12320772

lrwxrwxrwx 1 root root    27 Sep  8 21:16 #12320776 -> libORBit-imodule-2.so.0.0.0

lrwxrwxrwx 1 root root    19 Aug 19 20:54 #12320778 -> libmpg123.so.0.37.5

lrwxrwxrwx 1 root root    17 Jul 24 06:42 #12320784 -> libplain.so.3.0.0

drwx------ 3 root root 16384 Sep  6  2011 .

drwxr-xr-x 5 root root  4096 Jul  9 19:23 ..

livecd ~ # ls -la /mnt/gentoo/lost+found/#12320772

total 20

drwxr-xr-x 2 root root  4096 Jul 20 11:21 .

drwx------ 3 root root 16384 Sep  6  2011 ..

livecd ~ #

```

How should I proceed?

Should I create the missing directories, such as /mnt/gentoo/boot, /mnt/gentoo/etc, and so on?

Regards

----------

## NeddySeagoon

sinanqapudan,

As your root only contains

```
lrwxrwxrwx 1 root root    36 Nov  4  2011 4.5.3 -> /usr/i686-pc-linux-gnu/gcc-bin/4.5.3

drwxr-xr-x 6 root root  4096 Oct 19 16:49 etc

drwx------ 3 root root 16384 Sep  6  2011 lost+found

drwxr-xr-x 4 root root  4096 Mar  5  2013 usr 
```

most of your system has vanished.

It cannot be recovered.

Your /boot may be the dir in lost+found, as its empty.

What of /home, /sbin, /bin and so on?

Its worth a look round in case there is something to recover before you start over.

If there is some 'must have' data there, you may get it back but its now in space that the filesystem has marked as free.

----------

## sinanqapudan

NeddySeagoon,

so I was not unduly pessimistic after all.

Little damage, being my home desktop, it was not a mission critical machine (we all know raid 0 on / is not very safe, don't we?).

Thanks in any case,

Regards

----------

## sinanqapudan

NeddySeagoon,

I'm trying to reinstall Gentoo on my system but creating the md devices issuing the commands in the Gentoo Linux x86 with Software Raid and LVM2 Quick Install Guide 

```
livecd ~ # mdadm --create /dev/md1 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda1 /dev/sdb1
```

keeps complaining about the resources being busy.

This happens even if I disable (stop) the md devices that were previously created (md1, md3, md126, md127) and then remove them.

I suppose I need to delete them in a more "definifitive" way, but how to? I could not find anything on it...

regards,

Sinanqapudan

----------

## NeddySeagoon

sinanqapudan,

The existing raid sets must be stopped and the members removed from the raid sets.

I think you still need the --force option to make mdadm overwrite an existing raid member.

----------

