The following setup assumes that you know how to configure a iSCSI target and initiator along with setting up a new filesystem on a iSCSI target. Now assume the following
I deiced to use autofs since it is a nice way to have a automated remounting of the filesystem if the connection is lost to the iSCSI target.
apt-get install autofs
Edit /etc/auto.master
/netAutofs /etc/auto.netAutofs --timeout=300
Edit /etc/auot.netAutofs
netHomes -fstype=auto :UUID="00ab362b-4241-4670-b130-84dc3b0c860c"
The preceding configurations will mount the parition with UUID 00ab362b-4241-4670-b130-84dc3b0c860c on /netAutofs/netHomes.. This again assumes the the iSCSI target that holds the referenced filesystem is connected.
Edit /etc/rc.local, This will fix the issue that the filesystem is not availible for multiple seconds to a few min. after bootup.
blkid /etc/init.d/autofs restart
Next we need to make at least one interface unmanned by Network Manager since NM disconnects all managed interfaces when the computer suspends. To do this we need to edit /etc/network/interfaces
auto eth0 iface eth0 inet dhcp
It appears that during the shutdown or reboot process the previous user sessions are not cleaned up very well. This causes the shutdown process to get stuck with open files on the mounted iSCSI filesystems. I was able to fix this be adding the following to /etc/init.d/umountiscsi.sh
while [ "`lsof | grep /netAutofs/netHomes | tr -s \" \" | cut -d \" \" -f2`" != "" ] do echo "Killing User Processes" LSOF_PROCS="`lsof | grep /netAutofs/netHomes | tr -s \" \" | cut -d \" \" -f2`" for i in ${LSOF_PROCS} do kill ${i} > /dev/null 2>&1 done sleep 1 done