免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 5587 | 回复: 24
打印 上一主题 下一主题

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 13:25 |只看该作者
mount上去后,你尝试过read/write么?

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
3 [报告]
发表于 2006-01-25 13:53 |只看该作者
原帖由 yangze_tj 于 2006-1-25 13:12 发表
我已经建立好了REHAT AS 3.0自带的CLUSTER,运行正常,可是我发现当集群启动后,没有运行服务的那个NODE通过手动的方法一样可以MOUNT上集群的共享分区,这让我很困惑,不知道这是不是正常现象。

听说REDHAT 自 ...

也许是 ro 吧?

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

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

论坛徽章:
0
5 [报告]
发表于 2006-01-26 14:49 |只看该作者
你的共享设备是什么?

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
6 [报告]
发表于 2006-01-26 18:35 |只看该作者
楼主的设备这么高级. 介绍一下是什么产品?

论坛徽章:
0
7 [报告]
发表于 2006-01-26 19:59 |只看该作者
是可以这样的,我也碰到过。而且2边服务都能起来的,数据嘛就毁了。

论坛徽章:
0
8 [报告]
发表于 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
9 [报告]
发表于 2006-01-26 20:47 |只看该作者
在进行切换前,为了保证共享存贮数据的完整性,必须确保有故障的集群节点不会向共享存贮设备写入数据,TurboHA 6通过自动地利用被所有标准共享存贮设备支持的SCSI Reservation的特性以确保这一点。所以我们强烈建议您使用标准的共享存贮设备。TurboHA 6 手册中介绍了如何确定您的共享存贮设备是否支持SCSI Reservation特性。

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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP