You are not logged in.

#1 2026-08-05 23:58:03

lexan
Member
Registered: 2011-06-15
Posts: 67

Boot hangs after adding second SSD with LVM on LUKS

I'm trying to install an additional SSD data drive and mount it at /data2.

My current system is LVM on LUKS on /dev/nvme0n1p2, so I thought I'd do something similar with the new disk at /dev/nvme1n1; I created a partition, `nvme1n1p1`, and created a LUKS crypt device on it `cryptdata2` that is listed in `/etc/crypttab` and is decrypted at boot.

This setup boots with no issue:

$ sudo pvs
  PV                     VG           Fmt  Attr PSize  PFree 
  /dev/mapper/cryptdata2              lvm2 ---  <3.64t <3.64t
  /dev/mapper/cryptlvm   BillVolGroup lvm2 a--  <3.64t     0 

But when I extend BillVolGroup to use /dev/mapper/cryptdata2, the boot hangs, so I boot a live installation and remove /dev/mapper/cryptdata2 pv from BillVolGroup.

I've run `sudo mkinitcpio -P` after adding a logical volume and extending BillVolGroup, but what am I doing wrong?


$ lsblk
NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                       8:0    1  57.8G  0 disk  
├─sda1                    8:1    1   1.2G  0 part  
└─sda2                    8:2    1   258M  0 part  
sr0                      11:0    1  1024M  0 rom   
nvme1n1                 259:0    0   3.6T  0 disk  
└─nvme1n1p1             259:1    0   3.6T  0 part  
  └─cryptdata2          253:4    0   3.6T  0 crypt 
nvme2n1                 259:2    0 476.9G  0 disk  
├─nvme2n1p1             259:3    0   260M  0 part  
├─nvme2n1p2             259:4    0    16M  0 part  
├─nvme2n1p3             259:5    0 474.7G  0 part  
└─nvme2n1p4             259:6    0     2G  0 part  
nvme0n1                 259:7    0   3.6T  0 disk  
├─nvme0n1p1             259:8    0     2G  0 part  /boot
└─nvme0n1p2             259:9    0   3.6T  0 part  
  └─cryptlvm            253:0    0   3.6T  0 crypt 
    ├─BillVolGroup-swap 253:1    0   130G  0 lvm   [SWAP]
    ├─BillVolGroup-root 253:2    0   256G  0 lvm   /
    └─BillVolGroup-home 253:3    0   3.3T  0 lvm   /home

Offline

#2 Yesterday 08:12:06

frostschutz
Member
Registered: 2013-11-15
Posts: 1,650

Re: Boot hangs after adding second SSD with LVM on LUKS

If you're using non-systemd initcpio with 'encrypt' hook, that opens only a single luks device by default, but if your LVM is spanning two crypt devices, you might have to open both in early boot. (crypttab is ignored in early boot) I think there are some instructions in the wiki on how to modify / duplicate this hook (encrypt2, encrypt3, ...) https://wiki.archlinux.org/title/Dm-cry … partitions

For systemd initcpio, 'sd-encrypt' hook, you might have to re-generate it after changing configuration so the new crypttab / crypttab.initramfs is included. Or add the respective command line parameters for the new LUKS device. rd.luks and others can be specified multiple times with sd-encrypt.

For the systemd crypttab route, you can extract with lsinitcpio and check if the included crypttab looks correct.

Last edited by frostschutz (Yesterday 09:01:59)

Offline

Board footer

Powered by FluxBB