OCR、OLR、VF 是什么?
OCR: 保存了 RAC 的配置和注册信息;
OLR: 保存了 RAC 当前机器上 Oracle Clusterware 的配置信息;
VF: 用于网络分区时解决“脑裂”问题。
OCR 盘迁移
ASM配置
# 存储挂了3个盘过来
[root@rac1 ~]# fdisk -l
Disk /dev/mapper/mpathg: 5368 MB, 5368709120 bytes, 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/mpathh: 5368 MB, 5368709120 bytes, 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/mpathi: 5368 MB, 5368709120 bytes, 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
# 获取磁盘设备scsi_id
[root@rac1 ~]# for disk in `ls /dev/sd*`; do /usr/lib/udev/scsi_id -g -u -d $disk; echo $disk; done
1ATA_VBOX_HARDDISK_VB89af7d4b-db1d400b
/dev/sdg
1ATA_VBOX_HARDDISK_VB33102718-330fcd0a
/dev/sdh
1ATA_VBOX_HARDDISK_VBfc9afc3b-c545d13c
/dev/sdi
# 配置多路径绑定
[root@rac1 ~]# cat /etc/multipath/bindings
mpathg VBOX_HARDDISK_VB33102718-330fcd0a
mpathh VBOX_HARDDISK_VBfc9afc3b-c545d13c
mpathi VBOX_HARDDISK_VB89af7d4b-db1d400b
[root@rac1 ~]# cat /etc/multipath.conf
defaults {
user_friendly_names yes
find_multipaths no
}
multipaths {
multipath {
wwid 1ATA_VBOX_HARDDISK_VB89af7d4b-db1d400b
alias mpathg
}
multipath {
wwid 1ATA_VBOX_HARDDISK_VB33102718-330fcd0a
alias mpathh
}
multipath {
wwid 1ATA_VBOX_HARDDISK_VBfc9afc3b-c545d13c
alias mpathi
}
}
# 重启生效
[root@rac1 ~]# systemctl restart multipathd.service
[root@rac1 ~]# multipath -ll
mpathg (VBOX_HARDDISK_VB33102718-330fcd0a) dm-2 ATA ,VBOX HARDDISK
size=5.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
`- 9:0:0:0 sdh 8:112 active ready running
mpathh (VBOX_HARDDISK_VBfc9afc3b-c545d13c) dm-3 ATA ,VBOX HARDDISK
size=5.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio&