Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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

Running fdisk like this:

fdisk -H 32 -S 32 /dev/sda 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


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