Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

One of the well-known properties of dm-crypt is that it does not handle write barriers properly and hence it requires turning off on-drive write cache to prevent corruption of filesystems. As far as I understand it is not shared by all other dm devices (like LVM w/out snapshoting).

My question is whether it is an inherent property of dm-crypt for any reason (I cannot find any but it is possible) or is it simply not implemented (yet)?

share|improve this question
What exactly do you mean by "not handle properly"? Write caching is IMHO a filesystem feature (or hardware controller - but not that of a block device). – Nils Nov 26 '11 at 21:58
Hmm. I meant write barriers. I have no idea why I wrote write caching. – Maciej Piechotka Dec 4 '11 at 13:16
So you should edit your question accordingly. But I doubt there will be any specialist here able to go into the depths of write barrier philosophy. ;-) – Nils Dec 4 '11 at 20:38
I thought I did edit it... – Maciej Piechotka Dec 4 '11 at 21:16
In the past, almost none of LVM / DM code contained support for write barriers, but now it is a work in progress. I can't think of any reason why dm-crypt should not support it, so you can check if it has been added in the newest version or maybe ask on the lvm-devel mailing list. – Marki555 May 28 '12 at 9:08

See that answer to related question: http://serverfault.com/a/382515/67675

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.