免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: yangze_tj
打印 上一主题 下一主题

redhat as 3.0 共享分区疑惑? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-25 13:12 |显示全部楼层 |倒序浏览
我已经建立好了REHAT AS 3.0自带的CLUSTER,运行正常,可是我发现当集群启动后,没有运行服务的那个NODE通过手动的方法一样可以MOUNT上集群的共享分区,这让我很困惑,不知道这是不是正常现象。

听说REDHAT 自带的CLUTER上对于共享分区是SCSI reservation机制,但为什么其他节点一样可以手工MOUNT上共享分区呢?

SCSI reservation
The other primary approach to limiting access to shared storage is SCSI reservation. SCSI Layers 2 and 3 support a protocol that issues locks for disks. When a disk is locked, a key is issued to one machine, which has sole access to the corresponding disk. Other machines that try to access the disk receive a reservation conflict message and are denied access. If a machine is unreachable, the active members of the cluster can remove it from the cluster by breaking its reservations. The remaining members then have the opportunity to reserve the disks. SCSI reservation requires proper device and device-driver support—limiting the hardware and OS configurations that support this method

论坛徽章:
0
2 [报告]
发表于 2006-01-25 14:30 |显示全部楼层
尝试了,能读和写都可以,跟没有SCSI reservation 的感觉一样,不管哪个节点都可以写进去读出来,只不过一个节点写过了想在另外的节点上可见需要重新MOUNT一次。
另外又一个问题产生了:启动集群后运行服务的节点可以把共享分区UMOUNT掉,而且服务是不会转移的。

注:我的裸设备和共享分区不在同一个物理设备上,也就是说虽然卸载了共享分区但裸分区还是能访问的。

论坛徽章:
0
3 [报告]
发表于 2006-01-26 20:36 |显示全部楼层
我是用的VMWARE3.20做了三个虚拟硬盘:
1.安装系统
2.分成裸分区
3.做共享分区
打开共享分区SCSI Reservation 的方法依据(摘自vmware官网):
Enabling SCSI Reservation
SCSI reservation must be enabled in a virtual machine before you can share its disks. VMware recommends you set up any shared disks on the same SCSI bus, which is a different bus than the one the guest operating system uses. For example, if your guest operating system is on the scsi0 bus, you should set up disks to share on the next available bus, typically the scsi1 bus.

To enable SCSI reservation, make sure the virtual machine is powered off. Open the configuration file (.vmx) in a text editor and add the line:
scsi<x>.sharedBus = "virtual"
anywhere in the file, where <x> is the SCSI bus being shared.

For example, to enable SCSI reservation for devices on the scsi1 bus, add the following line to the virtual machine's configuration file:

scsi1.sharedBus = "virtual"

This allows the whole bus to be shared and is quicker than specifying each disk separately. However, if you do not want to share the whole bus, you can selectively enable SCSI reservation for a specific SCSI disk on the shared bus. For example, if you want to share a SCSI disk located at scsi1:1, add the following line to the configuration file:

scsi1:1.shared = "true"

You must specify the same SCSI target (that is, scsi<x>:1) in the configuration file for each virtual machine that is going to share the disk.

If SCSI reservation is enabled for the whole bus (that is, scsi1.sharedBus is set to "virtual"), then this setting is ignored.

In addition to enabling SCSI reservation on the bus, you need to allow virtual machines to access the shared disk concurrently. Add the following line to the virtual machine's configuration file:

disk.locking = "false"

This prevents the locking of that disk, which permits multiple virtual machines to access a disk concurrently. Be careful though: if any virtual machine not configured for SCSI reservation tries to access this disk concurrently, then the shared disk is vulnerable to corruption or data loss.

Caution: This setting applies to all disks in the virtual machine.

When SCSI reservation is enabled, the system creates a reservation lock file that contains the shared state of the reservation for the given disk. The name of this file consists of the filename of the SCSI disk appended with .RESLCK.

For example, if the disk scsi1:0.filename is defined in the configuration file as

scsi1:0.fileName = "/<path_to_config>/vmSCSI.vmdk"

then the reservation lock file for this disk has the default name

/<path_to_config>/vmSCSI.vmdk.RESLCK

