Ubuntu – Isn’t md raid assembled after reboot

intelmdadmraid

I'm trying to get an Intel RAID setup. The problem I have is that after a reboot the raid is not available.

These are the steps I go through to setup the Intel RAID using the mdadm command. I've followed the steps on http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/rst-linux-paper.pdf.

$ sudo mdadm --detail-platform
   Platform : Intel(R) Matrix Storage Manager
    Version : 12.0.0.1783
RAID Levels : raid0 raid1 raid10 raid5
Chunk Sizes : 4k 8k 16k 32k 64k 128k
2TB volumes : supported
  2TB disks : supported
  Max Disks : 6
Max Volumes : 2 per array, 4 per controller
I/O Controller : /sys/devices/pci0000:00/0000:00:1f.2 (SATA)

$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
unused devices: <none>

$ sudo mdadm --create /dev/md/imsm /dev/sd[b-c] -n 2 -e imsm
mdadm: container /dev/md/imsm prepared.                                                                                                                                         

$ sudo mdadm --create /dev/md/vol0 /dev/md/imsm -n 2 -l 1                                                                                                                       
mdadm: cannot open device: 11:0
mdadm: array /dev/md/vol0 started.

$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md126 : active raid1 sdc[1] sdb[0]
  1953511424 blocks super external:/md127/0 [2/2] [UU]
  [>....................]  resync =  0.4% (8213824/1953511424) finish=192.8min speed=168142K/sec

md127 : inactive sdc[1](S) sdb[0](S)
  2210 blocks super external:imsm

unused devices: <none>

$ sudo mdadm --examine --scan --config=mdadm.conf
ARRAY metadata=imsm UUID=1b6e3d9e:e14f7906:38f86e54:1f85cdcd
ARRAY /dev/md/vol0 container=1b6e3d9e:e14f7906:38f86e54:1f85cdcd member=0 UUID=546b601a:ccfa6f04:2cc1d0f5:aa05edc2

$ sudo vi /etc/mdadm/mdadm.conf
$ cat /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY metadata=imsm UUID=1b6e3d9e:e14f7906:38f86e54:1f85cdcd
ARRAY /dev/md/vol0 container=1b6e3d9e:e14f7906:38f86e54:1f85cdcd member=0 UUID=546b601a:ccfa6f04:2cc1d0f5:aa05edc2

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I then rebooted here with the raid working
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
unused devices: <none>
$ sudo mdadm --assemble --scan
mdadm: Container /dev/md/imsm0 has been assembled with 2 drives
mdadm: Started /dev/md/vol0 with 2 devices
$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md126 : active raid1 sdb[1] sdc[0]
  1953511424 blocks super external:/md127/0 [2/2] [UU]
  [>....................]  resync =  4.0% (78945280/1953511424) finish=30274.0min speed=1024K/sec

md127 : inactive sdc[1](S) sdb[0](S)
  6306 blocks super external:imsm

unused devices: <none>

So after running an assemble command the raid is available but why isn't it there after a reboot by default?

The system is running;

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"

$ uname -a
Linux mdk1 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Best Answer

  • Support for intel fakeraids is new to mdadm in 14.04. Previous Ubuntu releases used dmraid to activate them. Note that unless you are dual booting with Windows, you should avoid the fakeraid stuff entirely and just stick to native mdadm.

  • Related Question