11

Hardware

  • Asus K8N4-E Deluxe Mobo
  • Sil 3114 fake raid, onboard
  • 2 Seagate 250 gb hd, hosting my /home
  • A backup on a separate hard disk of /home

What I have so far

I've made the raid using the Sil 3114 firmware. I'm using raid level 1. I have a bash script I run as root as soon as I get a prompt:

dmraid -ay
mount /dev/mapper/sil*1 /home

The problem

I have to logon as root and use that stupid bash script every boot. Ubuntu isn't automatically understanding the raid volume. I haven't put the raid volume in fstab because it doesn't exist on boot. How do I have /home from my fakeraid automounted at boot?

Braiam
  • 67,791
  • 32
  • 179
  • 269
djeikyb
  • 30,245

6 Answers6

6

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
    
kiri
  • 28,246
  • 16
  • 81
  • 118
Dima
  • 9,857
  • 2
    You edited my question into something wildly different, and provided what looks like a correct answer. However, crucial to my question is that on boot, the devices don't exist until after dmraid -ay. I strongly feel your edit should be undone and then become a completely new question for which this is a great answer. – djeikyb Dec 07 '13 at 00:38
  • udev rules execute dmraid -ay. – Dima Dec 11 '13 at 06:29
  • they should, but at the time, they weren't (or failed during the attempt), hence the question. – djeikyb Dec 12 '13 at 01:21
  • bugs are reported on launchpad.net – Dima Dec 12 '13 at 17:04
  • Dima, ping me in chat if you want to talk about this. I don't feel our comments are constructive here anymore. – djeikyb Dec 12 '13 at 17:13
  • please show ls -l as the output shows a long listing. I could not edit as system would not allow such a short edit. – Timothy C. Quinn Feb 20 '19 at 22:49
4

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.

ppetraki
  • 5,483
3

I believe @ppetraki is correct about this being a bug in the version of ubuntu this was about. A good workaround is:

  1. Write an upstart service that runs dmraid -ay when the system boots.
  2. In fstab, mount the devices by their UUID
djeikyb
  • 30,245
1

Does your Volume Name have spaces in it?

I came across your problem, while researching my own. In my case the volume was called "Big Data Volume". dmraid mapped that as /dev/mapper/isw_gdghjicjaBig%x20Data%x20Volume, but other parts of the process continued to try and use "/dev/mapper/isw_gdghjicja_Big Data Volume" and failed.

I went back into Windows (I presume that's why you too are using dmraid, to dual-boot Windows), and Intel's Matrix Storage manager, and renamed my volume to Big_Data_Volume. Linux then booted, and mounted the mirrored volume correctly, without me doing anything else.

  • No, it didn't have any spaces. Glad you solved your problem though! Hopefully will help someone where this is the problem. – djeikyb Oct 23 '15 at 17:20
0

try this in fstab:

/dev/mapper/sil*1  /home  reiserfs  user,nosuid,exec,nodev  0  0 

Then do sudo mount -a or reboot

Jorge Castro
  • 71,754
  • 1
    I'm pretty sure you can't use wild cards in fstab, and he already said he can't add it to fstab because he has to run dmraid -ay first. – psusi Nov 10 '11 at 14:32
0

You don't have to do anything normally; it just works out of the box. Ubuntu runs dmraid to activate the volume as soon as it is detected, unless you did something odd. Ideas that come to mind are you compiled your own dmraid instead of installing it through the package manager, or you boot with the nodmraid kernel argument. You might also check and make sure that sudo blkid identifies the underlying disks as sil raid components.

By the way, fakeraid is not as well supported as mdadm raid, so unless you are dual booting with windows, you should ditch the fakeraid and go with mdadm.

psusi
  • 37,551