# Kernel 3.8.13 panic raid1 ssd

## christophe_y2k

Hi all,  on new install...:

2xSSD in raid:

# fdisk /dev/sda

```

Disk /dev/sda: 180.0 GB, 180045766656 bytes, 351651888 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0xf92fd572

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048     1050623      524288   fd  Linux raid autodetect

/dev/sda2         1050624    51382271    25165824   82  Linux swap / Solaris

/dev/sda3        51382272   351651887   150134808   fd  Linux raid autodetect

```

Second disk  partition cloned with sfdisk

# sfdisk -d /dev/sda | sfdisk /dev/sdb

# fdisk /dev/sdb

```

Disk /dev/sdb: 180.0 GB, 180045766656 bytes, 351651888 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1   *        2048     1050623      524288   fd  Linux raid autodetect

/dev/sdb2         1050624    51382271    25165824   82  Linux swap / Solaris

/dev/sdb3        51382272   351651887   150134808   fd  Linux raid autodetect

```

```

# mknod /dev/md1 b 9 1 

# mknod /dev/md2 b 9 2

# mknod /dev/md3 b 9 3

# mdadm --create --verbose /dev/md1 --level=1  --metadata=0.9 --raid-devices=2 /dev/sda1 /dev/sdb1

# mdadm --create --verbose /dev/md2 --level=0 --name=swap --raid-devices=2 /dev/sda2 /dev/sdb2

# mdadm --create --verbose /dev/md3 --level=1 --name=racine --raid-devices=2 /dev/sda3 /dev/sdb3

```

# nano -w /etc/mdadm.conf

```

ARRAY /dev/md1 metadata=0.90 UUID=c94c7aa4:4346ddfd:cb201669:f728008a

ARRAY /dev/md3 metadata=1.2 name=racine UUID=fc8db7ad:ad7e74ec:9363f680:5fa54ef2

ARRAY /dev/md2 metadata=1.2 name=swap UUID=83108595:35765f4f:16fdc35e:51dbf01b

```

Kernel with NO autodetect raid array at boot (ext4/3/2  and raid0156 compiled)

# nano -w /etc/fstab

```

/dev/md1               /boot           ext3            discard,noauto,noatime  1 2

/dev/md3               /               ext4            discard,noatime         0 1

/dev/md2               none            swap            sw              0 0

/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0

shm                    /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

```

# nano -w /boot/grub/grub.conf

```

default 0

timeout 10

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Kernel 3.8.13 - By Christophe_Y2k

root (hd0,0)

kernel /boot/kernel-3.8.13 root=/dev/md3 rootfstype=ext4

```

Have an kernel panic VFS can't found root ...

i try  root=/dev/md0 ... 1 ... 2 ...

----------

## NeddySeagoon

christophe_y2k,

Your kernel panic is expected.

You have 

```
kernel /boot/kernel-3.8.13 root=/dev/md3 rootfstype=ext4
```

but no way to assemble the raid at /dev/md3 before root is mounted.

You must use an initrd for that.

Your /etc/mdadm.conf and anything else in /etc cannot be used as /etc is on root and root is neither assembled nor mounted.

There are two choices.  Make an initrd or remake the raid to be  --metadata=0.9 and use kernel raid autodetect.

----------

## christophe_y2k

NeddySeagoon ! You're always the best for RAID question ....

Have you experience with RAID1 SSD ?

Intel says me after some  time Intel SSD crash Intel only validate ssd in raid 0 (but they work for 1 and 5 ... since more one year)

I don't know if they test with Linux mdadm...

----------

## NeddySeagoon

christophe_y2k,

It is not clear if you are asking about Intel Storage Manager Raid or Kernel raid.

Both use mdadm but they are set up differently.

Your original post shows the use of kernel raid.

That  the disks in a raid set are SSD or not makes no difference to the operation of the raid.

Use of the trim command (the discard option) may not work on raid sets.

----------

## christophe_y2k

Thanks for your reply !

I use kernel raid with mdadm software all my disks are in AHCI mode from bios motherboard

i do not use intel fakeraid bios or hardware raid card

I use ssd in raid ("swap" in raid0, "boot" and "/" in raid1) you say me, trim command do not work with mdadm ?

----------

## NeddySeagoon

christophe_y2k,

trim may not work as there is an extra layer of software between the filesystem and the drive(s) when raid is in use.

For raid1, there is no redundant data to calculate - the same data is written to both drives. 

With raid456, making trim work is harder.

----------

