I have now managed to fix the problem. I ran vgcfgbackup, then made a copy of the backup for safety purposes. I than hand edited the original backup to remove the missing pv (pv4), the root lv and the pvmove0 lv. I then than vgcfgrestore. Everything is working.
There must be a better way of doing this. Hand editing cfg files is not safe or sensible. What have I missed?
Roger
On 28 June 2022 07:38:48 Roger James <roger@xxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,I am struggling to recover from a failed pvmove. Unfortunately I only have a limited knowledge of lvm. I setup my lvm configuration many years ago.I was trying to move a lv to a SSD using pvmove. Unfortunately my brand new SSD choose that moment to fail (never buy cheap SSDs, lesson learnt!").This is the current status.roger@dragon:~$ sudo pvsWARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: VG wd is missing PV uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ (last written to [unknown]).PV VG Fmt Attr PSize PFree/dev/sda1 wd lvm2 a-- <465.76g 0/dev/sdb1 wd lvm2 a-- <465.76g <80.45g/dev/sdc2 wd lvm2 a-- 778.74g 278.74g/dev/sdd1 wd lvm2 a-- <465.76g 0[unknown] wd lvm2 a-m <784.49g 685.66groger@dragon:~$ sudo lvsWARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: VG wd is missing PV uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ (last written to [unknown]).LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Converthome wd -wi------- 1.46troot wd -wI-----p- <108.83gswap wd -wi------- 8.00gwork wd -wi------- 200.00groger@dragon:~$ sudo vgsWARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: VG wd is missing PV uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ (last written to [unknown]).VG #PV #LV #SN Attr VSize VFreewd 5 4 0 wz-pn- 2.89t 1.02tThis is a recap of what I have tried so far.roger@dragon:~$ sudo pvmove --abortWARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: VG wd is missing PV uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ (last written to [unknown]).LVM command executed by lvmpolld failed.For more information see lvmpolld messages in syslog or lvmpolld log file.roger@dragon:~$ sudo vgreduce --removemissing wdWARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: VG wd is missing PV uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ (last written to [unknown]).WARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: Partial LV root needs to be repaired or removed.WARNING: Partial LV pvmove0 needs to be repaired or removed.There are still partial LVs in VG wd.To remove them unconditionally use: vgreduce --removemissing --force.To remove them unconditionally from mirror LVs use: vgreduce --removemissing --mirrorsonly --force.WARNING: Proceeding to remove empty missing PVs.WARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.roger@dragon:~$ sudo lvchange -an wd/rootWARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: VG wd is missing PV uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ (last written to [unknown]).roger@dragon:~$ sudo vgreduce --removemissing wdWARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: VG wd is missing PV uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ (last written to [unknown]).WARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: Partial LV root needs to be repaired or removed.WARNING: Partial LV pvmove0 needs to be repaired or removed.There are still partial LVs in VG wd.To remove them unconditionally use: vgreduce --removemissing --force.To remove them unconditionally from mirror LVs use: vgreduce --removemissing --mirrorsonly --force.WARNING: Proceeding to remove empty missing PVs.WARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.roger@dragon:~$ sudo lvremove wd/pvmove0WARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.WARNING: VG wd is missing PV uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ (last written to [unknown]).WARNING: Couldn't find device with uuid uMtjop-PmMT-603f-GWWQ-fR4f-s4Sw-XSKNXZ.Can't remove locked logical volume wd/pvmove0.I am quite happy to loose the root lv, I just need the home and work lvs. What am I missing?Help!Roger_______________________________________________linux-lvm mailing listread the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
_______________________________________________ linux-lvm mailing list linux-lvm@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/