You are not logged in.
Hi,
I am running my systems on \ext4 partitions on a LVM in a luks container. Since I don't do anything fancy with LVM, maybe I will not continue this in the future, because usually it's only one partition.
Anyways, I set up a procedure by reading the wiki and some tutorials and it looks like the following:
4. Create efi partition:
`$ fdisk /dev/sdx`
* g (to create an empty GPT partition table)
* n
* 1
* enter
* +1G
* t
* 1 (For EFI)
* w
5. Create LVM partition:
`$ fdisk /dev/sdx`
* n
* 2
* enter
* enter
* t
* 2
* 31
* w
6. `$ mkfs.fat -F32 /dev/sdx1`
7. Set up encryption
`$ cryptsetup luksFormat /dev/sdx2`
`$ cryptsetup open --type luks /dev/sdx2 lvm`
8. Set up lvm:
`$ pvcreate /dev/mapper/lvm`
`$ vgcreate volgroup0 /dev/mapper/lvm`
`$ lvcreate -l 100%FREE volgroup0 -n lv_root`
`$ modprobe dm_mod`
`$ vgscan`
`$ vgchange -ay`
9. `$ mkfs.ext4 /dev/volgroup0/lv_root`Yesterday I wondered what the part with vgscan was again for and read the part about lvm in the wiki. I think before I only read the article about luks and how to set up lvm on luks. https://wiki.archlinux.org/index.php/Lv … nux_on_LVM
There I found the note:
Note: If using a SSD without partitioning it first, use pvcreate --dataalignment 1m /dev/sda (for erase block size < 1 MiB), see e.g. here.
I didn't do this obviously and now I am wondering whether this might cause a problem on my three installations of arch.
Last edited by Simaryp (2019-12-01 08:29:27)
Offline
Don't worry. That says without partitioning, as in using just /dev/sda as a full disk lvm volume without splitting it (partitioning) into /dev/sda1 and /dev/sda2 etc.
Offline
Ah ok, I got it wrong. I didn't know about this usecase of using the hole device without a formatted partition. I was already confused on how and which point one should have partitioned in advance to avoid this step.
Thanks!
Offline