add disk to asm on aix操作步驟及注意事項-orastar

orastar發表於2017-06-02

1、操作介紹



    記錄在AIX作業系統向ASM卷組中新增新磁碟的操作過程及注意事項。

2、環境介紹



作業系統:             AIX 5.3

資料庫版本:        Oracle 10.2.0.5 2結點RAC

叢集儲存管理軟體: ASM(自動儲存管理)

 

3、操作過程



3.1    檢視需要新增的磁碟

 

使用命令lspv檢視磁碟資訊

結點1

hdisk49         none                                None           

hdisk50         none                                None   

結點2

hdisk49         none                                None           

hdisk50         none                                None

注:如果哪個結點未列出需要新增的磁碟,使用以下命令進行從新新增

# /usr/sbin/cfgmgr

3.2    檢查磁碟對應關係(結點1 hdisk49和結點2 hdisk49可能不是同一塊物理裝置)

結點1 hdisk49

root@htdb1:/dev/# lscfg -vpsl hdisk49

  hdisk49          U789D.001.DQD4R9Y-P1-C1-T1-W50060E8005947628-L2F000000000000 

        XP Disk Array (Fibre)

        Manufacturer................HP     

        Machine Type and Model......OPEN-V         

        Part Number.................

        ROS Level and ID............36303037

        Serial Number...............50 09476

        EC Level....................

        FRU Number..................

        Device Specific.(Z0)........00000332CF000002

        Device Specific.(Z1)........0481 3J ....

        Device Specific.(Z2).........

        Device Specific.(Z3).........

        Device Specific.(Z4)..........W*

        Device Specific.(Z5)........

        Device Specific.(Z6)........

PLATFORM SPECIFIC

  Name:  disk

    Node:  disk

    Device Type:  block

 
結點1 hdisk50


root@htdb1:/dev/# lscfg -vpsl hdisk50

  hdisk50          U789D.001.DQD4R9Y-P1-C1-T1-W50060E8005947628-L30000000000000 

        XP Disk Array (Fibre)

        Manufacturer................HP     

        Machine Type and Model......OPEN-V         

        Part Number.................

        ROS Level and ID............36303037

        Serial Number...............50 09476

        EC Level....................

        FRU Number..................

        Device Specific.(Z0)........00000332CF000002

        Device Specific.(Z1)........0482 3J ....

        Device Specific.(Z2).........

        Device Specific.(Z3).........

        Device Specific.(Z4)..........W*

        Device Specific.(Z5)........

        Device Specific.(Z6)........

  PLATFORM SPECIFIC

  Name:  disk

    Node:  disk

    Device Type:  block


結點2 hdisk49


root@htdb2:/# lscfg -vl hdisk49

  hdisk49          U78A0.001.DNWK5C4-P1-C4-T2-W50060E8005947628-L2F000000000000  XP MPIO Disk XP24000 (Fibre)

  Manufacturer................HP     

        Machine Type and Model......OPEN-V         

        Part Number.................

        ROS Level and ID............36303037

        Serial Number...............50 09476

        EC Level....................

        FRU Number..................

        Device Specific.(Z0)........00000332CF000002

        Device Specific.(Z1)........0481 3J ....

        Device Specific.(Z2).........

        Device Specific.(Z3).........

        Device Specific.(Z4)..........en

        Device Specific.(Z5)........

        Device Specific.(Z6)........


 

結點2 hdisk50


root@htdb2:/# lscfg -vl hdisk50

  hdisk50          U78A0.001.DNWK5C4-P1-C4-T2-W50060E8005947628-L30000000000000  XP MPIO Disk XP24000 (Fibre)

  Manufacturer................HP     

        Machine Type and Model......OPEN-V         

        Part Number.................

        ROS Level and ID............36303037

        Serial Number...............50 09476

        EC Level....................

        FRU Number..................

        Device Specific.(Z0)........00000332CF000002

        Device Specific.(Z1)........0482 3J ....

        Device Specific.(Z2).........

        Device Specific.(Z3).........

        Device Specific.(Z4)..........en

        Device Specific.(Z5)........

        Device Specific.(Z6)........


 

 

總結

結點1 hdisk49 對應結點2 hdisk49

結點1 hdisk50 對應結點2 hdisk50

3.3    檢視磁碟主裝置號和從裝置號

結點1

root@htdb1:/dev/# ls -alF /dev/*hdisk49

brw-------    1 root     system       23, 49 Mar 22 11:03 /dev/hdisk49

crw-------    1 root     system       23, 49 Mar 22 11:03 /dev/rhdisk49

root@htdb1:/dev/# ls -alF /dev/*hdisk50

brw-------    1 root     system       23, 50 Mar 22 11:03 /dev/hdisk50

crw-------    1 root     system       23, 50 Mar 22 11:03 /dev/rhdisk50


 

結點2

root@htdb2:/dev/# ls -alF /dev/*hdisk49

brw-------    1 root     system       24, 50 Mar 21 17:19 /dev/hdisk49

crw-------    1 root     system       24, 50 Mar 21 17:19 /dev/rhdisk49

root@htdb2:/dev/# ls -alF /dev/*hdisk50

brw-------    1 root     system       24, 49 Mar 21 17:19 /dev/hdisk50

crw-------    1 root     system       24, 49 Mar 21 17:19 /dev/rhdisk50

 

/dev/rhdisk*代表字元裝置,23/24代表裝置major number(裝置型別), 49/50 代表minor numbers(具體裝置)。


 

 

3.4    建立裸裝置檔案

節點1

mknod /dev/htasm/asmdisk35 c 23,49
mknod /dev/htasm/asmdisk36 c 23,50

節點2

mknod /dev/htasm/asmdisk35 c 24,50
mknod /dev/htasm/asmdisk36 c 24,49

 

注:

In the following example, you must specify the character c to create a character raw device file.



3.5    修改磁碟屬性(2結點分別執行)

/usr/sbin/chdev -l hdisk49  -a reserve_policy=no_reserve

/usr/sbin/chdev -l hdisk50  -a reserve_policy=no_reserve


--檢查語句:  lsattr -El hdisk49

To enable simultaneous access to a disk device from multiple nodes, you must set the appropriate Object Data Manager (ODM) attribute listed in the following table to the value shown, depending on the disk type:


Disk Type

Attribute

Value

SSA or FAStT disks

reserve_lock

no

ESS, EMC, HDS, CLARiiON, or MPIO-capable disks

reserve_policy

no_reserve


3.6    修改屬主及許可權(2結點分別執行)


結點1


# chown oracle:dba /dev/htasm/asmdisk35

# chmod 660 /dev/htasm/asmdisk35

# chown oracle:dba /dev/htasm/asmdisk36

# chmod 660 /dev/htasm/asmdisk36



結點2

# chown oracle:dba /dev/htasm/asmdisk35

# chmod 660 /dev/htasm/asmdisk35

# chown oracle:dba /dev/htasm/asmdisk36

# chmod 660 /dev/htasm/asmdisk36

3.7    ASM新增磁碟:


登入asm 擴充套件磁碟組:


export ORACLE_SID=+ASM1

sqlplus / as sysdba

alter diskgroup DATADG add disk '/dev/htasm/asmdisk35';

alter diskgroup DATADG add disk '/dev/htasm/asmdisk36';


系統檢查

1、        檢視磁碟組使用情況

select group_number,name,total_mb,free_mb from v$asm_disk_stat;


2、        檢查alert日誌是否正常


4、注意事項



1、        修改磁碟組屬性(reserve_lock/reserve_policy)

2、        同一塊磁碟在不同結點,磁碟名稱可能不同

3、        操作完成後檢查ASM和資料庫例項日誌

4、        不要設定PVID



參考文件

Oracle? Database Oracle Clusterware and Oracle Real Application Clusters Installation Guide
10g Release 2 (10.2) for AIX

《Assigning a Physical Volume ID(PVID) To An Existing ASM Disk Corrupts the ASM Disk Header(Doc ID 353761.1)》

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31442014/viewspace-2140212/,如需轉載,請註明出處,否則將追究法律責任。

相關文章