Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] hard drive encryption
Date: Tue, 13 Mar 2012 16:27:49
Message-Id: CA+czFiBRUP2Er3+oVHFYPrMBEwDT7mv6H=ur1NE15AcY46BUpA@mail.gmail.com
In Reply to: Re: [gentoo-user] hard drive encryption by Florian Philipp
1 On Tue, Mar 13, 2012 at 12:11 PM, Florian Philipp <lists@×××××××××××.net> wrote:
2 > Am 13.03.2012 12:55, schrieb Valmor de Almeida:
3 >> On 03/11/2012 02:29 PM, Florian Philipp wrote:
4 >>> Am 11.03.2012 16:38, schrieb Valmor de Almeida:
5 >>>>
6 >>>> Hello,
7 >>>>
8 >>>> I have not looked at encryption before and find myself in a situation
9 >>>> that I have to encrypt my hard drive. I keep /, /boot, and swap outside
10 >>>> LVM, everything else is under LVM. I think all I need to do is to
11 >>>> encrypt /home which is under LVM. I use reiserfs.
12 >>>>
13 >>>> I would appreciate suggestion and pointers on what it is practical and
14 >>>> simple in order to accomplish this task with a minimum of downtime.
15 >>>>
16 >>>> Thanks,
17 >>>>
18 >>>> --
19 >>>> Valmor
20 >>>>
21 >>>
22 >>>
23 >>> Is it acceptable for you to have a commandline prompt for the password
24 >>> when booting? In that case you can use LUKS with the /etc/init.d/dmcrypt
25 >>
26 >> I think so.
27 >>
28 >>> init script. /etc/conf.d/dmcrypt should contain some examples. As you
29 >>> want to encrypt an LVM volume, the lvm init script needs to be started
30 >>> before this. As I see it, there is no strict dependency between those
31 >>> two scripts. You can add this by adding this line to /etc/rc.conf:
32 >>> rc_dmcrypt_after="lvm"
33 >>>
34 >>> For creating a LUKS-encrypted volume, look at
35 >>> http://en.gentoo-wiki.com/wiki/DM-Crypt
36 >>
37 >> Currently looking at this.
38 >>
39 >>>
40 >>> You won't need most of what is written there; just section 9,
41 >>> "Administering LUKS" and the kernel config in section 2, "Assumptions".
42 >>>
43 >>> Concerning downtime, I'm not aware of any solution that avoids copying
44 >>> the data over to the new volume. If downtime is absolutely critical, ask
45 >>> and we can work something out that minimizes the time.
46 >>>
47 >>> Regards,
48 >>> Florian Philipp
49 >>>
50 >>
51 >> Since I am planning to encrypt only home/ under LVM control, what kind
52 >> of overhead should I expect?
53 >>
54 >> Thanks,
55 >>
56 >
57 > What do you mean with overhead? CPU utilization? In that case the
58 > overhead is minimal, especially when you run a 64-bit kernel with the
59 > optimized AES kernel module.
60
61 Rough guess: Latency. With encryption, you can't DMA disk data
62 directly into a process's address space, because you need the decrypt
63 hop.
64
65 Try running bonnie++ on encrypted vs non-encrypted volumes. (Or not; I
66 doubt you have the time and materials to do a good, meaningful set of
67 time trials)
68
69 --
70 :wq

Replies

Subject Author
Re: [gentoo-user] hard drive encryption Florian Philipp <lists@×××××××××××.net>