Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed an Intel X25-M SSD in my work laptop. I want to encrypt this SSD with LUKS and install Ubuntu 10.04 on it. LVM is not needed so this will not be configured.

The articles on SSD i have read, explains that it is very important to align the partitions correctly. Therefore i run fdisk like this:

fdisk -H 32 -S 32 /dev/sda

Then i have created three partitions boot, swap and root. Could i just go on and continue to configure LUKS like explained in this article:

http://www.howtoforge.com/encrypting-the-system-manually-upon-installation-ubuntu8.04

And then everything will be aligned as it should? or does dm-crypt need to be aligned somehow?

share|improve this question
    
Notice that if you don't have any hardware accelerated encryption you could get somewhat bad performance. I got ca 50 MB/s with encryption and ca 200 MB/s without encryption, all according to bonnie++. –  Jimmy Hedman Mar 17 '11 at 12:54

1 Answer 1

Running fdisk like this:

fdisk -H 32 -S 32 /dev/sda

...is not quite sufficient. You also need to start the first partition at cylinder 2. (The first partition needs special treatment because it is automatically shifted by one track if you do not intervene. Source. And all this assumes your SSD uses a 512KB erase block size. That's what my OCZ uses, so this works for me.)

dm-crypt is generally a poor match for SSD's right now. While LVM will pass through the TRIM commands dm-crypt will not. Furthermore, TRIM, if it was used, would probably reduce security. Also, there are reports that overall SSD speed is drastically reduced by encryption, regardless of TRIM concerns. One forum user reported a drop from ~ 200 M/s to 50 M/s with encryption.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.