첫 번째 답변 끝에 일부 내용을 수정했습니다.
불행하게도 debian10을 실행하는 이전 LVM 설치에서 몇 가지 문제가 발생했습니다.
데비안 11과 데비안 10이 설치되어 있습니다. 그렇게 하면 Debian 10 LVM이 손상된 것 같고(더 이상 부팅할 수 없습니다) 설치 방법을 모르겠습니다. Debian 10은 설치 프로그램을 사용하여 설치됩니다. 이는 암호화되어 설치되며 두 드라이브에 걸쳐 있는 LVM 내에 상주합니다. initramfs를 시작할 때 lvm을 해독하려면 비밀번호를 입력해야 합니다.
내 목표는 NVME 드라이브(Debian 10 및 lvm이 저장된 곳)의 일부 데이터를 새로 연결된 SATA 드라이브(새 Debian 11 설치가 실행 중인 드라이브)에 저장하는 것입니다.
내 주요 질문은 NVME에서 논리 볼륨(etc 및 홈 디렉터리)을 마운트하는 방법입니다.
몇 가지 조언을 읽었지만 점점 더 혼란스러워지고 상황이 악화되기 전에 데이터 드라이브에서 더 많은 실수를 저지르고 싶지 않습니다.
아주 간단한 해결책은 다음과 같습니다.https://superuser.com/questions/116617/how-to-mount-an-lvm-volume하지만 지금 여기에서 사용할 수 있는지, 기본 볼륨/볼륨 그룹이 어떻게든 손상될지는 알 수 없습니다.
여기서 또 다른 팁이 나옵니다/etc/lvm/에 액세스하지 않고 lvm 메타데이터를 복원할 수 있습니까?사용했지만 sudo strings /dev/nvme0n1p6 | less
출력이 도움이 되지 않았습니다. lvm이 luks에 의해 암호화되었음을 보여줍니다.
LABELONE
LVM2 001s1TKbLcSK8egOQIexp0yoIYg8jHSpbwC
LVM2 x[5A%r0N*>
sha256
Jz?73404056-2fb5-4d7f-b1eb-8cff2273a211
{"keyslots":{"0":{"type":"luks2","key_size":64,"af":{"type":"luks1","stripes":4000,"hash":"sha512"},"area":{"type":"raw","offset":"32768","size":"258048","encryption":"aes-xts-plain64","key_size":64},"kdf":{"type":"argon2i","time":9,"memory":1048576,"cpus":4,"salt":
OUTPUT Truncated
추가 정보가 필요하면 댓글로 알려주시기 바랍니다.
도와 주셔서 감사합니다.
pvscan
WARNING: Couldn't find device with uuid ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I.
WARNING: Couldn't find device with uuid RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2.
WARNING: VG lvm-crypt is missing PV ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I (last written to /dev/mapper/nvme0n1p8_crypt).
WARNING: VG lvm-crypt is missing PV RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2 (last written to /dev/mapper/nvme0n1p6_crypt).
PV [unknown] VG lvm-crypt lvm2 [86,50 GiB / 0 free]
PV [unknown] VG lvm-crypt lvm2 [400,60 GiB / 0 free]
PV /dev/mapper/sda1-crypt VG lvm-crypt lvm2 [931,49 GiB / <397,07 GiB free]
PV /dev/nvme0n1p6 lvm2 [400,62 GiB]
PV /dev/nvme0n1p9 lvm2 [<86,52 GiB]
Total: 5 [1,86 TiB] / in use: 3 [<1,39 TiB] / in no VG: 2 [<487,14 GiB]
pvdisplay
WARNING: Couldn't find device with uuid ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I.
WARNING: Couldn't find device with uuid RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2.
WARNING: VG lvm-crypt is missing PV ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I (last written to /dev/mapper/nvme0n1p8_crypt).
WARNING: VG lvm-crypt is missing PV RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2 (last written to /dev/mapper/nvme0n1p6_crypt).
--- Physical volume ---
PV Name [unknown]
VG Name lvm-crypt
PV Size 86,50 GiB / not usable 2,00 MiB
Allocatable yes (but full)
PE Size 4,00 MiB
Total PE 22144
Free PE 0
Allocated PE 22144
PV UUID ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I
--- Physical volume ---
PV Name [unknown]
VG Name lvm-crypt
PV Size <400,61 GiB / not usable 4,00 MiB
Allocatable yes (but full)
PE Size 4,00 MiB
Total PE 102554
Free PE 0
Allocated PE 102554
PV UUID RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2
--- Physical volume ---
PV Name /dev/mapper/sda1-crypt
VG Name lvm-crypt
PV Size <931,50 GiB / not usable 4,00 MiB
Allocatable yes
PE Size 4,00 MiB
Total PE 238462
Free PE 101649
Allocated PE 136813
PV UUID s4UhPf-B5u1-d73L-DKcy-FR93-KvMa-kNrQJ6
"/dev/nvme0n1p6" is a new physical volume of "400,62 GiB"
--- NEW Physical volume ---
PV Name /dev/nvme0n1p6
VG Name
PV Size 400,62 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID s1TKbL-cSK8-egOQ-Iexp-0yoI-Yg8j-HSpbwC
"/dev/nvme0n1p9" is a new physical volume of "<86,52 GiB"
--- NEW Physical volume ---
PV Name /dev/nvme0n1p9
VG Name
PV Size <86,52 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID 8Lk9H1-Tveo-JCko-nfgd-EDrL-KJVq-cA01lR
lvmdiskscan
/dev/nvme0n1 [ 931,51 GiB]
/dev/mapper/sdd5-crypt [ <840,49 GiB]
/dev/nvme0n1p1 [ 450,00 MiB]
/dev/sda1 [ 931,51 GiB]
/dev/mapper/sdd6-crypt [ 498,03 GiB]
/dev/nvme0n1p2 [ 100,00 MiB]
/dev/mapper/sdc1-crypt [ <447,11 GiB]
/dev/nvme0n1p3 [ 16,00 MiB]
/dev/mapper/sda1-crypt [ <931,50 GiB] LVM physical volume
/dev/nvme0n1p4 [ <54,17 GiB]
/dev/mapper/luks-cb25c253-2141-40b5-83ae-a2c1c0980496 [ <465,75 GiB]
/dev/nvme0n1p5 [ <206,72 GiB]
/dev/nvme0n1p6 [ 400,62 GiB] LVM physical volume
/dev/nvme0n1p7 [ 500,00 MiB]
/dev/nvme0n1p8 [ 1,86 GiB]
/dev/nvme0n1p9 [ <86,52 GiB] LVM physical volume
/dev/nvme0n1p10 [ 86,91 GiB]
/dev/nvme0n1p11 [ 532,00 MiB]
/dev/nvme1n1 [ <953,87 GiB]
/dev/nvme1n1p1 [ 856,21 GiB]
/dev/sdb [ 12,73 TiB]
/dev/sdc1 [ 447,12 GiB]
/dev/sdd1 [ 487,00 MiB]
/dev/sdd2 [ 488,00 MiB]
/dev/sdd3 [ 122,00 MiB]
/dev/sdd4 [ 931,32 GiB]
/dev/sdd5 [ 840,50 GiB]
/dev/sdd6 [ <498,05 GiB]
/dev/sde1 [ 465,76 GiB]
4 disks
22 partitions
1 LVM physical volume whole disk
2 LVM physical volumes
lvdisplay
WARNING: Couldn't find device with uuid ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I.
WARNING: Couldn't find device with uuid RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2.
WARNING: VG lvm-crypt is missing PV ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I (last written to /dev/mapper/nvme0n1p8_crypt).
WARNING: VG lvm-crypt is missing PV RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2 (last written to /dev/mapper/nvme0n1p6_crypt).
--- Logical volume ---
LV Path /dev/lvm-crypt/wurzel
LV Name wurzel
VG Name lvm-crypt
LV UUID sYo29d-sbzF-w6Bm-0E3W-LxNK-fr9i-jDnqOu
LV Write Access read/write
LV Creation host, time r7deb, 2020-09-10 11:33:51 +0200
LV Status NOT available
LV Size 30,73 GiB
Current LE 7867
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/home
LV Name home
VG Name lvm-crypt
LV UUID WdZkeA-uAQX-ryhu-11Xb-1Qp9-v3ld-FVIoej
LV Write Access read/write
LV Creation host, time r7deb, 2020-09-10 11:33:58 +0200
LV Status NOT available
LV Size 195,31 GiB
Current LE 50000
Segments 4
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/var
LV Name var
VG Name lvm-crypt
LV UUID TQav8N-UWZB-6ST1-JMBa-dnCp-A79j-9SdPDD
LV Write Access read/write
LV Creation host, time r7deb, 2020-09-10 11:34:07 +0200
LV Status NOT available
LV Size 18,62 GiB
Current LE 4768
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/temp
LV Name temp
VG Name lvm-crypt
LV UUID YBsh1S-1QJI-yIc1-071S-Mqgr-QCoV-7ktV0g
LV Write Access read/write
LV Creation host, time r7deb, 2020-09-10 11:34:16 +0200
LV Status NOT available
LV Size <1,86 GiB
Current LE 476
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/vms
LV Name vms
VG Name lvm-crypt
LV UUID MYuXdV-QuC8-YToG-v2gU-PmlJ-fAEz-AME3Ba
LV Write Access read/write
LV Creation host, time r7deb, 2020-11-11 10:31:26 +0100
LV Status NOT available
LV Size 540,62 GiB
Current LE 138400
Segments 2
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/buero
LV Name buero
VG Name lvm-crypt
LV UUID 8sxSOg-gCfc-Dqb5-jTPg-nJGo-qklD-MaM4vV
LV Write Access read/write
LV Creation host, time r7deb, 2022-06-19 08:35:01 +0200
LV Status NOT available
LV Size <117,19 GiB
Current LE 30000
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/buero2
LV Name buero2
VG Name lvm-crypt
LV UUID r3ZqOD-6dqr-esJZ-jqg9-qzoS-7k1o-sRMf8P
LV Write Access read/write
LV Creation host, time r7deb, 2022-06-19 08:37:31 +0200
LV Status NOT available
LV Size <117,19 GiB
Current LE 30000
Segments 1
Allocation inherit
Read ahead sectors auto
vgscan -v
WARNING: Couldn't find device with uuid ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I.
WARNING: Couldn't find device with uuid RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2.
WARNING: VG lvm-crypt is missing PV ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I (last written to /dev/mapper/nvme0n1p8_crypt).
WARNING: VG lvm-crypt is missing PV RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2 (last written to /dev/mapper/nvme0n1p6_crypt).
Found volume group "lvm-crypt" using metadata type lvm2
vgdisplay -v
WARNING: Couldn't find device with uuid ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I.
WARNING: Couldn't find device with uuid RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2.
WARNING: VG lvm-crypt is missing PV ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I (last written to /dev/mapper/nvme0n1p8_crypt).
WARNING: VG lvm-crypt is missing PV RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2 (last written to /dev/mapper/nvme0n1p6_crypt).
--- Volume group ---
VG Name lvm-crypt
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 37
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 7
Open LV 0
Max PV 0
Cur PV 3
Act PV 1
VG Size <1,39 TiB
PE Size 4,00 MiB
Total PE 363160
Alloc PE / Size 261511 / <1021,53 GiB
Free PE / Size 101649 / <397,07 GiB
VG UUID hBHElE-V8b3-bBWF-Om2J-LH8u-0D7R-Nh8vdw
--- Logical volume ---
LV Path /dev/lvm-crypt/wurzel
LV Name wurzel
VG Name lvm-crypt
LV UUID sYo29d-sbzF-w6Bm-0E3W-LxNK-fr9i-jDnqOu
LV Write Access read/write
LV Creation host, time r7deb, 2020-09-10 11:33:51 +0200
LV Status NOT available
LV Size 30,73 GiB
Current LE 7867
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/home
LV Name home
VG Name lvm-crypt
LV UUID WdZkeA-uAQX-ryhu-11Xb-1Qp9-v3ld-FVIoej
LV Write Access read/write
LV Creation host, time r7deb, 2020-09-10 11:33:58 +0200
LV Status NOT available
LV Size 195,31 GiB
Current LE 50000
Segments 4
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/var
LV Name var
VG Name lvm-crypt
LV UUID TQav8N-UWZB-6ST1-JMBa-dnCp-A79j-9SdPDD
LV Write Access read/write
LV Creation host, time r7deb, 2020-09-10 11:34:07 +0200
LV Status NOT available
LV Size 18,62 GiB
Current LE 4768
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/temp
LV Name temp
VG Name lvm-crypt
LV UUID YBsh1S-1QJI-yIc1-071S-Mqgr-QCoV-7ktV0g
LV Write Access read/write
LV Creation host, time r7deb, 2020-09-10 11:34:16 +0200
LV Status NOT available
LV Size <1,86 GiB
Current LE 476
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/vms
LV Name vms
VG Name lvm-crypt
LV UUID MYuXdV-QuC8-YToG-v2gU-PmlJ-fAEz-AME3Ba
LV Write Access read/write
LV Creation host, time r7deb, 2020-11-11 10:31:26 +0100
LV Status NOT available
LV Size 540,62 GiB
Current LE 138400
Segments 2
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/buero
LV Name buero
VG Name lvm-crypt
LV UUID 8sxSOg-gCfc-Dqb5-jTPg-nJGo-qklD-MaM4vV
LV Write Access read/write
LV Creation host, time r7deb, 2022-06-19 08:35:01 +0200
LV Status NOT available
LV Size <117,19 GiB
Current LE 30000
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/lvm-crypt/buero2
LV Name buero2
VG Name lvm-crypt
LV UUID r3ZqOD-6dqr-esJZ-jqg9-qzoS-7k1o-sRMf8P
LV Write Access read/write
LV Creation host, time r7deb, 2022-06-19 08:37:31 +0200
LV Status NOT available
LV Size <117,19 GiB
Current LE 30000
Segments 1
Allocation inherit
Read ahead sectors auto
--- Physical volumes ---
PV Name [unknown]
PV UUID ovqLHE-HeCP-MabL-UYaZ-zKGk-dSeM-G0HP0I
PV Status allocatable
Total PE / Free PE 22144 / 0
PV Name [unknown]
PV UUID RxI6g8-Fp87-j7O4-N055-arL3-0l1E-CIIvo2
PV Status allocatable
Total PE / Free PE 102554 / 0
PV Name /dev/mapper/sda1-crypt
PV UUID s4UhPf-B5u1-d73L-DKcy-FR93-KvMa-kNrQJ6
PV Status allocatable
Total PE / Free PE 238462 / 101649
lsblk -o NAME,SIZE,TYPE,UUID
NAME SIZE TYPE UUID
sda 931,5G disk
└─sda1 931,5G part 50353f7f-7bc8-4100-85e2-56db32895c11
└─sda1-crypt 931,5G crypt s4UhPf-B5u1-d73L-DKcy-FR93-KvMa-kNrQJ6
sdb 12,7T disk a7bbc558-c28c-4df6-992d-8ce16a961147
sdc 447,1G disk
└─sdc1 447,1G part c1971d93-afc1-4f0c-875a-4280c5a275fd
└─sdc1-crypt 447,1G crypt 06cd919c-024c-4987-9e78-41551292ed60
sdd 3,6T disk
├─sdd1 487M part
├─sdd2 488M part 727C-2D0A
├─sdd3 122M part
├─sdd4 931,3G part 786749de-fa3c-4c2c-ac40-23b6ddd6e76e
├─sdd5 840,5G part 0fe82dcd-1d1d-4c4b-9f90-91c4cfd6ec07
│ └─sdd5-crypt 840,5G crypt ad53f0e9-5e4f-48c9-ba2f-2ca3af949ea2
└─sdd6 498G part 38bafe27-5b78-48ea-980c-de636514df14
└─sdd6-crypt 498G crypt eb0a33c9-bd6c-4c38-ae31-4667ba3cff24
sde 465,8G disk
└─sde1 465,8G part cb25c253-2141-40b5-83ae-a2c1c0980496
└─luks-cb25c253-2141-40b5-83ae-a2c1c0980496 465,7G crypt b7aef9a8-41d8-4d11-975f-9f77645434a2
sr0 1024M rom
nvme0n1 931,5G disk
├─nvme0n1p1 450M part D09495E59495CDFA
├─nvme0n1p2 100M part 7096-4C77
├─nvme0n1p3 16M part
├─nvme0n1p4 54,2G part C2A82FF0A82FE221
├─nvme0n1p5 206,7G part 04BFD1325C7FA67C
├─nvme0n1p6 400,6G part s1TKbL-cSK8-egOQ-Iexp-0yoI-Yg8j-HSpbwC
├─nvme0n1p7 500M part A5A2-6853
├─nvme0n1p8 1,9G part 41aadaed-4741-42a1-b17b-128c9fcf6188
├─nvme0n1p9 86,5G part 8Lk9H1-Tveo-JCko-nfgd-EDrL-KJVq-cA01lR
├─nvme0n1p10 86,9G part c6c45bc2-a657-4dbb-83b2-b8ef4b3930b9
└─nvme0n1p11 532M part A63AA7D23AA79E35
nvme1n1 953,9G disk
└─nvme1n1p1 856,2G part 68BEA6DCBEA6A1D4
편집 1:
지금까지는 너무 나빴습니다. 몇 가지를 시도했는데 UUID가 변경되었거나 헤더가 손상된 것 같습니다.
이전 데비안 10 /boot/ 파티션을 찾았고 initramfs로 부팅할 수 있었습니다. 여기에서는 몇 년 전에 설정한 비지 박스(원격으로 로그인하고 시스템을 부팅하기 위해 원격으로 드라이브 잠금을 해제할 수 있음)를 통해 로그인할 수 있었습니다. 그래서 로그인하여 파일을 찾았습니다 crypttab
. 콘텐츠와 관련하여 다른 UUID가 필요합니다.
cat /cryptroot/crypttab3
nvme0n1p8_crypt UUID=1697ec4a-b30b-4642-b4f3-6ba94afc40ec none luks,discard
nvme0n1p6_crypt UUID=73404056-2fb5-4d7f-b1eb-8cff2273a211 /FIXME-initramfs-rootmnt/root/luks.keys.d/nvme0n1p6.luks.key luks,discard,initramfs
crypt_pv_SamsungQVO UUID=50353f7f-7bc8-4100-85e2-56db32895c11 /FIXME-initramfs-rootmnt/root/luks.keys.d/SamsungQVO_S4CZNG0M301660E.luks.key luks,discard,initramfs
kingston_crypt UUID=c1971d93-afc1-4f0c-875a-4280c5a275fd /FIXME-initramfs-rootmnt/root/luks.keys.d/KINGSTON_SHFS37A480G_50026B7269007A6C.luks.key luks,discard,initramfs
적절한 파티션에 맞게 수동으로 조정하려고 시도했지만 vi
유효한 LUKS 파티션을 찾을 수 없습니다.
Debian 11을 부팅하는 동안 드라이브의 암호를 해독하려고 하면 동일한 결과가 나타납니다. 유효한 LUKS 파티션이 아니라고 나옵니다.
따라서 이 시점에서 나는 아마도 포기하고 파티션 헤더가 손상되었다고 생각할 것입니다(정말 의심스럽습니다. 동시에 두 개의 손상된 luks 헤더가 있다는 것을 의미합니다). 또는 LVM이 볼륨 그룹을 설정하기 전에 볼륨 그룹을 설정해야 한다고 생각합니다. LUKS를 사용하여 파티션/롤 잠금을 해제할 수 있습니다. 여기서는 후자인 것 같지만 아이디어가 부족합니다.
더 나은 제안이 없으면 UUID를 이전 /boot/ 파티션에서 찾은 initramfs 내부의 crypttab 파일에 기록한 것으로 변경해 보겠습니다.
LVM이 이러한 방식으로 작업을 완료할 수 있기를 바랍니다.