My understanding on opensuse 11.1 is that the _netdev doesn’t work (its supposed to make it wait until the network is up) but you also have to wait for open-iscsi to initiate and connect anyway.
There doesn’t appear to be a provided solution at the moment so I have created a new init script that checks the file system first and then mounts the drive(s).
Its a hack of the boot.localfs init script. Its ugly and the fsck target is hardcoded but it does what it is supposed to.
If you copy it to /etc/init.d and then do chkconfig sanload on it will work (or does for me).
I’ll append it and if anyone can make suggestions on how to improve - great.
#! /bin/sh
/etc/init.d/sanload
BEGIN INIT INFO
Provides: sanload
Required-Start: $network $open-iscsi
Required-Stop: $network $open-iscsi
Default-Start: 3 5
deafault-Stop: 0 1 2 6
Short-Description: check and mount san filesystems
Description: check and mount san filesystems
END INIT INFO
. /etc/rc.status
to get max number of parallel fsck processes
. /etc/sysconfig/boot
. /etc/sysconfig/kernel
. /etc/sysconfig/sysctl
test -z “$REDIRECT” && REDIRECT="$(showconsole 2>/dev/null)"
export REDIRECT
export FSCK_MAX_INST
Special file systems (memory and network based)
typeset -r nomnt=autofs,bdev,rootfs,sockfs,pipefs,anon_inodefs,inotifyfs,eventpollfs,futexfs
typeset -r tmpfs=tmpfs,ramfs,hugetlbfs,mqueue
typeset -r netfs=nfs,nfs4,smbfs,cifs,afs,ncpfs
tmp=""
while read tag name rest ; do
test “$tag” = “nodev” || continue
“$name” =~ ^(${nomnt//,/|})$ ]] && continue
“$name” =~ ^(${tmpfs//,/|})$ ]] && continue
“$name” =~ ^(${netfs//,/|})$ ]] && continue
tmp=${tmp:+$tmp,}$name
done < /proc/filesystems
typeset -r memfs=$tmp
typeset -r mntfs=$tmpfs,$memfs
typeset -r nofs=no${netfs//,/,no},no${memfs//,/,no}
unset tmp name rest
rc_reset
case “$1” in
start)
#
MAY_FSCK=1
FSCK_RETURN=0
echo “Starting sanload”
if test ! -f /fastboot -a -z “$DO_FASTBOOT” -a $MAY_FSCK -eq 1 ; then
# common options for file system check
FSCK_OPTS="-R -M -a"
# force file system check if forced
if test -f /forcefsck -o “$DO_FORCEFSCK” = “yes” ; then
FSCK_OPTS="$FSCK_OPTS -f"
fi
# If we use a serial console, don’t use the fsck progress bar
if test “$REDIRECT” = “/dev/tty1” ; then
FSCK_OPTS="$FSCK_OPTS -C"
else
FSCK_OPTS="$FSCK_OPTS -V"
fi
echo “Checking file systems…”
fsck $FSCK_OPTS /dev/disk/by-uuid/f350979f-e128-41b7-8689-ffebc3c44aa4
# A return code of 1 indicates that file system errors
# were corrected, but that the boot may proceed.
# A return code of 2 or larger indicates failure.
FSCK_RETURN=$?
test $FSCK_RETURN -lt 4
rc_status -v1 -r
if test $FSCK_RETURN -gt 1 -a $FSCK_RETURN -lt 4 ; then
# if appropriate, switch bootsplash to verbose
# mode to make text messages visible.
test -f /proc/splash && echo “verbose” > /proc/splash
echo
echo “fsck succeed, but no mount reboot is required.”
echo
# sleep 1
# sync
# reboot -f
elif test $FSCK_RETURN -gt 3; then
# if appropriate, switch bootsplash to verbose
# mode to make text messages visible.
test -f /proc/splash && echo “verbose” > /proc/splash
# Stop blogd since we reboot after sulogin
# test -x /sbin/blogd && killproc -QUIT /sbin/blogd
#if test -x /etc/init.d/kbd ; then
# /etc/init.d/kbd start
#fi
echo
echo “fsck failed for at least one filesystem (not /).”
echo “Please repair manually and reboot.”
echo “The root file system is is already mounted read-write.”
echo
fi
if test $FSCK_RETURN -gt 0; then
sync
> /fsck_corrected_errors
fi
fi
#
# clean up
#
rc_status -v -r
#
# Mount local filesystems in '/etc/fstab' (and create an entry
# for / and /proc).
#
mount -av -t $nofs -O no_netdev
rc_status -v1 -r
;;
stop)
echo "Unmounting file system"
umount -t ext3 /dev/disk/by-uuid/f350979f-e128-41b7-8689-ffebc3c44aa4$mtab -t ext3 ;;
esac
rc_status -v1 -r
rc_exit
restart)
rc_failed 3
rc_status -v
;;
status)
rc_failed 4
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
rc_exit