Date: Sat, 22 Nov 2014 13:05:49 +0800 From: =?UTF-8?B?5YWo5a6P5bmz?= <quan_hping@bjhit.com> To: trasz@FreeBSD.org Cc: freebsd-scsi@freebsd.org Subject: Re: how to use ctld export iscsi lun for Xenserver 6.2? Message-ID: <547019AD.7090101@bjhit.com> In-Reply-To: <20141121163924.GA31068@brick.home> References: <546EAC35.2070603@bjhit.com> <20141121163924.GA31068@brick.home>
next in thread | previous in thread | raw e-mail | index | archive | help
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; <?xml version="1.0" ?> <iscsi-target> <LUN> <vendor> LIO-ORG </vendor> <serial> 45f8b1af-dba3-4730-aedb-76ff8b60c407 </serial> <LUNid> 0 </LUNid> <size> 85899345920 </size> <SCSIid> 3600140545f8b1afdba34730aedb76ff8 </SCSIid> </LUN> </iscsi-target> ] 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; <?xml version="1.0" ?> <iscsi-target-iqns> <TGT> <Index> 0 </Index> <IPAddress> 172.19.22.12 </IPAddress> <TargetIQN> iqn.2014-11.local.heetian:target0 </TargetIQN> </TGT> <TGT> <Index> 1 </Index> <IPAddress> 172.19.22.12 </IPAddress> <TargetIQN> * </TargetIQN> </TGT> </iscsi-target-iqns> ] 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; <?xml version="1.0" ?> <iscsi-target> <LUN> <vendor> FREEBSD </vendor> <serial> MYSERIAL0 </serial> <LUNid> 0 </LUNid> <size> 355959750656 </size> <SCSIid> 1FREEBSD_MYDEVID_0 </SCSIid> </LUN> </iscsi-target> ] 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?547019AD.7090101>