CentOS外接硬盘传输资料收,没有卸载硬盘就拔出,那么就可能会出现下边的错误提示:

[root@web1 /]# pvs
/dev/Volbak/lv_root: read failed after 0 of 4096 at 0: Input/output error
/dev/Volbak/lv_root: read failed after 0 of 4096 at 53687025664: Input/output error
/dev/Volbak/lv_root: read failed after 0 of 4096 at 53687083008: Input/output error
/dev/Volbak/lv_root: read failed after 0 of 4096 at 4096: Input/output error
/dev/Volbak/lv_home: read failed after 0 of 4096 at 0: Input/output error
/dev/Volbak/lv_home: read failed after 0 of 4096 at 439734960128: Input/output error
/dev/Volbak/lv_home: read failed after 0 of 4096 at 439735017472: Input/output error
/dev/Volbak/lv_home: read failed after 0 of 4096 at 4096: Input/output error
/dev/Volbak/lv_swap: read failed after 0 of 4096 at 0: Input/output error
/dev/Volbak/lv_swap: read failed after 0 of 4096 at 6157172736: Input/output error
/dev/Volbak/lv_swap: read failed after 0 of 4096 at 6157230080: Input/output error
/dev/Volbak/lv_swap: read failed after 0 of 4096 at 4096: Input/output error
PV         VG       Fmt  Attr PSize   PFree
/dev/sda2  VolGroup lvm2 a--u 931.02g    0 

这时候需要用 dmsetup remove [--force] <device> 来强制删除

dmsetup remove --force /dev/Volbak/lv_root
dmsetup remove --force /dev/Volbak/lv_home
dmsetup remove --force /dev/Volbak/lv_swap

再次运行pvs查看就正常了

[root@web1 /]# pvs
PV         VG       Fmt  Attr PSize   PFree
/dev/sda2  VolGroup lvm2 a--u 931.02g    0 

« 返回