Re: 0.9.11 released

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

 



Here's what I did:

- pulled latest git version
- added your patch
- replaced tgt-admin with the latest from Tomasz
- compiled and installed.

Made sure the proper /etc/tgt/targets.conf was setup.
Started tgt (service iscsi-target start) logged in with open-iscsi, and checked with tgt-admin -s:

Target 1: iqn.2008-09.com.example:server.tape
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
        I_T nexus: 1
            Initiator: iqn.1994-05.com.fedora:d2b0d1c11efb
            Connection: 0
                IP Address: 127.0.0.1
    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: tape
            SCSI ID: HP LTO3 ULTRIUM
            SCSI SN: HUM1A00001
            Size: 0 MB
            Online: Yes
            Removable media: Yes
            Backing store type: ssc
            Backing store path: /root/btapes/notape1
        LUN: 2
            Type: tape
            SCSI ID: HP LTO3 ULTRIUM
            SCSI SN: HUM1A00002
            Size: 0 MB
            Online: Yes
            Removable media: Yes
            Backing store type: ssc
            Backing store path: /root/btapes/notape2
        LUN: 3
            Type: tape
            SCSI ID: HP LTO3 ULTRIUM
            SCSI SN: HUM1A00003
            Size: 0 MB
            Online: Yes
            Removable media: Yes
            Backing store type: ssc
            Backing store path: /root/btapes/notape3
        LUN: 4
            Type: changer
            SCSI ID: IET     00010004
            SCSI SN: 123:456:789:000
            Size: 0 MB
            Online: Yes
            Removable media: Yes
            Backing store type: rdwr
            Backing store path: /root/smc
    Account information:
    ACL information:
        ALL
[root@orange tgt]# lsscsi
[0:0:0:0]    disk    ATA      TOSHIBA MK6026GA PA20  /dev/sda
[1:0:0:0]    cd/dvd  MATSHITA DVD-RAM UJ-841S  1.20  /dev/sr0
[2:0:0:0]    storage IET      Controller       0001  -
[2:0:0:1]    tape    HP       LTO3 ULTRIUM     0001  /dev/st0
[2:0:0:2]    tape    HP       LTO3 ULTRIUM     0001  /dev/st1
[2:0:0:3]    tape    HP       LTO3 ULTRIUM     0001  /dev/st2
[2:0:0:4]    mediumx STK      L700             0001  /dev/sch0

All ok. Checked one tape drive:


lsscsi:

[root@orange tgt]# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

Also ok.

Now I used mtx -f /dev/changer status.

Result, same as seen previously, one tgtd dies off, iscsi tries to login again and again.

What do you want me to check more?

Albert


On 11/25/2009 02:00 AM, FUJITA Tomonori wrote:
I've not followed this. You said that tgtd works if you configure by
hand but it doesn't if you use targets.conf, right? If so, please find
out how commands to set up targets are different.

Anyway, your log (2009/10/28) says that the medium changer driver
crashes during READ_ELEMENT_STATUS due to some memory issue. Looks
like smc doesn't check memory overwrite. Can you try this?

diff --git a/usr/smc.c b/usr/smc.c
index 6430882..e7f0177 100644
--- a/usr/smc.c
+++ b/usr/smc.c
@@ -304,7 +304,7 @@ static int smc_read_element_status(int host_no, struct scsi_cmd *cmd)
  		}
  	}

-	data = zalloc(alloc_len);
+	data = zalloc(alloc_len * 16);
  	if (!data) {
  		dprintf("Can't allocate enough memory for cmd\n");
  		key = HARDWARE_ERROR;
@@ -369,6 +369,7 @@ static int smc_read_element_status(int host_no, struct scsi_cmd *cmd)

  	/* Lastly, fill in data header */
  	len = element_status_data_hdr(data, dvcid, voltag, first, count);
+	eprintf("%d %d %d\n", alloc_len, len, count);
  	memcpy(scsi_get_in_buffer(cmd), data, min(len, alloc_len));
  	scsi_set_in_resid_by_actual(cmd, len);
  	free(data);

--
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