Skip to content

10 comments

Finally, something I know! I wrote a post on using LVM on LUKS to encrypt an Arch installation. As mentioned, you don't need LVM, but if you do use it, you'll only need one password to unlock multiple partitions. Below is my setup.

+-----------+ +----------------+ +---------------------------------------------------------------------------+
|           | |                | |Logical volume1        | Logical volume2        | Logical volume3          |
| GPT-BIOS  | | Boot partition | |/dev/mapper/lvolswap   | /dev/mapper/volroot    | /dev/mapper/lvolhome     |
| partition | | (may be on     | |_ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ |
|           | | other device)  | |                                                                           |
|           | |                | |                        LUKS encrypted partition                           |
| /dev/sda1 | | /dev/sda2      | |                          /dev/sda3                                        |
+-----------+ +----------------+ +---------------------------------------------------------------------------+  

This allows me encrypted swap, and the ability to keep my root and /home filesystems on separate partitions.

Also, if you're using LUKS, backup the header!

4 points

If you only have one drive, LVM on LUKS. You only need to type the decryption password once to unlock all the partitions.

2 points
unknown author1 hidden

I never tested it, but I think you could also save encryption keys for other encrypted volumes on the first unlocked volume. But I agree that lvm on luks is simpler and better to manage than luks on lvm if you have your system only on one drive.

2 points

You could actually do LVM on LUKS on LVM. I have a server set up that way. I have a RAID 1 which only let's you have 1 partition. I didn't want a completely separate drive for /boot so I split it up with LVM, encrypted the larger volume, then split that encrypted volume using LVM AGAIN into / and swap.

1 points

/u/StannisIsMyKing what the only other drive is swap?

0 points

I'm not sure what you are asking. You can have an encrypted swap inside the LUKS encrypted container. If you are telling me you have an entire separate drive just for swap I don't know why you would do that.

1 points

LVM on LUKS is simpler to implement for single drive installs, while LUKS on LVM is a bit more work, it is excellent security with flexibility.

Both LVM and LUKS are well proven, rock solid technologies.

1 points

I use LUKS for root partition, and LUKS for swap partition with random key. No LVM. Don't see any point of using LVM and complicate partition layout. Afaik there are no security issues of using LVM or not.

0 points

I use lvm simply because i can remove,create,resize partitions without having to think about it too long :).

3 points

Well sure, if you are modifying partitions a lot then maybe LVM makes sense. I know that I need to simply set up my partitions once and I won't have need to modify them for a loooong time. So for me setting up LVM is just an overhead.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.