User Tools

Site Tools


ubuntu:iscsihomedir

This is an old revision of the document!


Ubuntu 14.10 Home Directories over iSCSI

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

  • You have a ext4 filesystem on the iSCSI target.
  • The iscsi initiator connects/logs into the target on bootup

Setup Autofs to mount the iSCSI filesystem

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.

Install packages

apt-get install autofs

Configure

Edit /etc/auto.master

/etc/auto.master
/netAutofs /etc/auto.netAutofs --timeout=300

Edit /etc/auot.netAutofs

/etc/auto.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.

Misc Fixes

Edit /etc/rc.local, This will fix the issue that the filesystem is not availible for multiple seconds to a few min. after bootup.

/etc/rc.local
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

/etc/network/interfaces
auto eth0
iface eth0 inet dhcp
ubuntu/iscsihomedir.1422761234.txt.gz · Last modified: 2015/01/31 21:27 by tschulz