|
请教一个关于openfiler(iscsi-target)的2个iscsi-initiator发起方挂载share volume之后写数据的同步问题(vmware环境)!
网络结构:
--------
|storage |
--------
| |
---------- ----------
|webserver1| |webserver2|
---------- ----------
软件介绍:
storage:
OS: Openfiler-2.2-x86(2.2.r1166-1-1)
Kernel: 2.6.19.4-0.1
Vmware: 5.5.2-build.29772
IP:192.168.3.13
webserver1,webserver2:
OS: RHEL4U2
Kernel: 2.6.9-22.EL
iscsi-initiator: iscsi-initiator-utils-4.0.3.0-2(系统自带)
Vmware:5.5.2-build.29772
IP:192.168.3.201(webserver1), 192.168.3.202(webserver2)
配置如下,当把openfiler、webserver1(2)都启动之后:
一、storage server(openfiler)配置:
1、/etc/ietd.conf文件
[root@openfiler ~]# cat /etc/ietd.conf
Target iqn.2006-01.com.openfiler:vg_data.lv_data1
Lun 0 Path=/dev/vg_data/lv_data1,Type=fileio
Target iqn.2006-01.com.openfiler:vg_data.lv_data2
Lun 0 Path=/dev/vg_data/lv_data2,Type=fileio
2、/etc/hosts文件:
[root@openfiler ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 linux40 localhost.localdomain localhost
192.168.3.202 webserver2.test.local webserver2
192.168.3.201 webserver1.test.local webserver1
192.168.3.13 openfiler.test.local openfiler test.local
3、lvdisplay输出:
[root@openfiler ~]# lvdisplay
--- Logical volume ---
LV Name /dev/vg_data/lv_data1
VG Name vg_data
LV UUID Q1GfQv-kQS0-JsxF-8aUP-GuLr-iaQZ-HxsFYu
LV Write Access read/write
LV Status available
# open 1
LV Size 320.00 MB
Current LE 10
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/vg_data/lv_data2
VG Name vg_data
LV UUID 4FI80j-2zMa-zHF0-s5vk-yoN0-ygQI-Y31Q90
LV Write Access read/write
LV Status available
# open 1
LV Size 320.00 MB
Current LE 10
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
二、Webserver1和2的配置:
1、/etc/iscsi.conf文件:
[root@webserver1 ~]# grep -v "^#" /etc/iscsi.conf
DiscoveryAddress=192.168.3.13:3260
2、/etc/hosts文件:
[root@webserver1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 linux40 localhost.localdomain localhost
192.168.3.202 webserver2.test.local webserver2
192.168.3.201 webserver1.test.local webserver1
192.168.3.13 openfiler.test.local openfiler test.local
3、/etc/fstab文件关于iscsi-initiator对iscsi-target的share-volume挂载:
[root@webserver1 ~]# cat /etc/fstab
/dev/sdc1 /media/lv_data2 ext3 defaults 0 0
/dev/sdb1 /media/lv_data1 ext3 defaults 0 0
4、iscsi-ls -l输出:
[root@webserver2 ~]# iscsi-ls -l
*******************************************************************************
SFNet iSCSI Driver Version ...4:0.1.11(12-Jan-2005)
*******************************************************************************
TARGET NAME : iqn.2006-01.com.openfiler:vg_data.lv_data2
TARGET ALIAS :
HOST ID : 1
BUS ID : 0
TARGET ID : 0
TARGET ADDRESS : 192.168.3.13:3260,1
SESSION STATUS : ESTABLISHED AT Sun Jan 27 15:57:57 CST 2008
SESSION ID : ISID 00023d000001 TSIH 200
DEVICE DETAILS:
---------------
LUN ID : 0
Vendor: Openfile Model: Virtual Model: disk Rev: 0
Type: Direct-Access ANSI SCSI revision: 04
page83 type1: 4f70656e66696c000000000002000000560c00000e000000
page80: 0a
Device: /dev/sdc
*******************************************************************************
TARGET NAME : iqn.2006-01.com.openfiler:vg_data.lv_data1
TARGET ALIAS :
HOST ID : 2
BUS ID : 0
TARGET ID : 0
TARGET ADDRESS : 192.168.3.13:3260,1
SESSION STATUS : ESTABLISHED AT Sun Jan 27 15:57:56 CST 2008
SESSION ID : ISID 00023d000001 TSIH 100
DEVICE DETAILS:
---------------
LUN ID : 0
Vendor: Openfile Model: Virtual Model: disk Rev: 0
Type: Direct-Access ANSI SCSI revision: 04
page83 type1: 4f70656e66696c000000000001000000340c00000e000000
page80: 0a
Device: /dev/sdb
*******************************************************************************
5、df和mount输出:
[root@webserver1 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 5036284 3849852 930600 81% /
none 127988 0 127988 0% /dev/shm
/dev/sdc1 317043 61690 238984 21% /media/lv_data2
/dev/sdb1 317043 60486 240188 21% /media/lv_data1
[root@webserver2 ~]# mount
/dev/sda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdc1 on /media/lv_data2 type ext3 (rw,sync)
/dev/sdb1 on /media/lv_data1 type ext3 (rw,sync)
问题:
当把openfiler、webserver1(2)都启动之后,openfiler(iscsi-target)的openfiler服务一切正常,webserver1(2)的iscsi服务也一切正常,挂载的数据都可以正常访问。
当我在webserver1上的/media/lv_data1或/media/lv_data2上创建一个new文件后,在webserver2上始终看不到,除非重新启动挂载方可。请问为什么?我看到有人说是vmware的问题,果真如此?是什么原因导致vmware无法做到同步?
mailme: ancharn at yahoo.com.cn |
|