You can provide your own lock filename. Add a definition for scsi1:0.reslckname to the configuration file. For example, if you add

scsi1:0.reslckname = "/tmp/scsi1-0.reslock"

to the configuration file, this name overrides the default lock filename.

Caution: Use the same lock filename (for example, "/tmp/scsi1-0.reslock") for each virtual machine in the cluster. You must also use the same SCSI target for each virtual machine when you define scsi1:0.reslckname. However, the SCSI bus (scsi1 in this case) does not need to be the same.

Once SCSI reservation is enabled for a disk — that is, the scsi<x>.sharedBus = "virtual" and disk.locking = "false" settings are added to the configuration file for each virtual machine wanting to share this disk — you need to point each virtual machine to this disk.

[ 本帖最后由 yangze_tj 于 2006-1-26 20:43 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2006-01-26 21:58 |显示全部楼层
vmware做的虚拟盘也可以认为是标准共享存贮设备支持的SCSI Reservation的特性,这一点WMWARE说明的应该比较清楚.
现在问题是,出现这样的情况是属于BUG还是属于我使用上的错误呢,此问题仅限于RH自带的HA CLUSTER软件,其他HA软件目前没有测试所以没有考虑.

论坛徽章:
0
5 [报告]
发表于 2006-01-27 20:25 |显示全部楼层
我一定会去试的,不过现在放假了,进不了公司,一上班马上测试。
不过我觉得是我看VMWARE的文档没看全还是,他根本就没写?斑竹大人是如果获得更多的信息的?介绍个方法

论坛徽章:
0
6 [报告]
发表于 2006-01-28 16:26 |显示全部楼层
我已经看过斑竹的帖子,不过我的意思是说斑竹如何得到这么详细的设置方法的,总不能也是copy paste吧?我不知道这算不算钻牛角尖

论坛徽章:
0
7 [报告]
发表于 2006-02-07 18:31 |显示全部楼层
我已经做过测试了,结果还是一样,按照斑竹设置VMWARE中共享分区的方法设置,结果还是相同的,同样能MOUNT和UMOUNT,不知道这个情况在真实设备的情况下是否会发生,有没有做过的同学进来讨论下。。。。

论坛徽章:
0
8 [报告]
发表于 2006-02-13 18:10 |显示全部楼层
我还是不死心,有人知道吗???我顶

论坛徽章:
0
9 [报告]
发表于 2006-02-15 14:30 |显示全部楼层
原帖由 q1208c 于 2006-2-13 18:20 发表


报一下你 OS 版本和 RHCS 的版本.

另外, 看一下 RedHat 的 官方补丁里有没有这些东东.

OS版本: RedHat Enterprise Linux AS3.0   
              kernel:2.4.21-27.EL
RHCS版本:clumanager-1.2.3-1.src.rpm
                  comps-3rhcs-0.20031006.src.rpm
                  ipvsadm-1.21-9.ipvs108.src.rpm
                  piranha-0.7.6-1.src.rpm
                  redhat-config-cluster-1.0.0-5.src.rpm
                  rh-cs-en-3-1.src.rpm
我在rhn里找过了,啥也没有了,关于HA CLUSTER的补丁好象没有发行过

论坛徽章:
0
10 [报告]
发表于 2006-02-15 14:40 |显示全部楼层
原帖由 ljhb 于 2006-2-13 21:49 发表
ft,做HA应该保证数据盘同一时刻只有一个服务器mount上,vmware的share disk 用作数据分区的话,这点就足够了。你要两边都能看到,没有意义,一来需要应用自身的逻辑来考虑并发;二来效率也会受到影响。如果你需要 ...

这位兄弟的话很对,但可能没看清我的问题是什么,我就是想只保证在在同一时刻只有一个服务器MOUNT上,但是现在我用vmware的share disk 用作数据分区出现了两个服务器都可以手动MOUNT上的怪现象(可能会带来不良后果),而且把正在运行服务(HTTPD服务)的服务器“RESOURCE DISK”    UMount掉,服务也不会转移.我不知道怎么解决,到底是VMWARE的问题,还是CLUSTER本身的问题?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP