歡迎您光臨本站 註冊首頁

redhat as 3.0 共享分區疑惑?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

redhat as 3.0 共享分區疑惑?

我已經建立好了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
《解決方案》

mount上去后,你嘗試過read/write么?
《解決方案》

原帖由 yangze_tj 於 2006-1-25 13:12 發表
我已經建立好了REHAT AS 3.0自帶的CLUSTER,運行正常,可是我發現當集群啟動后,沒有運行服務的那個NODE通過手動的方法一樣可以MOUNT上集群的共享分區,這讓我很困惑,不知道這是不是正常現象。

聽說REDHAT 自 ...
也許是 ro 吧?
《解決方案》

嘗試了,能讀和寫都可以,跟沒有SCSI reservation 的感覺一樣,不管哪個節點都可以寫進去讀出來,只不過一個節點寫過了想在另外的節點上可見需要重新MOUNT一次。
另外又一個問題產生了:啟動集群后運行服務的節點可以把共享分區UMOUNT掉,而且服務是不會轉移的。

註:我的裸設備和共享分區不在同一個物理設備上,也就是說雖然卸載了共享分區但裸分區還是能訪問的。
《解決方案》

你的共享設備是什麼?
《解決方案》

樓主的設備這麼高級. 介紹一下是什麼產品?
《解決方案》

是可以這樣的,我也碰到過。而且2邊服務都能起來的,數據嘛就毀了。
《解決方案》

我是用的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 編輯 ]
《解決方案》

在進行切換前,為了保證共享存貯數據的完整性,必須確保有故障的集群節點不會向共享存貯設備寫入數據,TurboHA 6通過自動地利用被所有標準共享存貯設備支持的SCSI Reservation的特性以確保這一點。所以我們強烈建議您使用標準的共享存貯設備。TurboHA 6 手冊中介紹了如何確定您的共享存貯設備是否支持SCSI Reservation特性。
《解決方案》

vmware做的虛擬盤也可以認為是標準共享存貯設備支持的SCSI Reservation的特性,這一點WMWARE說明的應該比較清楚.
現在問題是,出現這樣的情況是屬於BUG還是屬於我使用上的錯誤呢,此問題僅限於RH自帶的HA CLUSTER軟體,其他HA軟體目前沒有測試所以沒有考慮.

[火星人 ] redhat as 3.0 共享分區疑惑?已經有799次圍觀

http://coctec.com/docs/service/show-post-9599.html