openfiler iscsi 客户端连接不上。

来源:互联网 发布:股指期货数据接口 编辑:程序博客网 时间:2024/04/29 15:50


openfiler iscsi 客户端连接不上。

重新启动 iscsi_target
#/etc/init.d/iscsi-target restart
查看日志:
#tail /var/log/message
Jan 25 17:52:10 localhost kernel: iscsi_trgt: blockio_open_path(167) Can't open device /dev/xen-data/xen-data, error -16
Jan 25 17:52:10 localhost kernel: iscsi_trgt: blockio_attach(354) Error attaching Lun 0 to Target iqn.2006-01.com.openfiler:tsn.c74425d9d3b3

#fdisk -l
//fdisk 看到一排 doesn't contain a valid partition table
iscsi Disk /dev/dm-0 doesn't contain a valid partition table
iscsi Disk /dev/dm-1 doesn't contain a valid partition table
iscsi Disk /dev/dm-2 doesn't contain a valid partition table
iscsi Disk /dev/dm-3 doesn't contain a valid partition table
... dm-26
Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         650     5116702+  83  Linux
/dev/sda3             651         904     2040255   82  Linux swap / Solaris
/dev/sda4             905       19452   148986810   8e  Linux LVM

Disk /dev/dm-0: 146.8 GB, 146800640000 bytes
255 heads, 63 sectors/track, 17847 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes



解决方法: http://greg.porter.name/wiki/HowTo:Openfiler
#pvscan
PV /dev/dm-0   VG VG_XenStorage-ef48414d-76e7-cb74-a1cb-43bddd590643   lvm2 [2.86 GB / 2.86 GB free]

# vgchange -an VG_XenStorage-ef48414d-76e7-cb74-a1cb-43bddd590643
0 logical volume(s) in volume group "VG_XenStorage-ef48414d-76e7-cb74-a1cb-43bddd590643" now active

#/etc/init.d/iscsi-target restart

问题解决

#fdisk -l
看到已经没有 dm-1 dm-2 ...错误
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         650     5116702+  83  Linux
/dev/sda3             651         904     2040255   82  Linux swap / Solaris
/dev/sda4             905       19452   148986810   8e  Linux LVM

Disk /dev/dm-0: 146.8 GB, 146800640000 bytes
255 heads, 63 sectors/track, 17847 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table