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


states that when mirroring a Logical Volume in LVM we need a "A volume for the log "... ehh, what exactly is a mirror log? Is it always recommended when mirroring an LV?

share|improve this question
up vote 3 down vote accepted

From the LVM documentation which comes up easily on Google:

LVM maintains a small log which it uses to keep track of which regions are in sync with the mirror or mirrors. By default, this log is kept on disk, which keeps it persistent across reboots. You can specify instead that this log be kept in memory with the --corelog argument; this eliminates the need for an extra log device, but it requires that the entire mirror be resynchronized at every reboot.

Ok, I can understand why this would not be clear if you don't have a little background in filesystems or failure tolerance, but you should have at least done minimum research and found the explanation above.

The issue is what happens if there is a system crash or power failure when the system has written some new data to one of the disks but not to the other. The log keeps track of which areas of each component of the mirror have not yet been written to one of the disks. If the log is non-empty at some point in time, it means the disks are out of synch. If the log is kept in memory, then when the system boots, it needs to read every block from both disks and check for discrepancies. If the log is kept on the disk, then the system only needs to read the log and check the blocks mentioned in the log.

share|improve this answer

This keeps the state of the mirror i.e. which blocks have not been synced yet. This is also the reason why I dislike LVM for RAID1. You need 3 volumes to mirror. With mdadm this is solved by putting an (optional) bitmap onto the device (or to an external device). With small devices a full sync does not hurt. With big devices it hurts - so better put an ("internal") bitmap there.

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.