1

I had Debian install running on LUKS encrypted LVM.

This morning, I wanted to install OS on external disk to be used on another host, but mistakenly I chose the wrong disk... Few seconds in I noticed that I have chosen the wrong one, so right away I stopped the process, but partition table already got written.

To recover I booted system rescue CD, and with the help of testdisk I recovered the partitions. However, I still couldn't boot my old setup, so I started looking for a way to recover the files at least. I ran rescue disk again, and I tried to mount it, but it fails with the following:

# vgchange -v -ay worker1-vg

WARNING: Device /dev/mapper/recoveryx has size of 444214667 sectors which is smaller than corresponding PV size of 486313984 sectors. Was device resized? WARNING: One or more devices used as PVs in VG worker1-vg have changed sizes. Activating logical volume worker1-vg/root. activation/volume_list configuration setting not defined: Checking only host tags for worker1-vg/root. Creating worker1--vg-root Loading table for worker1--vg-root (254:1). device-mapper: reload ioctl on (254:1) failed: Invalid argument Removing worker1--vg-root (254:1) Activating logical volume worker1-vg/swap_1. activation/volume_list configuration setting not defined: Checking only host tags for worker1-vg/swap_1. Creating worker1--vg-swap_1 Loading table for worker1--vg-swap_1 (254:1). device-mapper: reload ioctl on (254:1) failed: Invalid argument Removing worker1--vg-swap_1 (254:1) Activated 0 logical volumes in volume group worker1-vg. 0 logical volume(s) in volume group "worker1-vg" now active

Luckily the VG is detected, and I still have the LUKS header, but as can be seen in the above code blocks, activation fails due to "device-mapper: reload ioctl on (254:1) failed: Invalid argument"

Any ideas how to recover this partition?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.