I've setup two iscsi volumes on an opensolaris 101b server, then have
two centos clients attaching to one for each of them, however after
building the filesystem on the second one, I find it's written to the
first one --- data seems to be getting written to both.  While entering
this report, I noticed the GUIDs were identical, which seems to have
been the source of the problem --- I destroyed the second volume and
everything I could client and server about that target, then recreated
from scratch, which got a new GUID assigned, and this time they didn't
overwrite each other.  I'm not sure how I managed to get two volumes
created with the same GUID, but this is the first time I've done
anything with iscsi, and found the docs cryptic and confusing.  It took
some experimentation to get it figured out, and I suspect it happened
while trying to figure out which target gets mapped to which device on
which initiator.  In the end, I'm using acls to restrict targets to one
initiator, and using lvm on the centos client so it doesn't matter which
device a target happens to get assigned to.

For reference, this was what I saw when they were stomping on each other:

<zfs01.server.peak.org> [317] # iscsitadm  list target -v
Target: data/zmail01/store01
    iSCSI Name: iqn.1986-03.com.sun:02:4109b198-6440-ec46-f5c6-e10222e2c72c
    Alias: data/zmail01/store01
    Connections: 1
        Initiator:
            iSCSI Name: iqn.1994-05.com.redhat:a07590e5f0a0
            Alias: zmail01-store01.server.peak.org
    ACL list:
        Initiator: zmail01-store01
    TPGT list:
    LUN information:
        LUN: 0
            GUID: 01000030485fa03000002a004994be7f
            VID: SUN
            PID: SOLARIS
            Type: disk
            Size:  100G
            Backing store: /dev/zvol/rdsk/data/zmail01/store01
            Status: online
Target: data/zmail01/store02
    iSCSI Name: iqn.1986-03.com.sun:02:0ca23b99-11ae-ec31-cc9a-846331f746d2
    Alias: data/zmail01/store02
    Connections: 1
        Initiator:
            iSCSI Name: iqn.1994-05.com.redhat:edb665bd6980
            Alias: zmail01-store02.server.peak.org
    ACL list:
        Initiator: zmail01-store02
    TPGT list:
    LUN information:
        LUN: 0
            GUID: 01000030485fa03000002a004994be7f
            VID: SUN
            PID: SOLARIS
            Type: disk
            Size:  100G
            Backing store: /dev/zvol/rdsk/data/zmail01/store02
            Status: online

On Centos machine 1:

<zmail01-store01.server.peak.org> [105] # iscsiadm -m node show
172.20.1.12:3260,1
iqn.1986-03.com.sun:02:4109b198-6440-ec46-f5c6-e10222e2c72c
172.20.0.19:3260,1
iqn.1986-03.com.sun:02:4109b198-6440-ec46-f5c6-e10222e2c72c
<zmail01-store01.server.peak.org> [106] # iscsiadm -m session show
tcp: [1] 172.20.0.19:3260,1
iqn.1986-03.com.sun:02:4109b198-6440-ec46-f5c6-e10222e2c72c


"strings /dev/sdc" output includes this:

creation_host = "zmail01-store02.server.peak.org"       # Linux
zmail01-store02.server.peak.org 2.6.18-92.1.22.e
l5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686
creation_time = 1236651520      # Mon Mar  9 19:18:40 2009

On Centos machine 2:

<zmail01-store02.server.peak.org> [101] # iscsiadm -m node show
172.20.1.12:3260,1
iqn.1986-03.com.sun:02:0ca23b99-11ae-ec31-cc9a-846331f746d2
172.20.0.19:3260,1
iqn.1986-03.com.sun:02:0ca23b99-11ae-ec31-cc9a-846331f746d2
<zmail01-store02.server.peak.org> [102] # iscsiadm -m session show
tcp: [1] 172.20.0.19:3260,1
iqn.1986-03.com.sun:02:0ca23b99-11ae-ec31-cc9a-846331f746d2

"strings /dev/sdc" output includes this:

creation_host = "zmail01-store02.server.peak.org"       # Linux
zmail01-store02.server.peak.org 2.6.
18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686
creation_time = 1236651520      # Mon Mar  9 19:18:40 2009

Then I recreate the lvm on store01:

<zmail01-store01.server.peak.org> [107] # pvcreate /dev/sdc
  Can't initialize physical volume "/dev/sdc" of volume group
"zfsVGstore02" without -ff
<zmail01-store01.server.peak.org> [108] # pvcreate -ff /dev/sdc
Really INITIALIZE physical volume "/dev/sdc" of volume group
"zfsVGstore02" [y/n]? y
  WARNING: Forcing physical volume creation on /dev/sdc of volume group
"zfsVGstore02"
  Physical volume "/dev/sdc" successfully created
<zmail01-store01.server.peak.org> [109] # vgcreate zfsVGstore01 /dev/sdc
  Volume group "zfsVGstore01" successfully created
<zmail01-store01.server.peak.org> [110] # lvcreate --extents 100%VG
--name zfsLogVGstore01 zfsVGstore01
  Logical volume "zfsLogVGstore01" created

Now "strings /dev/sdc" output on store02 includes this:

creation_host = "zmail01-store01.server.peak.org"       # Linux
zmail01-store01.server.peak.org 2.6.
18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686
creation_time = 1236723444      # Tue Mar 10 15:17:24 2009

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
storage-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/storage-discuss

Reply via email to