Hide Forgot
Description of problem: This worked before the update to latest versions: <target iqn.xxxxxx:tgt1> backing-store /dev/sdb </target> When running --op show, every such target used to display two LUNs - LUN0, controller and LUN1, the actual block device At the latest version scsi-target-utils-1.0.8-0.el5 starting the tgtd I can only see the controller LUN, and have to add the block LUN manually # service tgtd start Starting SCSI target daemon: Starting target framework daemon [root@dot10 ~]# tgtadm --mode target --op show Target 1: iqn.2008-09.com.redhat.example:tgt1 System information: Driver: iscsi State: ready I_T nexus information: LUN information: LUN: 0 Type: controller SCSI ID: IET 00010000 SCSI SN: beaf10 Size: 0 MB Online: Yes Removable media: No Backing store type: null Backing store path: None Backing store flags: Account information: ACL information: ALL # tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /dev/sdb1 # tgtadm --mode target --op show Target 1: iqn.2008-09.com.redhat.example:tgt1 System information: Driver: iscsi State: ready I_T nexus information: LUN information: LUN: 0 Type: controller SCSI ID: IET 00010000 SCSI SN: beaf10 Size: 0 MB Online: Yes Removable media: No Backing store type: null Backing store path: None Backing store flags: LUN: 1 Type: disk SCSI ID: IET 00010001 SCSI SN: beaf11 Size: 299877 MB Online: Yes Removable media: No Backing store type: rdwr Backing store path: /dev/sdb1 Backing store flags: Account information: ACL information: ALL This seems to work, until tgtd or the host is restarted Version-Release number of selected component (if applicable): RHEL 5.5.z latest scsi-target-utils-1.0.8-0.el5 How reproducible: always Steps to Reproduce: 1.set up tgtd as described 2. 3. Actual results: can't use LUN without manually adding in the backing store Expected results: should take settings from targets.conf and bring up both controller and block LUNs Additional info:
Where did you get the scsi-target-utils you are using, and where can I download it from? I thought 5.5.z was not 1.0.8 based. 5.6 has a 1.0.8.0 and I just made a 1.0.8-1 for 5.6.z. I tried 1.0.8.0 from 5.6 on 5.5 and it worked ok here. Are there any errors in /var/log/messages when you started tgtd? Is /etc/tgt/targets.conf there? If this is a upgrade did it get replaced (is the old targets.conf now targets.con.rpmsave), and if so what command did you run to upgrade?
# yum install scsi-target-utils Loaded plugins: rhnplugin, security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package scsi-target-utils.x86_64 0:1.0.8-0.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================= Package Arch Version Repository Size ================================================================================================================================================================================= Installing: scsi-target-utils x86_64 1.0.8-0.el5 rhel-x86_64-server-cluster-storage-5 151 k Transaction Summary ================================================================================================================================================================================= Install 1 Package(s) Upgrade 0 Package(s)
So this is nothing unconventional, 5.5 host, not even completely up to date yet
Could you attach the targets.conf you are trying to use? Also were there any error messages in /var/log/messages?
default-driver iscsi <target iqn.2008-09.com.redhat.example:tgt1> backing-store /dev/sdb1 </target> This is all I have in the file No error messages, only # cat /var/log/messages |grep tgt Jan 28 01:02:43 dot10 tgtd: iser transport register Jan 28 01:02:43 dot10 tgtd: tgtd daemon started, pid:16527 Jan 28 01:02:43 dot10 tgtd: tgtd logger started, pid:16528 debug:0 Jan 28 01:02:44 dot10 tgtd: bs_init(318) use pthread notification Jan 28 01:03:40 dot10 tgtd: iser transport register Jan 28 01:03:40 dot10 tgtd: tgtd logger stopped, pid:16528 Jan 28 01:03:40 dot10 tgtd: iser transport register Jan 28 01:09:20 dot10 tgtd: iser transport register Jan 28 01:09:20 dot10 tgtd: tgtd daemon started, pid:16624 Jan 28 01:09:20 dot10 tgtd: tgtd logger started, pid:16625 debug:0 Jan 28 01:09:21 dot10 tgtd: bs_init(318) use pthread notification Jan 28 01:34:27 dot10 tgtd: iser transport register Jan 28 01:34:27 dot10 tgtd: tgtd logger stopped, pid:16625 Jan 28 01:34:27 dot10 tgtd: iser transport register
If after you start tgtd if you run tgt-adm -s does it show the target or does it just fail? Note the different spelling from tgtadm is intentional. tgt-adm is the script that parses targets.conf.
Oh wait, can you just email me the login info for the box?
I just upgraded a server to RHEL 5.6 (scsi-target-utils-1.0.8-0.el5). The error you describe does not occur here. Maybe your Backing Device is in use (mounted, opened by some other process)? You can check for this by this procedure:: $ service tgtd forcedstop $ killall -9 tgtd # to be sure ;-) $ tgtd $ tgt-admin --conf /etc/tgt/targets.conf --execute --verbose # Using /etc/tgt/targets.conf as configuration file # Adding target: iqn.2008-09.com.redhat.example:tgt1 tgtadm -C 0 --lld iscsi --op new --mode target --tid 1 -T iqn.2008-09.com.redhat.example:tgt1 # Device /dev/sda1 is used (already tgtd target?). # Run 'lsof /dev/sda1' to see the details. # Skipping device /dev/sda1 - it is in use. # You can override it with --force or 'allow-in-use yes' config option. # Note - do so only if you know what you're doing, you may damage your data. tgtadm -C 0 --lld iscsi --op bind --mode target --tid 1 -I ALL Regards, Roland
please reopen if it's still showing up.