Skip to content

Instantly share code, notes, and snippets.

@maqiv
Last active May 29, 2016 10:19
Show Gist options
  • Save maqiv/68de1192e7fbb24744f100215e8b3faf to your computer and use it in GitHub Desktop.
Save maqiv/68de1192e7fbb24744f100215e8b3faf to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# sebastian - 2016-05-29 11:57
# script mount_raid.sh
#
# Little helper-script to mount raid array filesystem
# delayed because of a little systemd/dmraid race
# condition.
#
#
# Add entry to /etc/rc.local:
#
#    # Mount RAID arrays
#    /usr/local/bin/mount_raid.sh
#
LOG_FILE="/var/log/raid_mount"
# Wait at startup to be certain that dmraid is up and
# running and ready to serve.
sleep 15s
echo "Mount raid filesystems `date +%Y.%m.%d-%H:%M:%S`" >> $LOG_FILE
mount -v /opt/data >> $LOG_FILE
mount -v /opt/xen-vms >> $LOG_FILE
echo >> $LOG_FILE
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment