Script for mounting the filesystem – Dell Acceleration Appliances for Databases User Manual
Page 66

Script for Mounting the Filesystem
#!/bin/sh
### BEGIN INIT INFO
# Provides: mount-ion-filesystems
# Required-Start: multipathd
# Required-Stop: multipathd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Mount ION File Systems
### END INIT INFO
### BEGIN CHKCONFIG INFO
# chkconfig: 2345 13 87
# description: Mount ION File Systems
### END CHKCONFIG INFO
timeout=120
usage() {
echo
echo "Usage: `basename $0` {start|stop|restart|status}"
echo
return 2
}
is_ion_lun() {
[ "${1#/dev/disk/by-id/dm-uuid-mpath-}" != "$1" ]
}
luns_exist() {
grep -v '^#' /etc/fstab |
while read dev mountpoint vfstype options freq passno; do
is_ion_lun "$dev" && [ ! -e "$dev" ] && return 1
done
return 0
}
mount_luns() {
grep -v '^#' /etc/fstab |
while read dev mountpoint vfstype options freq passno; do
is_ion_lun "$dev" && fsck -n "$dev" && mount "$dev"
done
}
unmount_luns() {
59