Score:0

Extends encrypted partition to new SSD

al flag

I have added a 1TB disk to my ubuntu 22.04 install.

I have installed it using LVM+LUKS. lsblk gives this

...
nvme1n1               259:0    0 931,5G  0 disk  
nvme0n1               259:1    0 476,9G  0 disk  
├─nvme0n1p1           259:2    0   512M  0 part  /boot/efi
├─nvme0n1p2           259:3    0   732M  0 part  /boot
└─nvme0n1p3           259:4    0 475,7G  0 part  
  └─nvme0n1p3_crypt   253:0    0 475,7G  0 crypt 
    ├─vgubuntu-root   253:1    0 474,8G  0 lvm   /
    └─vgubuntu-swap_1 253:2    0   980M  0 lvm   [SWAP]

So I can see the new drive here, next to the existing SSD. I would like to add the new disk to the / mount-point so that it just becomes 'one-big-disk', and preferable automatically unlocked when I enter the passphrase on boot-time.

I think because of the LVM it should be doable, but the LVM seems to be created inside the crypt partition.

Can this be done? And how?

cv flag
It is possible, but you will always need both drives to use root partition. Once you have LUKS on the new drive you have to create LVM PV (physical volume) on it with pvcreate. Then add this PV to your existing LVM VG (volume group) vgubuntu with vgextend. Finally resize your logical volume "root" with lvresize.
Score:0
al flag

Ok so this is not really what I wanted, but it sorta works.

I added the disk (that I formatted LUKS/Ext4) to the /etc/crypttab so that it is unlocked as well at boot (same passphrase), and mounted it on a subdir in my /home

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.