在 CentOS 5.11 上进行 yum 更新后,我遇到了无法挂载卷组上的所有卷的问题。
设备映射器从 1.02.24-1 升级到 1.02.67-2
机器从挂载为 / 的 /dev/mapper/VolGroup00-LogVol00 正确启动,但拒绝挂载 /dev/mapper/vg_data 中的所有卷
/var/log/messages 中的错误是 [...]
kernel: device-mapper: multipath: version 1.0.6 loaded
kernel: device-mapper: table: 253:2: mirror: Device lookup failure
kernel: device-mapper: ioctl: error adding target to table
kernel: device-mapper: ioctl: device doesn't appear to be in the dev hash table.
kernel: device-mapper: table: device /dev/mapper/lsi_ccfafeaadcb too small for target
kernel: device-mapper: table: 253:6: linear: dm-linear: Device lookup failed
kernel: device-mapper: ioctl: error adding target to table
kernel: device-mapper: table: 253:6: linear: dm-linear: Device lookup failed
kernel: device-mapper: ioctl: error adding target to table
[...]
启动时 lv 节点不存在,但可以使用以下命令创建
vgscan --mknodes
尝试激活 volme 组失败并显示:
[root@www ~]# vgchange -ay vg_data
Found duplicate PV WquAN3yEQuOqUhNhTbrawTqp3YoFxp32: using /dev/hdc2 not /dev/hda2
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
但让我觉得奇怪的是
[root@www ~]# pvs
Found duplicate PV WquAN3yEQuOqUhNhTbrawTqp3YoFxp32: using /dev/hdc2 not /dev/hda2
PV VG Fmt Attr PSize PFree
/dev/hdc2 VolGroup00 lvm2 a-- 74.41G 0
/dev/hdd4 vg_data lvm2 a-- 60.95G 19.95G
[root@www ~]# vgs
Found duplicate PV WquAN3yEQuOqUhNhTbrawTqp3YoFxp32: using /dev/hdc2 not /dev/hda2
VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 2 0 wz--n- 74.41G 0
vg_data 1 11 0 wz--n- 60.95G 19.95G
[root@www ~]# lvs
Found duplicate PV WquAN3yEQuOqUhNhTbrawTqp3YoFxp32: using /dev/hdc2 not /dev/hda2
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol00 VolGroup00 -wi-ao 72.47G
LogVol01 VolGroup00 -wi-ao 1.94G
lv_ftp vg_data -wi-d- 3.00G
lv_ftpAIRONE vg_data -wi-d- 5.00G
lv_ftpAZI vg_data -wi-d- 5.00G
lv_ftpBAX vg_data -wi-d- 3.00G
lv_ftpBER vg_data -wi-d- 3.00G
lv_ftpBERPCMC vg_data -wi-d- 3.00G
lv_ftpBERTEX vg_data -wi-d- 3.00G
lv_ftpPAST vg_data -wi-d- 3.00G
lv_ftpROC vg_data -wi-d- 3.00G
lv_ftpTEA vg_data -wi-d- 5.00G
lv_ftpWURTH vg_data -wi-d- 5.00G
[root@www ~]# lvscan
Found duplicate PV WquAN3yEQuOqUhNhTbrawTqp3YoFxp32: using /dev/hdc2 not /dev/hda2
ACTIVE '/dev/vg_data/lv_ftp' [3.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpTEA' [5.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpBAX' [3.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpROC' [3.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpBER' [3.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpAZI' [5.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpBERPCMC' [3.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpBERTEX' [3.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpWURTH' [5.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpAIRONE' [5.00 GB] inherit
ACTIVE '/dev/vg_data/lv_ftpPAST' [3.00 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol00' [72.47 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
和这个
[root@www ~]# dmsetup table
lsi_ccfafeaadcb: 0 240121727 linear 22:64 0
vg_data-lv_ftpBERPCMC:
vg_data-lv_ftpROC:
vg_data-lv_ftpAZI:
vg_data-lv_ftpBAX:
vg_data-lv_ftpBER:
vg_data-lv_ftpPAST:
vg_data-lv_ftpBERTEX:
vg_data-lv_ftpWURTH:
vg_data-lv_ftpTEA:
VolGroup00-LogVol01: 0 4063232 linear 22:2 151978368
lsi_ccfafeaadcbp3: 0 108004176 linear 253:2 4300128
VolGroup00-LogVol00: 0 151977984 linear 22:2 384
lsi_ccfafeaadcbp2: 0 4095504 linear 253:2 204624
lsi_ccfafeaadcbp1: 0 204561 linear 253:2 63
vg_data-lv_ftpAIRONE:
vg_data-lv_ftp:
[root@www ~]# dmsetup info vg_data-lv_ftp
Name: vg_data-lv_ftp
State: ACTIVE
Read Ahead: 256
Tables present: None
Open count: 0
Event number: 0
Major, minor: 253, 6
Number of targets: 0
UUID: LVM-Sca5tWOe0K5PirphI5mojzGxfMoA3HuJZimNY8LgZcH0afeMWrOoTE3AI1jyunJn
因此所有 vg_data 卷在 dmsetup 中都没有表。我认为所有数据都在那里,只需要重建表,但真的不知道如何重建。我已经尝试过 vgcfgrestore 但没有成功。
有人能指出我正确的方向吗?所有这些混乱都是由 yum 更新引起的吗?
谢谢
扎斯卡尔
答案1
到目前为止,有人对此有任何想法吗?为什么设备映射表中有空白条目?
[root@www ~]# dmsetup table
lsi_ccfafeaadcb: 0 240121727 linear 22:64 0
vg_data-lv_ftpBERPCMC:
vg_data-lv_ftpROC:
vg_data-lv_ftpAZI:
vg_data-lv_ftpBAX:
vg_data-lv_ftpBER:
vg_data-lv_ftpPAST:
vg_data-lv_ftpBERTEX:
vg_data-lv_ftpWURTH:
vg_data-lv_ftpTEA: