Local network iSCSI setup

Written by Peter Davies on .

Simple notes so far:

# is it a local dev server?
echo 0 > /proc/sys/kernel/hung_task_timeout_secs
apt-get install ntpdate open-iscsi
/etc/init.d/open-iscsi start
iscsiadm -m discovery -t sendtargets -p 192.168.1.5

# make sure the only iscsi target is the NAS box
cd /etc/iscsi/nodes/iqn.1992-04.com.emc:storage.juicy-nas.braeburn
rm -rf [everythign except: 192.168.1.5,3260,1]

# edit default file and set any "manual" values to automatic
# and do the same for:
nano /etc/iscsi/iscsid.conf

node.session.timeo.replacement_timeout = 5
node.conn[0].timeo.login_timeout = 5
node.conn[0].timeo.logout_timeout = 15
node.conn[0].timeo.noop_out_interval = 2
node.conn[0].timeo.noop_out_timeout = 2
node.session.err_timeo.abort_timeout = 15

/etc/init.d/open-iscsi restart

# use virtualmin for this:
fdisk /dev/sdb

# format disk
mkfs -t ext4 -q /dev/sdb1

# find out the disk name
# and edit /etc/fstab

nano /etc/fstab

# add the following
/dev/sdb1  /home  ext4  defaults,auto,_netdev  0  0