1、删除之前xxx存储,pv删除之后,如何完全移除该磁盘?
rm–rf
/dev/mapper/mpathd与/dev/mapper/mpathe
两台都要删除。
然后xxx unpresent
2、加盘(识别硬盘)3par:
fdisk -l
ls /sys/class/scsi_host/ | while read host ; do echo "- - -"
> /sys/class/scsi_host/$host/scan ; done
两台都做。
3、多路径配置:
multipath -v3
multipath -ll
vi/etc/multipath.conf(添加别名)
multipath -r(重新装载)
两台都做。
4、创建PV
现有lv:
/dev/vg_xxx01/lv_ora_home
/dev/vg_xxx01/lv_ora_oraarch
/dev/vg_xxx01/lv_ora_data01
/dev/vg_xxx01/lv_ora_data02
因此要建立4个PV,分别对以上4个lv做mirror
pvcreate /dev/mapper/xxx****1
pvcreate /dev/mapper/xxx****2
pvcreate /dev/mapper/xxx****3
pvcreate /dev/mapper/xxx****4
5、扩展VG
vgscan
pvscan
vgextend vg_ctora01 /dev/mapper/xxx****1 /dev/mapper/xxx****2
/dev/mapper/xxx****3 /dev/mapper/xxx****4
6、查看mirror分布
lvs -a -o +devices
7、分别对现有lv做mirror:
lvconvert -m1 --mirrorlog core /dev/vg_ctora01/lv_ora_home
/dev/mapper/ctora****1
(原lv:/dev/vg_ctora01/lv_ora_home,新加入的镜像盘:/dev/mapper/ctora****1
)
(-m1:新加mirror,-m0:删除mirror,--mirrorlog core:log写到内存,否则会占用系统disk来写log。)
若不加参数--mirrorlog core