I use Arch Linux kernel
4.18.12-arch1-1-ARCH (november 2018).
I use a SATA caddy (for a Thinkpad T400) which holds a hard drive from an old laptop. I'd like to decide on combining the contents and extending the logical volumes
lvhome or keeping the current setup (see below). I only use the
ext4 filesystem and both volumes contain data. Although this question seems to be answered here, I'm not sure what to do to prevent data loss.
So currently I boot from a luks encrypted SSD and I have a few symbolic links in
$HOME pointing to directories on the lazy mounted hard drive to extend storage and which allows me to use my old
$HOME on the hard drive.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT UUID sda 8:0 0 223.6G 0 disk └─sda1 8:1 0 223.6G 0 part 3d17c5b4-a603-4600-9f36-c598a7da783e └─root 254:0 0 223.6G 0 crypt PRGLfW-Q18M-pPu8-nr6a-tloV-SS4W-kK1ROX ├─matrix-swapvol 254:1 0 2G 0 lvm [SWAP] 38e862ef-e919-4388-810f-63ce187b342c └─matrix-rootvol 254:2 0 221.6G 0 lvm / c71a8292-c678-4a53-90da-3e4bf78cedbb sdb 8:16 0 232.9G 0 disk ├─sdb1 8:17 0 512M 0 part 14c635fb-6ee7-45c0-aefd-d3d7440116c0 └─sdb2 8:18 0 232.4G 0 part c36535d9-4098-4939-9ebe-6a2be950f3ea └─caddy 254:3 0 232.4G 0 crypt kTkSk4-oemR-1fJi-4brz-OXmW-DEZk-rqF2pN ├─vgarch-lvswap 254:4 0 4G 0 lvm a1932471-209e-4d47-85dc-c4ea1ce37de8 ├─vgarch-lvroot 254:5 0 15G 0 lvm 67d37f85-c2c0-40e7-88e9-afd4a6c1c561 └─vgarch-lvhome 254:6 0 211.2G 0 lvm dd89d271-776a-426a-826d-9f4d7056fc6a
As can be seen, for whatever reason I decided on using lvm on luks twice. Note that the SSD has no
/boot partition: it is decrypted with the help of a libreboot ROM image. During boot, an entry in
/dev/sdb2's UUID unlocks the harddrive using a key file in
/. Then, I use systemd's automount service to mount or unmount it whenever needed:
# /etc/fstab # /dev/mapper/vgarch-lvhome UUID=dd89d271-776a-426a-826d-9f4d7056fc6a /mnt/caddy ext4 rw,noatime,data=ordered,noauto,nofail,x-systemd.automount,x-systemd.device-timeout=20,x-systemd.idle-timeout=2min 0 0
I recursively changed the ownership of files in
lvhome. As I have no need for
lvswap I'll be removing them along with /dev/sdb1 which contains /boot.
So how can these be combined? Is that advisable? (because of different uses for SSD and HDD) It is suggested to copy the contents over to the other filesystem first, but doesn't this defeat the purpose of lvm? I thought it would've been easy to grow or shrink the filesystem, but I guess I imagined features from the zfs world.