asm磁盘分组,待完善

添加磁盘:
如果是虚拟机,要编辑vmx文件加入disk.EnableUUID =“TRUE” 否则无法查到磁盘的uuid,也就无法在配置文件中绑定。

1 uedv 
分区初始化
echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdb
echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdc
echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdd
echo -e "n\np\n1\n\n\nw" | fdisk /dev/sde
 udev映射
for i in b c d e ;
do
echo "KERNEL==\"sd?1\", SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id -g -u -d /dev/\$parent\", RESULT==\"`/usr/lib/udev/scsi_id -g -u -d /dev/sd\$i`\", SYMLINK+=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""
Done
--udevadm配置重载生效:
udevadm control --reload
udevadm trigger
或者
/sbin/udevadm trigger --type=devices --action=change
--确认udev绑定成功,已生成绑定后的设备:
ls -ltr /dev/asm-disk*

--再将/etc/udev/rules.d/99-oracle-asmdevices.rules拷贝到另一节点,并执行使其生效。
partprobe /dev/sdb
partprobe /dev/sdc
partprobe /dev/sdd
partprobe /dev/sde

echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdb
echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdc
echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdd
echo -e "n\np\n1\n\n\nw" | fdisk /dev/sde
-udevadm配置重载生效:
udevadm control --reload
udevadm trigger
确认udev已绑定成功:
ll /dev/asm*

2  asmlib分区

 yum install kmod-oracleasm

rpm -ivh oracleasmlib-2.0.12-1.el6.x86_64.rpm

rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm

 

asm磁盘分组,待完善

 

 asm磁盘分组,待完善

 

oracleasm configure -i

 asm磁盘分组,待完善

 

 

oracleasm configure

asm磁盘分组,待完善

 

 

 oracleasm init

 asm磁盘分组,待完善

 

 

asm磁盘分组,待完善

 

 

虚拟机2

注:如果已开启则重启

Root用户:

# oracleasm  configure  -I

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) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

[root@rac2 ~]# oracleasm listdisks

[root@rac2 ~]# oracleasm init

init 6

asm磁盘分组,待完善

 

上一篇:Linux磁盘挂载


下一篇:二进制密码锁