9

oracle asm磁盘组使用新存储替换旧存储方案 -m6米乐安卓版下载

1、存储信息确认及配置

1.1、asm磁盘组及旧存储磁盘信息说明

磁盘组名称 冗余方式 磁盘wwid及大小 asm磁盘路径
crs normal 36000c29130bc55d46b0093070ebc8221 2g 36000c29130bc55d46b0093070ebc8222 2g 36000c29130bc55d46b0093070ebc8223 2g 36000c29130bc55d46b0093070ebc8224 2g /dev/asm-ocr1 /dev/asm-ocr1 /dev/asm-ocr3 /dev/asm-ocr4
data external 36000c29130bc55d46b0093070ebc8225 500g 36000c29130bc55d46b0093070ebc8226 500g 36000c29130bc55d46b0093070ebc8227 500g 36000c29130bc55d46b0093070ebc8228 500g /dev/asm-data1 /dev/asm-data2 /dev/asm-data3 /dev/asm-data4

1.2、新存储磁盘信息说明

磁盘wwid及大小 asm路径 新增到的磁盘组
36000c123456c55d46b0093070ebc8221 2g 36000c123456c55d46b0093070ebc8222 2g 36000c123456c55d46b0093070ebc8223 2g 36000c123456c55d46b0093070ebc8224 2g /dev/asm-ocr5 /dev/asm-ocr6 /dev/asm-ocr7 /dev/asm-ocr8 crs
36000c123456c55d46b0093070ebc8225 500g 36000c123456c55d46b0093070ebc8226 500g 36000c123456c55d46b0093070ebc8227 500g 36000c123456c55d46b0093070ebc8228 500g /dev/asm-data5 /dev/asm-data6 /dev/asm-data7 /dev/asm-data8 data

1.3、确认新存储的磁盘wwid

-- 扫盘(如果存储已经分配存储盘了,但是数据库服务器上不显示)
-- 如果确定知道是host多少,指定host进行扫描,不确定的话可以全部扫描一遍
#echo "- - -">/sys/class/scsi_host/host0/scan
#echo "- - -">/sys/class/scsi_host/host1/scan
#echo "- - -">/sys/class/scsi_host/host2/scan
#echo "- - -">/sys/class/scsi_host/host3/scan
...
#echo "- - -">/sys/class/scsi_host/hostx/scan
或者使用脚本
#sh /usr/bin/rescan-scsi-bus.sh
-- 确定wwid
#lsscsi -si  --安装了lsscsi-0.27-6.el7.x86_64或其他版本的rpm包
#multipath -ll --使用了multipath作为多路径软件
#ls -l /dev/disk/by-id

2、修改multipath添加新增的磁盘

#cd /etc/ && cp multipath.conf multipath.conf.bak20220801
#vi /etc/multipath.conf
multipath {
      wwid 36000c123456c55d46b0093070ebc8221 
      alias ocr5 
      path_grouping_policy multibus
}
multipath {
      wwid 36000c123456c55d46b0093070ebc8222
      alias ocr6 
      path_grouping_policy multibus
}
multipath {
      wwid 36000c123456c55d46b0093070ebc8223
      alias ocr7
      path_grouping_policy multibus
}
multipath {
      wwid 36000c123456c55d46b0093070ebc8224
      alias ocr8
      path_grouping_policy multibus
}
multipath {
      wwid 36000c123456c55d46b0093070ebc8225
      alias data5 
      path_grouping_policy multibus
}
multipath {
      wwid 36000c123456c55d46b0093070ebc8226
      alias data6
      path_grouping_policy multibus
}
multipath {
      wwid 36000c123456c55d46b0093070ebc8227
      alias data7
      path_grouping_policy multibus
}
multipath {
      wwid 36000c123456c55d46b0093070ebc8228
      alias data8
      path_grouping_policy multibus
}
-- reload multipath
#multipath -r

3、修改udev添加新增的磁盘

#vi /etc/udev/rules.d/99-oracle-asmdevices.rules
env{dm_name}=="ocr5", owner:="grid", group:="asmadmin", mode:="660", symlink ="asm-ocr5"
env{dm_name}=="ocr6", owner:="grid", group:="asmadmin", mode:="660", symlink ="asm-ocr6"
env{dm_name}=="ocr7", owner:="grid", group:="asmadmin", mode:="660", symlink ="asm-ocr7"
env{dm_name}=="ocr8", owner:="grid", group:="asmadmin", mode:="660", symlink ="asm-ocr8"
env{dm_name}=="data5", owner:="grid", group:="asmadmin", mode:="660", symlink ="asm-data5"
env{dm_name}=="data6", owner:="grid", group:="asmadmin", mode:="660", symlink ="asm-data6"
env{dm_name}=="data7", owner:="grid", group:="asmadmin", mode:="660", symlink ="asm-data7"
env{dm_name}=="data8", owner:="grid", group:="asmadmin", mode:="660", symlink ="asm-data8"
-- 触发权限生效
#udevadm control --reload-rules
#udevadm trigger --sysname-match=dm-15
#udevadm trigger --sysname-match=dm-16
#udevadm trigger --sysname-match=dm-17
#udevadm trigger --sysname-match=dm-18
#udevadm trigger --sysname-match=dm-19
#udevadm trigger --sysname-match=dm-20
#udevadm trigger --sysname-match=dm-21
#udevadm trigger --sysname-match=dm-22
-- 检查属组及权限
#ll /dev/mapper/*
#ll /dev/dm-*|grep grid

4、确认磁盘可用性

#su - grid
$asmcmd lsdsk --candidate
$sqlplus / as sysasm<

5、备份ocr和votedisk

#/u01/app/11.2.0.4/grid/bin/ocrconfig -export /backup/20220801/ocr_20220801.exp
dd if=/dev/asm-ocr1 of=/backup/20220801/votedisk_20220801_ocr1.bak
dd if=/dev/asm-ocr2 of=/backup/20220801/votedisk_20220801_ocr2.bak
dd if=/dev/asm-ocr3 of=/backup/20220801/votedisk_20220801_ocr3.bak
dd if=/dev/asm-ocr4 of=/backup/20220801/votedisk_20220801_ocr4.bak

6、crs磁盘组替换新存储

#su - grid
$sqlplus / as sysasm<

7、data磁盘组替换新存储

#su - grid
$sqlplus / as sysasm<

8、查看磁盘组磁盘状态

– 旧存储磁盘的状态为former,新存储磁盘的状态为member

$ sqlplus / as sysasm<

9、检查集群状态及数据库状态

#su - grid
$crsctl stat res -t
#su - oracle
$sqlplus / as sysdba<
最后修改时间:2022-09-02 15:45:53
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【米乐app官网下载的版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

网站地图