利用ASMLib创建ASM磁盘实践心得

1.安装ASMLib相关包
2.配置ASMLib
3.安装GI时选择ASM磁盘

1.安装ASMLib相关包

节点2用同样的步骤安装这三个rpm软件包,不再赘述。

2.配置ASMLib

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface [grid]:
Default group to own the driver interface [asmadmin]:
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [  OK  ]
Scanning the system for Oracle ASMLib disks:
[  OK  ]

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [y]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [  OK  ]
Scanning the system for Oracle ASMLib disks: [  OK  ]

--我这里环境有7块盘,ASMLib使用的盘需要分区,每块盘整个分一个区即可:
/etc/init.d/oracleasm createdisk OCR1 /dev/sdb1
/etc/init.d/oracleasm createdisk OCR2 /dev/sdc1
/etc/init.d/oracleasm createdisk OCR3 /dev/sdd1
/etc/init.d/oracleasm createdisk DATA1 /dev/sde1
/etc/init.d/oracleasm createdisk DATA2 /dev/sdf1
/etc/init.d/oracleasm createdisk DATA3 /dev/sdg1
/etc/init.d/oracleasm createdisk FRA1 /dev/sdh1

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart primary 0-1                                             
End? 369M                                                               
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? I                                                         
(parted) p                                                               
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdh: 369MB
Sector size (logical/physical): 12B/12B
Partition Table: gpt

Number  Start  End    Size    File system  Name    Flags
 1      17.kB  369MB  369MB              primary

(parted) q                                                               
Information: You may need to update /etc/fstab.   

3.安装GI时选择ASM磁盘

diskstrings设置为ORCL:*,正常就可以看到类似下面这样的ASM盘:

猜你喜欢

转载自www.linuxidc.com/Linux/2018-05/152365.htm