linux多路径相关错误解决办法 "Found duplicate PV xxx"
dcoadbpro:~ # vgs
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdb not /dev/sda
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdc not /dev/sdb
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdd not /dev/sdc
VG #PV #LV #SN Attr VSize VFree
dcoadbpro_lv 1 1 0 wz--n- 1000.00g 10.00g
vg能显示,但是报错,duplicate是重复的意思,英文好的同学应该已经才出来意思了,没错,我这里就怀疑多路径服务有问题。
一般稍微正规一些的单位,存储和主机的连接链路至少都是双链路,我这里是四链路,当多路径服务未启动或异常的时候,我们就会看到4块一模一样的PV。了解原因就好办了,解决过程如下:
dcoadbpro:~ # lvs
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdb not /dev/sda
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdc not /dev/sdb
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdd not /dev/sdc
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lvol0 dcoadbpro_lv -wi-a- 990.00g
dcoadbpro:~ # pvs
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdb not /dev/sda
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdc not /dev/sdb
Found duplicate PV VHlJIdjoxfTc7fVKPKeveE9DducX8caK: using /dev/sdd not /dev/sdc
PV VG Fmt Attr PSize PFree
/dev/sdd dcoadbpro_lv lvm2 a- 1000.00g 10.00g
dcoadbpro:~ #
dcoadbpro:~ #
dcoadbpro:~ # service multipathd start
Starting multipathd done
dcoadbpro:~ #
dcoadbpro:~ #
dcoadbpro:~ #
dcoadbpro:~ # pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/36001438007f2ed810000300000d00000 dcoadbpro_lv lvm2 a- 1000.00g 10.00g
dcoadbpro:~ # lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lvol0 dcoadbpro_lv -wi-a- 990.00g
dcoadbpro:~ # vgs
VG #PV #LV #SN Attr VSize VFree
dcoadbpro_lv 1 1 0 wz--n- 1000.00g 10.00g
dcoadbpro:~ #
dcoadbpro:~ #
dcoadbpro:~ #
dcoadbpro:~ #
dcoadbpro:~ # chkconfig multipathd on
dcoadbpro:~ # chkconfig --list | grep mul
multipathd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
这种问题其实是常规错误,作为DBA的我本来不需要了解这些东西的,这是属于存储工程师或系统工程师应该掌握的东东。 可是,如果有一天我比较不幸,跟我配合的系统工程师或存储工程师非常马虎,没有配置好多路径,就像我现在遇到的这个问题,然后我发现我的博客记录了这么一笔,应该会很开心吧,哈哈
虽然很简单,依然记录之。