Oracle ASMlib磁盘创建

本文详细介绍如何配置Oracle ASM环境,包括设置驱动程序、初始化环境、创建和扫描ASM磁盘等步骤。通过具体命令演示了整个配置过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

配置环境信息

[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) [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/sdo: LABEL="ASMDISK1" TYPE="oracleasm" 
/dev/mapper/ASMDISK1: LABEL="ASMDISK1" TYPE="oracleasm" 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值