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.

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?

share|improve this question

5 Answers 5

up vote 2 down vote accepted

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

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.

share|improve this answer

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
    
share|improve this answer
1  
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 7 '13 at 0:38
    
udev rules execute dmraid -ay. –  Dima Dec 11 '13 at 6:29
    
they should, but at the time, they weren't (or failed during the attempt), hence the question. –  djeikyb Dec 12 '13 at 1: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

try this in fstab:

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

Then do sudo mount -a or reboot

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

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.

share|improve this answer

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.