How do I automount a fake raid?

Solution 1:

Here are the steps needed to setup fakeraid and get relevant partitions auto-mounted:

  1. Install the dmraid package:

    sudo apt-get install dmraid
    
  2. Reboot (this is because dmraid adds itself into initramfs)

  3. The fakeraid device should appear e.g.:

    $ ls /dev/mapper/*
    brw-rw---- 1 root disk 252,   0 Dec  6 16:21 /dev/mapper/isw_dhdhchcbaf_Dima
    brw------- 1 root root 252,   1 Dec  6 16:21 /dev/mapper/isw_dhdhchcbaf_Dima1
    crw------- 1 root root  10, 236 Dec  6 16:22 /dev/mapper/control
    

    Above, *Dima is the fakeraid device, while *Dima1 is the partition. If you don't have *N, you need to create a partition table, create a partition, format ot with a filesystem and reboot again.

  4. In Ubuntu, all partitions are mounted by UUID by default. Let's find out UUID:

    $ sudo blkid
    [sudo] password for xnox: 
    /dev/sda: TYPE="isw_raid_member" 
    /dev/sdb: TYPE="isw_raid_member" 
    /dev/mapper/isw_dhdhchcbaf_Dima1: UUID="92edd1fd-94c5-4617-b829-fa4a8378b7ae" TYPE="ext4" 
    /dev/sdc1: UUID="A904-D2E7" TYPE="vfat" 
    /dev/sdc2: UUID="6669d411-80c3-41cc-a629-ad84e1ee6854" TYPE="ext4" 
    /dev/sdc3: UUID="2bf263f1-753f-4b2e-92a6-b00381515e0c" TYPE="swap" 
    /dev/sdd1: UUID="C499-1A68" TYPE="vfat" 
    

    See that the wanted one is UUID="92edd1fd-94c5-4617-b829-fa4a8378b7ae"

  5. Therefore the /etc/fstab entry would be:

    UUID="92edd1fd-94c5-4617-b829-fa4a8378b7ae" /srv/dima ext4 defaults 0 0
    

Solution 2:

This should just work as the dmraid package installs hooks into the ramdisk to probe fake raid devices. If that isn't working then you have a real bug. To get back to a sane baseline please perform:

sudo -s
apt-get install --reinstall dmraid
update-initramfs -u -k all
reboot

If that device still isn't showing up in /dev/mapper then please file a bug.