OK - so this isn't so much a question but something I hope will help people...
This shows you how to recover and re-access data on a failed RAID1 array (two drives mirrored) if OpenMediaVault is no longer seeing your RAID array.
I see a lot of negative talk about RAID1 (mirroring on here) and the way OpenMediaVault handles RAID1 when a disk fails or is removed. I still can't understand why OpenMediaVault doesn't do the following automatically but hey hum I expect there will be someone with a good explanation...
Problem is if a disk fails while the box is off (a power spike or cut will do this) you might find yourself in a position where OpenMediaVault can no longer see your RAID array. Obviously you have a good backup somewhere so there is no worries if you actually do lose data but that takes time to restore etc and sometimes you want your NAS box back and functioning ASAP and don't want to wait for a new disk from Amazon to arrive before you can rebuild and get back to normal.
WARNING: I am NOT responsible for your data or any loss of it!
So very quickly before I start - why would I want to use RAID instead of RSYNC or similar??? Well basically I switch my NAS box on and off via WOL and SSH all the time. I have an app on my phone which allows me to wake it up when I want and turn it off when I want. Call me a hippy, call it saving the planet call it the fact I simply don't like a box buzzing away in the corner the whole time. Either way I prefer to rely on RAID for redundancy than RSync and a schedule... That's my choice and I'm happy if you think that's crazy.
So to get your share back you basically have to do two things. First, force a restart of the array with the single good disk. Second remount it so you can access it via a share, and here's how...
1. SSH or connect via the console log onto your openmediavault using root and the password you set at setup
2. First we need to make sure that the raid array is still there. Run "cat /proc/mdstat" and you should see something like this in the data returned...
md0 : inactive sdc[2](S)
Make a note of the "mdx" bit where x could be any number and the "sdx" bit where x could also be any number. The md0 is your mdadm (RAID) array and the sdc is the disk that's still working/present.
3. Now we need to take the array offline so we can restart it with just one disk
mdadm --stop /dev/md0
4. Now force the array back online and active using the following command...
mdadm --assemble --force --verbose /dev/md0 /dev/sdc
make sure you change the md0 and sdc bits appropriately. You should get a message that reads
mdadm: /dev/md0 has been started with 1 drive (out of 2).
AND it should now show up as degraded in OpenMediaVault under raid but you still won't be able to access it yet...
5. Now your array is back online you need to remount it so that you can access it via a share. Check the share tab in openmediavault for the share or shares that are on the raid array. You will see the name of the share and the device. Make a note of that device.
mine looked like this...
/srv/dev-disk-by-label-RaidDisk
You can also run
cat /etc/fstab
from the console and you should see the persistent mount point listed there too -- compare notes if you like...
6. Now you need to mount that array using the mount point used by the share... From the console run...
mount /dev/md0 /srv/dev-disk-by-label-RaidDisk (again make sure you adjust for your config)
7. Voila - you should now be able to access your share...