I recently installed Fedora 20. I don't recall what exact options I chose for encrypting the disk/LVM during installation. It installed fine and I can log in etc. Here is the situation I have:
I booted up with LiveCD and tried the following: (I have installed Fedora20 to /dev/sda3' partition).
- If I run
cryptsetup open /dev/sda3 fedo
I get an error saying it is not a LUKS device. - I I run
cryptsetup luksDump /dev/sda3
I get an error saying it is not a LUKS device - If I run
cryptsetup open --type plain /dev/sda3 fedo
, it prompts for password and it opens the device fine.
So, obviously, that is a plain-text encrypted (without LUKS header) partition.
Now, when I try to run mount /dev/mapper/fedo /mnt/fedora
, it says unknown crypto_LUKS filesystem
.
I do have LVM on top of it, so, I can run pvdisplay
, vgdisplay
, lvdisplay
and it shows information. I have a VG called fedora
and two LVs, viz 00 for swap partition and 01 for / partition.
Now, if I do a cryptsetup luksDump /dev/fedora/01
I can see LUKS headers etc. And, I can mount by running mount /dev/fedora/00 /mnt/fedora
, no password prompt.
So, do I have a LUKS-over-LVM-over-(plain-text)-encrypted partition?
Here is my output of lsblk
:
# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 37.3G 0 disk |-sda3 8:3 0 17.4G 0 part |-fedora-00 253:0 0 2.5G 0 lvm | |-luks-XXXXX 253:3 0 2.5G 0 crypt [SWAP] |-fedora-01 253:1 0 15G 0 lvm |-luks-XXXXX 253:2 0 15G 0 crypt /
So, the question is, how to figure out whether I have LVM-over-LUKS or LUKS-over-LVM, or some other combination thereof (LUKS over LVM over LUKS etc)? To make my question clear, I know I have LVM and LUKS, I want to figure out the order of them.
Best Answer
cryptsetup luksDump /dev/fedora/01
shows the LVM logical volume to be a LUKS encrypted volume. The output ofpvs
orpvdisplay
would show the partition/dev/sda3
to be a physical volume. Thus you have LUKS over LVM. At a lower level, you have LVM over PC partition.The output of
lsblk
confirms this:sda
is a disk,sda3
is a partition (which contains an LVM physical volume),fedora-00
andfedora-01
are logical volumes, and each logical volume contains a LUKS encrypted volume.