Re: LUN missing after target server crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok, found the problem. Its RHEL6. Since the md (raid) people decided to discontinue raid autodetect, redhat decided to be clever invent their own raid autodetect. So when the system comes up it probes all the devices and attempts to assemble them into a raid device, even if the rest of the devices in the raid group arent even there. So yes, it for some stupid reason builds an incomplete raid device on boot. And whats even better is theres a kernel option to disable building md raid arrays. Ya, it ignores it... So due to it being in a md device, tgtd doesnt want to add it to the iSCSI target

-Patrick

Sent: Fri Dec 10 2010 00:13:19 GMT-0700 (Mountain Standard Time)
From: Patrick H. <stgt@xxxxxxxxxxxx>
To: stgt@xxxxxxxxxxxxxxx
Subject: LUN missing after target server crash
I've been playing with stgt in a cluster of VMs and have run across one
issue. Whenever the target is mounted on a client and I kill the VM
running tgtd, when the box comes back up the LUN is missing. The target
is still there, just the LUN is gone. If I re-add it everything works
fine, but I would like to know why I have to do this.
Additionally the target server has 2 targets, and both of them are in
active sessions on a client, but its only the target that is actually
mounted at the time that is missing after reboot.

Before simulated crash
---------------------------
Target 1: iqn.165.212.101.240:nas03.sdb1
   System information:
       Driver: iscsi
       State: ready
   I_T nexus information:
       I_T nexus: 2
           Initiator: iqn.1994-05.com.redhat:fce94bd7cd86
           Connection: 0
               IP Address: 165.212.101.241
   LUN information:
       LUN: 0
           Type: controller
           SCSI ID: IET     00010000
           SCSI SN: beaf10
           Size: 0 MB
           Online: Yes
           Removable media: No
           Backing store type: rdwr
           Backing store path: None
       LUN: 1
           Type: disk
           SCSI ID: IET     00010001
           SCSI SN: beaf11
           Size: 268 MB
           Online: Yes
           Removable media: No
           Backing store type: rdwr
           Backing store path: /dev/sdb1
   Account information:
   ACL information:
       ALL
Target 2: iqn.165.212.101.240:nas03.sdb2
   System information:
       Driver: iscsi
       State: ready
   I_T nexus information:
       I_T nexus: 1
           Initiator: iqn.1994-05.com.redhat:fce94bd7cd86
           Connection: 0
               IP Address: 165.212.101.241
   LUN information:
       LUN: 0
           Type: controller
           SCSI ID: IET     00020000
           SCSI SN: beaf20
           Size: 0 MB
           Online: Yes
           Removable media: No
           Backing store type: rdwr
           Backing store path: None
       LUN: 1
           Type: disk
           SCSI ID: IET     00020001
           SCSI SN: beaf21
           Size: 268 MB
           Online: Yes
           Removable media: No
           Backing store type: rdwr
           Backing store path: /dev/sdb2
   Account information:
   ACL information:
       ALL


After the box comes back up
----------------------------------
Target 1: iqn.165.212.101.240:nas03.sdb1
   System information:
       Driver: iscsi
       State: ready
   I_T nexus information:
       I_T nexus: 1
           Initiator: iqn.1994-05.com.redhat:fce94bd7cd86
           Connection: 0
               IP Address: 165.212.101.241
   LUN information:
       LUN: 0
           Type: controller
           SCSI ID: IET     00010000
           SCSI SN: beaf10
           Size: 0 MB
           Online: Yes
           Removable media: No
           Backing store type: rdwr
           Backing store path: None
   Account information:
   ACL information:
       ALL
Target 2: iqn.165.212.101.240:nas03.sdb2
   System information:
       Driver: iscsi
       State: ready
   I_T nexus information:
       I_T nexus: 2
           Initiator: iqn.1994-05.com.redhat:fce94bd7cd86
           Connection: 0
               IP Address: 165.212.101.241
   LUN information:
       LUN: 0
           Type: controller
           SCSI ID: IET     00020000
           SCSI SN: beaf20
           Size: 0 MB
           Online: Yes
           Removable media: No
           Backing store type: rdwr
           Backing store path: None
       LUN: 1
           Type: disk
           SCSI ID: IET     00020001
           SCSI SN: beaf21
           Size: 268 MB
           Online: Yes
           Removable media: No
           Backing store type: rdwr
           Backing store path: /dev/sdb2
   Account information:
   ACL information:
       ALL
-------------------

Notice that Target 1 - LUN 1 is gone
`tgtadm --mode logicalunit --op new --tid 1 --lun 1 -b /dev/sdb1` will
add it back and it works fine


My targets.conf
--------------------
default-driver iscsi
iSNSServerIP 165.212.101.243
<target iqn.165.212.101.240:nas03.sdb2>
       backing-store /dev/sdb2
</target>
<target iqn.165.212.101.240:nas03.sdb1>
       backing-store /dev/sdb1
</target>
--------------------

Running:
rhel6 2.6.32-71
scsi-target-utils 1.0.4-3



--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux