From owner-freebsd-scsi@FreeBSD.ORG Sat Nov 22 05:12:21 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C93A1F2; Sat, 22 Nov 2014 05:12:21 +0000 (UTC) Received: from m53-178.qiye.163.com (m53-178.qiye.163.com [123.58.178.53]) by mx1.freebsd.org (Postfix) with ESMTP id 83CC3B6; Sat, 22 Nov 2014 05:12:05 +0000 (UTC) Received: from [10.110.6.151] (unknown [58.20.74.208]) by m53-178.qiye.163.com (HMail) with ESMTPSA id 07DE013A811A; Sat, 22 Nov 2014 13:05:48 +0800 (CST) Message-ID: <547019AD.7090101@bjhit.com> Date: Sat, 22 Nov 2014 13:05:49 +0800 From: =?UTF-8?B?5YWo5a6P5bmz?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: trasz@FreeBSD.org Subject: Re: how to use ctld export iscsi lun for Xenserver 6.2? References: <546EAC35.2070603@bjhit.com> <20141121163924.GA31068@brick.home> In-Reply-To: <20141121163924.GA31068@brick.home> X-HM-Spam-Status: e1koWUFPN1dZCBgUCR5ZQUpIVU9LQkJCQkNPTE9KSUpKV1kJDhceCFlBWS grPSQrOigoJDI1JDM#Oj8#KUFLVUtANiMkIj4oJDI1JDM#Oj8#KUFLVUtAKy8pJCI#KCQyNSQzPj o*PilBS1VLQDg0LjUvKSIkODVBS1VLQCk#PDI0NSQ6KDI6QUtVS0ArKTQtMjU4PiQzLjU6NUFLVU tAPyI1OjYyOCQyKyQ1NCQyNSQzPjo*PilBS1VLQCk#OjckMiskMjUkKTk3JDI1JDM#Oj8#KUFKSV VLQDYuNy8yJCk4Ky8kKDI2Mjc6KSQyNSQzPjo*PilBTlVLQDIrJEokNjI1Li8#JDg1LyRLJEpLQU tVS0AyKyROJDYyNS4vPiQ4NS8kSyRKS0FLVUtAMiskSiQzNC4pJDg1LyRLJEpLS0FLVUtAMiskLz Q*OiIkODUvJEskSktLQUtVS0AyKyRISyQ2MjUuLz4kODUvJEskTktBS1VLQD01JDY6IiRPSkIkMz cxJEokS0NLSEtPQUtVSEhAPSskKT4kPSwkMzcxJEtDS0hLTUFWTFVOQCguOSQ#QUpVTk5APTUkKC 45JD41LDQpPygkMzcxJEpLS0lLSkFLVUlDQD01JD0pPj4kMzcxJEtMS05LT0FKVUxOWQY+ X-HM-Sender-Digest: e1kSHx4VD1lBWUc6Ni46Fxw*Pzo5PC1MLFExNz9DHzIKFDxVSlVKT0pN TUhJTE9CTkNMVTMWGhIXVQoOGhUkEwsSFRw7GRETEg9VGBQWRVlXWQweGVlBHRoXCB5XWQgBWUFJ S01PTkw3V1kSC1lBWU5DVUlLVUxPVUlLQ1kG X-HM-Tid: 0a49d5e44c42649907de013a811a Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2014 05:12:21 -0000 Thanks! On 2014/11/22 0:39, Edward Tomasz Napierała wrote: > On 1121T1106, 全宏平 wrote: >> Hi,everybody! >> I'm new to freebsd,I'm first use maillist.I'm Chinese,so English is not >> my mother language. >> Recently I know Freebsd native support ISCSI by ctld.I use samsung 840 >> evo SSD disk for ISCSI lun. >> *My partition schema is GPT,like below:* >> root@freebsd10ssd:~ # gpart show ada0 >> => 34 1953525101 ada0 GPT (932G) >> 34 128 1 freebsd-boot (64K) >> 162 209715072 2 freebsd-ufs (100G) >> 209715234 104857600 3 freebsd-ufs (50G) >> 314572834 6 - free - (3.0K) >> 314572840 524288000 4 freebsd-ufs (250G) >> 838860840 419430400 5 freebsd-zfs (200G) >> 1258291240 695233888 6 freebsd-ufs (332G) >> 1953525128 7 - free - (3.5K) >> *My ctl.conf file like this:* >> root@freebsd10ssd:~ # cat /etc/ctl.conf >> #auth-group ag0 { >> # chap username1 secretsecret >> # chap username2 anothersecret >> #} >> portal-group san { >> discovery-auth-group no-authentication >> listen 172.19.22.12 >> } >> >> target iqn.2014-11.local.heetian:target0 { >> auth-group no-authentication >> # auth-group ag0 >> portal-group san >> lun 0 { >> path /dev/ada0p6 >> blocksize 4K >> # size 100G >> } >> } >> >> From Xencenter add new-sr "Software iSCSI" sucessful. >> xenserver-create-iscsi-sr >> When I test create virtual disk,error displaying: > xenserver-create-vhd-failure > What exactly is the error? > >> From Xenserver console,use lvs command I find the vhd created. > xenserver-from-cli-view-vhd > Does it work correctly? > > I have paste some picture in mail,you can't see any more attachment? *SOS,My question is how to use ctld export iscsi lun for Xenserver?* PS:I use Ubuntu 1404+LIO SCSI target as SAN,the Xenserver can create vhd file file. My Freebsd version 10.1,Xenserver version 6.2.0 Below are Xenserver log(partial) /var/log/messages. Nov 21 13:43:28 xs15-13 xapi: [ warn|xs15-13|3179 INET 0.0.0.0:80|event.from D:8e88774a5546|xapi] get_since_for_events: no in_memory_cache! Nov 21 13:43:29 xs15-13 vhd-util: libvhd::vhd_write: /dev/VG_XenStorage-355a9c22-7900-2817-9401-aa4f3d08332d/VHD-f8d1a6f3-1631-4d2f-90c8-6bc34cc7d1bd: write of 131072 returned 0, errno: -22 Nov 21 13:43:29 xs15-13 vhd-util: libvhd::vhd_write_batmap: /dev/VG_XenStorage-355a9c22-7900-2817-9401-aa4f3d08332d/VHD-f8d1a6f3-1631-4d2f-90c8-6bc34cc7d1bd: failed writing batmap: -22 Nov 21 13:43:29 xs15-13 vhd-util: libvhd::vhd_write: /dev/VG_XenStorage-355a9c22-7900-2817-9401-aa4f3d08332d/VHD-f8d1a6f3-1631-4d2f-90c8-6bc34cc7d1bd: write of 4194304 returned 0, errno: -22 Nov 21 13:43:29 xs15-13 xapi: [ info|xs15-13|3181 INET 0.0.0.0:80|sm_exec D:055c0a76e739|xapi] Session.destroy trackid=5ca5ee9f62c1adee62e1349086e046ea Nov 21 13:43:29 xs15-13 xapi: [error|xs15-13|3181 INET 0.0.0.0:80|VDI.create R:84e319df2581|storage_access] Re-raising as SR_BACKEND_FAILURE_78 [ ; VDI Creation failed [opterr=Command ['/usr/bin/vhd-util', 'create', '--debug', '-n', '/dev/VG_XenStorage-355a9c22-7900-2817-9401-aa4f3d08332d/VHD-f8d1a6f3-1631-4d2f-90c8-6bc34cc7d1bd', '-s', '8192', '-S', '2097152'] failed (22): ]; ] Nov 21 13:43:29 xs15-13 xapi: [ warn|xs15-13|3179 INET 0.0.0.0:80|event.from D:8e88774a5546|xapi] get_since_for_events: no in_memory_cache! Nov 21 09:41:25 xs15-13 xapi: [ info|xs15-13|3366|Async.SR.create R:46f2a30b95d2|storage_access] SR 9386f78a-505d-ecba-f1f0-ecf6825af7f0 will be implemented by /services/SM/lvmoiscsi in VM OpaqueRef:4d9efad7-2f79-a40b-0493-3320dcadc656 Nov 21 09:41:26 xs15-13 kernel: [70794.299478] scsi8 : iSCSI Initiator over TCP/IP Nov 21 09:41:27 xs15-13 iscsid: connection3:0 is operational now Nov 21 09:41:32 xs15-13 xapi: [error|xs15-13|3366|Async.SR.create R:46f2a30b95d2|storage_access] Re-raising as SR_BACKEND_FAILURE_107 [ ; The SCSIid parameter is missing or incorrect; LIO-ORG 45f8b1af-dba3-4730-aedb-76ff8b60c407 0 85899345920 3600140545f8b1afdba34730aedb76ff8 ] Nov 21 09:41:49 xs15-13 kernel: [70817.669446] scsi9 : iSCSI Initiator over TCP/IP Nov 21 09:41:50 xs15-13 iscsid: connection4:0 is operational now Nov 21 09:42:12 xs15-13 xapi: [ info|xs15-13|3181 INET 0.0.0.0:80|SR.create R:90cd22c16884|storage_access] SR 7fdb950b-7572-038d-9a75-3d2dcd5b88fd will be implemented by /services/SM/lvmoiscsi in VM OpaqueRef:4d9efad7-2f79-a40b-0493-3320dcadc656 Nov 21 09:42:13 xs15-13 kernel: [70841.549700] scsi10 : iSCSI Initiator over TCP/IP Nov 21 09:42:14 xs15-13 iscsid: connection5:0 is operational now Nov 21 09:42:20 xs15-13 xapi: [ info|xs15-13|3429 UNIX /var/xapi/xapi|PBD.plug R:3f02278f6c44|storage_access] SR 7fdb950b-7572-038d-9a75-3d2dcd5b88fd will be implemented by /services/SM/lvmoiscsi in VM OpaqueRef:4d9efad7-2f79-a40b-0493-3320dcadc656 Nov 21 09:42:20 xs15-13 xapi: [ info|xs15-13|3429 UNIX /var/xapi/xapi|PBD.plug R:3f02278f6c44|storage_impl] SR.attach dbg:OpaqueRef:3f02278f-6c44-3371-4b15-4182b0e56f04 sr:7fdb950b-7572-038d-9a75-3d2dcd5b88fd device_config:[port:3260; SCSIid:3600140545f8b1afdba34730aedb76ff8; target:172.19.22.16; targetIQN:iqn.2003-01.org.linux-iscsi.ubuntu-22-16.x8664:sn.3434f50e44e2] Nov 21 09:42:21 xs15-13 kernel: [70849.179546] scsi11 : iSCSI Initiator over TCP/IP Nov 21 09:42:21 xs15-13 iscsid: connection6:0 is operational now Nov 21 09:42:26 xs15-13 xapi: [ info|xs15-13|3429 UNIX /var/xapi/xapi|PBD.plug R:3f02278f6c44|xapi] Not registering SM plugin lvmoiscsi (version 1.0 < 2.0) Nov 21 09:43:25 xs15-13 xapi: [ info|xs15-13|3515|Async.SR.create R:23f0b2cdc897|storage_access] SR 2b5dec7c-a1a8-b835-25e9-9e408dec1db0 will be implemented by /services/SM/lvmoiscsi in VM OpaqueRef:4d9efad7-2f79-a40b-0493-3320dcadc656 Nov 21 09:43:25 xs15-13 xapi: [error|xs15-13|3515|Async.SR.create R:23f0b2cdc897|storage_access] Re-raising as SR_BACKEND_FAILURE_96 [ ; The request is missing or has an incorrect target IQN parameter; 0 172.19.22.12 iqn.2014-11.local.heetian:target0 1 172.19.22.12 * ] Nov 21 09:43:28 xs15-13 xapi: [ info|xs15-13|3525|Async.SR.create R:18b51f1c1efc|storage_access] SR 08331dd9-af8f-e62a-ebd4-d5d5ab8f3927 will be implemented by /services/SM/lvmoiscsi in VM OpaqueRef:4d9efad7-2f79-a40b-0493-3320dcadc656 Nov 21 09:43:29 xs15-13 kernel: [70917.219510] scsi12 : iSCSI Initiator over TCP/IP Nov 21 09:43:30 xs15-13 iscsid: connection7:0 is operational now Nov 21 09:43:35 xs15-13 xapi: [error|xs15-13|3525|Async.SR.create R:18b51f1c1efc|storage_access] Re-raising as SR_BACKEND_FAILURE_107 [ ; The SCSIid parameter is missing or incorrect; FREEBSD MYSERIAL0 0 355959750656 1FREEBSD_MYDEVID_0 ] Nov 21 09:43:37 xs15-13 kernel: [70926.039512] scsi13 : iSCSI Initiator over TCP/IP Nov 21 09:43:38 xs15-13 iscsid: connection8:0 is operational now Nov 21 09:43:56 xs15-13 xapi: [ info|xs15-13|3181 INET 0.0.0.0:80|SR.create R:04af809aa981|storage_access] SR 54d4dd14-0b89-768f-6d94-e9f20b3c0ae6 will be implemented by /services/SM/lvmoiscsi in VM OpaqueRef:4d9efad7-2f79-a40b-0493-3320dcadc656 Nov 21 09:43:57 xs15-13 kernel: [70945.639711] scsi14 : iSCSI Initiator over TCP/IP Nov 21 09:43:58 xs15-13 iscsid: connection9:0 is operational now Nov 21 09:44:04 xs15-13 xapi: [ info|xs15-13|3589 UNIX /var/xapi/xapi|PBD.plug R:24eeb0253bb2|storage_access] SR 54d4dd14-0b89-768f-6d94-e9f20b3c0ae6 will be implemented by /services/SM/lvmoiscsi in VM OpaqueRef:4d9efad7-2f79-a40b-0493-3320dcadc656 Nov 21 09:44:05 xs15-13 kernel: [70953.279502] scsi15 : iSCSI Initiator over TCP/IP Nov 21 09:44:05 xs15-13 iscsid: connection10:0 is operational now Nov 21 09:44:11 xs15-13 xapi: [ info|xs15-13|3589 UNIX /var/xapi/xapi|PBD.plug R:24eeb0253bb2|xapi] Not registering SM plugin lvmoiscsi (version 1.0 < 2.0) Nov 21 09:45:01 xs15-13 xapi: [ info|xs15-13|3669|Async.PBD.unplug R:98cbed3238a4|xapi] Not unregistering SM plugin lvmoiscsi (version 1.0 < 2.0)