LVM: moving data from damaged PV to healthy one

This post is mix between rant and mental note:

When you move data off damaged PV (reported by smartd, thanks for it!) be sure that you do following thing:

  • boot in single user more
  • activate LVM (/etc/init.d/lvm start or similar)
  • don't mount logical volumes, because pvmove would block (without any explanation)
  • pvmove /dev/bad_pv /dev/good_pv
  • vgreduce vg_name /dev/bad_pv
I also found out that pvmove can, in fact, be restarted after reboot, but at which point it restarts is still a mystery to me.