Bug 589988

Summary: Add a configurable (or random) way of setting a WWN on targets
Product: Red Hat Enterprise Linux 5 Reporter: Dan Yasny <dyasny>
Component: scsi-target-utilsAssignee: Andy Grover <agrover>
Status: CLOSED WONTFIX QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: low    
Version: 5.5CC: acathrow, jcapel, roland.friedwagner, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-27 23:37:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Yasny 2010-05-07 13:08:28 UTC
Description of problem:
Currently the targets presented to the initiator as 1IET10001000. If I set up two hosts serving targets, and connect from the same initiator host, I get two identical WWNs, which creates confusion and renders the second host's tagets unusable for LVM setups. 

Version-Release number of selected component (if applicable):
scsi-target-utils-0.0-6.20091205snap.el5_5.2


How reproducible:
always

Steps to Reproduce:
1.install two rhel 5.5 hosts with scsi-target utils
2.create a target on both
3.connect to both from the same initiator host
  
Actual results:
multipath -ll shows:
1IET_00010001 dm-1 RHEV GSS,VIRTUAL-DISK
[size=100G][features=0][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
 \_ 2:0:0:1 sdb 8:16  [active][ready]

Trying to use the second target with pvcreate returns Can't initialize physical volume "/dev/mpath/1IET_00010001" of volume group "5a6800e6-5985-4db7-add1-db4cf7bc037a" without -ff 

Expected results:
WWN line to be configurable, or concatenated with a unique string to avoid confusion

Additional info:

Comment 1 Mike Christie 2011-02-02 10:17:43 UTC
Sorry, I did not see this until today.

You can do this by setting the scsi_sn or scsi_id params.

Example in targets.conf

<target iqn.2008-09.com.example:server.target5>
 <backing-store /dev/sdb1>
    scsi_sn somevalue
    scsi_id someothervalue