服务器替换san存储

2018-01-26 19:19:32来源:cnblogs.com作者:发喜小爹人点击

分享

1、通知DBA停库;

串行登陆服务器

2、备份系统信息

mkdir -p /bakinfodf -h > /bakinfo/df.txt_`date +%Y%m%d%H%M%S`ps -ef > /bakinfo/ps.txt_`date +%Y%m%d%H%M%S`ip a > /bakinfo/ip.txt_`date +%Y%m%d%H%M%S`netstat -rn > /bakinfo/netstat.txt_`date +%Y%m%d%H%M%S`free -g > /bakinfo/free.txt_`date +%Y%m%d%H%M%S`route -n > /bakinfo/route_`date +%Y%m%d%H%M%S`

以下主要针对GI环境

multipath -ll > /bakinfo/multipath_`date +%Y%m%d%H%M%S`sysauto_SF lunuseinfo > /bakinfo/lun_`date +%Y%m%d%H%M%S`cat /etc/multipath.conf > /bakinfo/lultipath.conf_`date +%Y%m%d%H%M%S`oracleasm listdisks > /bakinfo/disk_`date +%Y%m%d%H%M%S`

若涉及到配置修改,请备份基本硬件信息

free -g > /bakinfo/free_`date +%Y%m%d%H%M%S`cat /proc/cpuinfo | grep physical | uniq -c > /bakinfo/cpucore_`date +%Y%m%d%H%M%S`

若涉及到硬盘变更,请备份基本硬盘信息

fdisk -l > /bakinfo/fdisk_`date +%Y%m%d%H%M%S`mount -v > /bakinfo/mount_`date +%Y%m%d%H%M%S`cat /proc/mounts > /bakinfo/mounts_`date +%Y%m%d%H%M%S`

3、检查crs并重启:

crsctl check crscrsctl stop crscrsctl start crs

所有主机重启完成之后,执行以下步骤:

4、登陆主节点并删掉ASM_DISK:

oracleasm deletedisk DATA_DISK001oracleasm deletedisk DATA_DISK002oracleasm deletedisk DATA_DISK003oracleasm deletedisk DATA_DISK004oracleasm deletedisk DATA_DISK005oracleasm deletedisk DATA_DISK006oracleasm deletedisk FRA_DISK001oracleasm deletedisk FRA_DISK002oracleasm deletedisk OCRVD_DISK001oracleasm deletedisk OCRVD_DISK002oracleasm deletedisk OCRVD_DISK003oracleasm scandisksoracleasm listdisks

5、串行登陆服务器:

oracleasm scandisksoracleasm listdisks

6、分别在每台上创建PV

pvcreate /dev/mapper/data_grid0001pvcreate /dev/mapper/data_grid0002pvcreate /dev/mapper/data_grid0003pvcreate /dev/mapper/data_grid0004

7、分别在每台上扩容VG

vgextend VolGroup01 /dev/mapper/data_grid0001vgextend VolGroup02 /dev/mapper/data_grid0002vgextend VolGroup03 /dev/mapper/data_grid0003vgextend VolGroup04 /dev/mapper/data_grid0004

8、分别在每台上做PV迁移

pvmove /dev/mapper/data_grid001 /dev/mapper/data_grid0001pvmove /dev/mapper/data_grid002 /dev/mapper/data_grid0002pvmove /dev/mapper/data_grid003 /dev/mapper/data_grid0003pvmove /dev/mapper/data_grid004 /dev/mapper/data_grid0004

9、分别在每台主机VG上移除旧PV

vgreduce VolGroup01 /dev/mapper/data_grid001vgreduce VolGroup02 /dev/mapper/data_grid002vgreduce VolGroup03 /dev/mapper/data_grid003vgreduce VolGroup04 /dev/mapper/data_grid004

10、分别在每台上移除之前的PV

pvremove /dev/mapper/data_grid001pvremove /dev/mapper/data_grid002pvremove /dev/mapper/data_grid003pvremove /dev/mapper/data_grid004

11、修改multipath.conf

vim /etc/multipath.conf

12、重启multipath服务

/etc/init.d/multipathd reload

13、通知DBA

微信扫一扫

第七城市微信公众平台