Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question

3 Answers 3

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.

share|improve this answer
    
So 14.04 would work? What in the commands I've run means it is fakeraid? and how do I avoid it? –  mikelanc Mar 28 at 22:55
    
@user262741, "intel matrix raid" is a fakeraid. See wiki.ubuntu.com/FakeRaidHowto. The dmraid package will recognize it in 13.10. You avoid it by blowing it away in the bios utility, and doing a normal software raid install. –  psusi Mar 29 at 0:52
    
The dmraid package is not installed. When the dmraid package is installed, you are correct, it does recognise it and I need to use "dmsetup remove" to get rid of it before running the assemble commands. I don't think dmraid is getting in the way any more. –  mikelanc Mar 29 at 11:59
    
@mikelanc, let me try to explain this again. Historically fakeraids, of which intel matrix storage is one, were recognized by dmraid. mdadm recently gained the ability to recognize intel matrix storage in addition to its own native format. This will not work properly in 13.10 because it requires some other changes to the OS, so if you want to use the fakeraid in 13.10, you need to use dmraid, not mdadm. Unless you need to dual boot with windows though, fakeraid is bad, so you should blow it away in the bios, and use mdadm's native format. –  psusi Mar 29 at 17:20

Add

auto=md

to the proper ARRAY line in mdadm.conf:

Before:

ARRAY /dev/md/vol0 container=1b6e3d9e:e14f7906:38f86e54:1f85cdcd member=0    UUID=546b601a:ccfa6f04:2cc1d0f5:aa05edc2

After:

ARRAY /dev/md/vol0 container=1b6e3d9e:e14f7906:38f86e54:1f85cdcd member=0 UUID=546b601a:ccfa6f04:2cc1d0f5:aa05edc2 auto=md

In my case, i'm not using containers (as in the Intel paper), so i have only one line where i also specify the metadata format, as below:

ARRAY /dev/md/hdd level=raid10 metadata=1.0 num-devices=4 UUID=462b55f7:e09bc196:deb847c4:b6be609c name=hdd auto=md

In md, raid names only work with metadata 1.0 or higher. Hope this help.

share|improve this answer

I got the same problem with a fake bios raid. Since my raid is needed to boot, I had to put a script in /usr/share/initramfs-tools/scripts/init-premount to assemble the raid:

#!/bin/sh
mdadm --assemble --scan

Then I update the initram by running the command:

update-initramfs -u

I try to make my raid work with dmraid but only the raid0 set was working. raid5 seems to work only with mdadm. However with Ubuntu 12.04 both raid set was working with dmraid.

share|improve this answer
1  
Could you make it more clear - is this answering the question directly, or more like providing background? –  Volker Siegel Aug 16 at 19:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.