恢复加密的 LVM

恢复加密的 LVM

我在 LUKS 加密 LVM 上安装了 Debian。

今天早上,我想在外部磁盘上安装操作系统以便在另一台主机上使用,但我错误地选择了错误的磁盘...几秒钟后,我注意到我选择了错误的磁盘,因此我立即停止了该过程,但分区表已经被写入。

为了恢复,我启动了系统救援 CD,并在 testdisk 的帮助下恢复了分区。但是,我仍然无法启动旧设置,因此我开始寻找至少可以恢复文件的方法。我再次运行救援磁盘,并尝试安装它,但失败了,并显示以下信息:

# 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

幸运的是,VG 被检测到了,而且我仍然有 LUKS 标头,但从上面的代码块可以看出,激活失败,原因是“device-mapper: reload ioctl on (254:1) failed: Invalid param

关于如何恢复该分区有什么想法吗?

相关内容