PowerPath:如何使用 Oracle ASM 設定叢集式 Oracle RAC 伺服器

Summary: PowerPath for Linux:如何在 RHEL 6.4 或更新伺服器上執行的叢集 Oracle RAC 伺服器上設定和使用 Dell PowerPath 搭配 Oracle ASM。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

Oracle 自動儲存管理 (ASM) 可確保跨真實應用集群 (RAC) 的一致設備命名。它還在重新啟動之間保持對設備的許可權。在使用 2.5 核心將 UDEV 規則添加到 Linux 之前,此功能非常重要。

ASM 的一個特點是為 ASM 標記的設備被分配了一個別名。每個磁碟都會新增到 /dev/oracleasm/disks/ 裝置目錄,並使用別名提供給 ASM ORCL:diskname

當 Linux 看到同一磁碟或 LUN 的多個路徑時,它會在 SCSI 裝置表中為每個路徑創建一個條目。因此,具有兩個路徑的單個 LUN 在 Linux 中可能會顯示為兩個路徑 /dev/sdg and /dev/sdh比如。

這對 ASM 來說是個問題,因為 ASM 無法處理兩個或多個裝置對應至相同 LUN。

和 ASM 一樣,Dell PowerPath 也會建立別名:這些是我們的虛擬裝置 (/dev/emcpowerX 其中 X 是裝置代號)。

過程
叢集中 RHEL 伺服器要解決的主要問題之一是 Dell 偽名稱必須相符。執行 powermt display dev=all 命令為貴組織設定主要和次要 IT 連絡人。
 

[ linuxodb02 scsi_host ] # powermt display dev=all
偽名稱=emcpowera
Symmetrix ID=000195123456
邏輯裝置 ID=1B79
Device WWN=60000970000195123456533031423739
state=alive; policy=SymmOpt; queued-IOs=0
==============================================================================
Host Stor I/O Path Stats
### HW Path I/O Path Interf.模式狀態 Q-IOs 錯誤
==============================================================================
1 lpfc sde FA 7e:00 active 0 0
1 lpfc sdd FA 5e:00 active 0
0 0 lpfc sdc FA 10e:00 active
0 0 0 lpfc sdb FA 12e:00 active alive 0 0 0

Pseudo name=emcpowerb
Symmetrix ID=000195123456
邏輯裝置 ID=1B8A
Device WWN=60000970000195123456533031423841
state=alive;policy=SymmOpt;queued-IOs=0

============================================================================== 主機 Stor I/O Path Stats
### HW Path I/O Path Interf。模式狀態 Q-IOs 錯誤
==============================================================================
1 lpfc sdm FA 7e:00 active 0 0
1 lpfc sdk FA 5e:00 active 0 0
0 lpfc sdi FA 10e:00 active 0 0
0 lpfc sdg FA 12e:00 active 0 0 0

(注意:為了安全性的目的,修改了陣列的 S/N)

 
如果命令在兩個主機上運行,請注意偽名稱不同。

在互聯網上找到的一篇文章建議如下:   
 

"Shutdown PowerPath on one of the clustered nodes.

$ sudo /etc/init.d/PowerPath stop

Now that PowerPath is stopped, copy PowerPath configuration files from node one to node two. Copy /etc/emcp_devicesDB.dat and /etc/emcp_devicesDB.idx to the /etc directory on the node. Once the copy is complete, start PowerPath up (sudo /etc/init.d/PowerPath start) and run the powermt display dev=all command and the pseudo names will match."
Dell 不建議使用此方法。


Dell 建議使用「emcpadm export_mappings -f <pseudo_mapping>“在一個節點上。
這樣可以節省陣列設備和偽設備之間的映射。
使用”emcpadm import_mappings -f <pseudo_mappings>“。
<> pseudo_mapping 是包含虛擬裝置和陣列裝置之間對應的檔案。

完成此步驟後,請更新 /etc/sysconfig/oracleasm。指令 ORACLEASM_SCANORDERORACLEASM_SCANEXCLUDE 必須按如下方式修改:    
 

# ORACLEASM_ENABLED:  true 表示在啟動時載入驅動程式。
ORACLEASM_ENABLED=true

# ORACLEASM_UID:擁有 /dev/oracleasm 掛接點的預設使用者。
ORACLEASM_UID=grid

# ORACLEASM_GID:擁有 /dev/oracleasm 掛載點的預設群組。
ORACLEASM_GID=oinstall

# ORACLEASM_SCANBOOT:  True 表示在引導時掃描 ASM 磁碟。
ORACLEASM_SCANBOOT=true

# ORACLEASM_SCANORDER:符合順序磁碟掃描
的模式 ORACLEASM_SCANORDER= emcpower

# ORACLEASM_SCANEXCLUDE:從掃描
中排除磁碟的相符模式 ORACLEASM_SCANEXCLUDE= SD 


現在,當 ASMLib 啟動時,它會掃描 PowerPath 虛擬裝置 (而非 SCSI 裝置) 中的 ASM 磁碟。

Affected Products

PowerPath for Linux

Products

PowerPath for Linux
Article Properties
Article Number: 000021339
Article Type: How To
Last Modified: 04 Nov 2025
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.