Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
up: Linux initiator does not like "/" in target name
change all "/" to "." in target name.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
  • Loading branch information
Boaz Harrosh committed May 22, 2012
1 parent 99af330 commit 1b4b03c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions up
Expand Up @@ -32,9 +32,6 @@ TGTADM=./tgt/usr/tgtadm
otgtd_name=otgtd
OTGTD=./tgt/usr/$otgtd_name

# Make target name the hostname
TARGETNAME="${1//\//\.}$(hostname)"

case $1 in
down)
killall -s SIGINT $otgtd_name
Expand Down Expand Up @@ -78,7 +75,10 @@ load_target()
{
mkdir -p $1/

$TGTADM --lld iscsi --mode target --op new --tid $2 --targetname="$TARGETNAME"-"$1"
# Make target name the hostname
TARGETNAME="$(hostname)""${1//\//.}"

$TGTADM --lld iscsi --mode target --op new --tid $2 --targetname="$TARGETNAME"
$TGTADM --lld iscsi --mode target \
--op bind --tid $2 --initiator-address ALL

Expand Down

0 comments on commit 1b4b03c

Please sign in to comment.