2.4 使用oracleasm querydisk查询磁盘是否有效
/etc/init.d/oracleasm querydisk
[root@linuxidcrac2 rules.d]# /etc/init.d/oracleasm querydisk DATA1
Disk "DATA1" is a valid ASM disk
2.5 parted分区的示例
既然ASMLib需要使用分区过的,那就使用parted对每块LUN进行分区,示例如下:
[root@linuxidcrac1 ~]# parted /dev/sdh
GNU Parted 2.1
Using /dev/sdh
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
(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
(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.
2.6 oracleasm命令
/etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@linuxidcrac2 ~]# /etc/init.d/oracleasm
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@linuxidcrac2 ~]# /etc/init.d/oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@linuxidcrac2 ~]#
3.安装GI时选择ASM磁盘
diskstrings设置为ORCL:*,正常就可以看到类似下面这样的ASM盘: