1 = Export iSCSI with gustini =
2 This document describes how to add new new volumes on gustini and add them into the OS.
6 * Log into gustini via webfrontend
10 add volume size and name but leave LUN blank (NONE)
12 find the next free scsi-lun
13 * run "multipathd -k" on dijkstra
15 geo2-boot (3600c0ff000d5f6bde2d4cf4901000000) dm-7 HP ,MSA2012i
16 [size=245M][features=0][hwhandler=0]
17 \_ round-robin 0 [prio=0][active]
18 \_ 1:0:0:1 sda 8:0 [active][ready]
19 \_ 0:0:0:1 sdb 8:16 [active][ready]
21 find the next unused one and map it
22 + on dijkstra: rescan the iscsi bus
23 iscsiadm -m node --targetname "iqn.1986-03.com.hp:storage.msa2012i.0834d5ecda.a" --rescan
25 + on dijkstra: add aliases to the wwids (show topology)
26 + on dijkstra: service multipath-tools reload
29 == via telnet interface ==
31 * Log into gustini via telnet
32 * create a new volume (eg berlioz-boot) on vdisk giustini-vdisk-1:
33 + create volume vdisk giustini-vdisk-1 size 256MB berlioz-boot
34 (there is a 'help create volume' command with lots of informations)
35 * find the next free LUN numbers on traetta:
36 + show host-maps traetta
37 * map the new volume to traetta.debian.org, LUN 12
38 + map volume berlioz-boot lun 12 host traetta access rw
39 (again, there is a 'help map volume' command with lots of informations)
41 * Run 'show host-maps $host' again, then, on the host, run:
45 a="${sn%??????????????????????????}"; sn="${sn#??????}"
46 b="${sn%????????????????????}"; sn="${sn#??????}"
47 c="${sn%??????????????}"; sn="${sn#??????}"
50 if [ "${c#0000}" = "$c" ]; then
51 echo >&2 "sn has unexpected value ($1: $a - $b - $c - $d)"
55 echo "36${a}000${b}${c#0000}${d}"
61 echo "Paste appropriate 'show host-maps $host' output line:"
62 read name sn id lun access channels
64 if [ "$access" != "rw" ]; then
65 echo >&2 "Do not have rw access"
69 if [ "$(echo -n "$sn" | wc -c)" != "32" ]; then
70 echo >&2 "Unexpected sn length in '$sn' (wanted 32 chars)"
74 wwid=$(convert_sn "$sn")
76 if [ -z "$wwid" ]; then
87 mp="$(multipath -ll $wwid)"
89 echo >&2 "Warning: multipath does not know about $wwid"
93 if ! echo "$mp" | grep -q ":$lun "; then
94 echo >&2 "Warning: Are you sure $wwid is lun $lun? multipath -ll disagrees"