mdraid volume does not get mounted using fstab, but manually

2 posts / 0 new
Last post
#1 Tue, 2015-09-29 19:00
troubleticket
  • troubleticket's picture
  • Offline
  • Last seen: 1 year 9 months ago
  • Joined: 2013-06-21

Hi forum,

building a Server for a friend of mine gives the above problem:
I created a raid1 device on a running alpine 3.2.3 installation, which should mount under /var/storage as storage for a samba-share.
Mounting it manually ("mount -a" after boot/login as root) works perfectely.
But neither using "UUID=" nor "/dev/md0" in fstab lets it mount automatically on boot.
initramfs and extlinux are updated, but no success so far ...

What may I be missing?

Thank you for your time reading (&perhaps answering)

Joachim -Joe- Weber

Tue, 2016-03-01 19:20
winky
  • winky's picture
  • Offline
  • Last seen: 1 year 9 months ago
  • Joined: 2016-03-01

hi joe,

i tried to setup a softraid lvl 5 in a virtualbox (with alpine 3.3.1) using this HowTo:

http://wiki.alpinelinux.org/wiki/Setting_up_a_software_RAID_array

i added the following line to fstab:

vbox-alpine:~# tail -1 /etc/fstab
/dev/md0	/mnt/raid	ext4	defaults	0 0

finally i did this like the tutorial suggested:

vbox-alpine:~# rc-update add mdadm-raid
 * service mdadm-raid added to runlevel default

...which results in a lot of errors during boot (/dev/md0 on /mnt/raid failed: No such file or directory)
but i found a hint in the setup-disk-script, obviously the runlevel is an important thing and it did the trick (for my case):

vbox-alpine:~# grep mdadm-raid /sbin/setup-disk 
		rc-update --quiet add mdadm-raid boot
 
vbox-alpine:~# rc-update del mdadm-raid
 * service mdadm-raid removed from runlevel default
 
vbox-alpine:~# rc-update add mdadm-raid boot
 * service mdadm-raid added to runlevel boot

Log in or register to post comments