您的位置:首页 > 数据库 > Oracle

Oracle ASMlib磁盘创建

2017-05-26 10:36 274 查看
配置环境信息

[root@node1]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASMlibrary
driver.  The followingquestions 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 []: oinstall
Start Oracle ASM library driver on boot (y/n)
: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done


环境初始化

[root@node1]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm


共享磁盘分区

[root@node1 ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGIor OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, theprevious
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will becorrected by w(rite)
Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-652, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-652, default 652):
Using default value 652
Command (m for help): p
...
Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


创建ASM磁盘

[root@node1 ~]# oracleasm createdisk asmdata1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@node1  ~]# oracleasm createdisk asmdata2 /dev/sdc1
Writing disk header: done
Instantiating disk: done


扫描磁盘

[root@node1 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...


查看磁盘

[root@node1 ~]# oracleasm listdisks


查看对应关系

[root@node1 init.d]# ./oracleasm querydisk -v -p ASMDISK1
Disk "ASMDISK1" is a valid ASM disk
/dev/sdc: LABEL="ASMDISK1" TYPE="oracleasm"
/dev/
a0d8
sdo: LABEL="ASMDISK1" TYPE="oracleasm"
/dev/mapper/ASMDISK1: LABEL="ASMDISK1" TYPE="oracleasm"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle