I read that when mirroring a logical volume a log of some sort is used to keep the files in sync. You can either set it so this log is in a separate physical volume or in memory. I also read that if the log is in memory, the system has to resync the volumes.

Is there a performance hit for using the log in memory? For example, does it take much longer to boot the machine? Is the data at risk while the resync is happening?

I'm working with Ubuntu 10.04 in this case. I believe it's lvm2. The clearest documentation I've found is the CentOS document here. I was also looking at this description.


1 Answer 1


Can you add the links you are referring to? Because just mirroring does not need a log. A log (on the same or extra device) is usually involved when you use a journaling filesystem - if you use mirroring or not on the layer below (i.e. the blocklayer).

Update: Ok, with the links things are clearer now. The LVM mirroring seems to be quite different from the linux md (RAID 1) mirroring.

To quote from the lvcreate man page:

Specifying the optional argument "--corelog" will create a mirror with an in-memory log verses a disk-based (persistent) log. While this removes the need for an extra log device and may be slightly faster, it requires that the entire mirror be resynchronized upon each instantiation (e.g. a reboot).

Thus, with a memory based log you get a significant performance hit at startup and a performance hit, when the log physical volume is on the same hardware disk.

Googling around, mirroring using Linux mdadm seems to be the better approach ATM. (You can use the md device as physical device for some lvm setup.)

First, it does not need an extra log (and does not do an expensinve resync at every startup).

Second, lvm mirrors does not seem to support parallel reading, i.e. md mirrors should have better read performance:



  • I've added links above. I plan to use ext4 but I thought I had to set that up after I mirrored the volumes. Commented Jan 24, 2011 at 13:14
  • @Jay Sheridan: updated answer Commented Jan 24, 2011 at 20:24
  • Even mirroring needs a log (in some form) to handle sudden failures (where one of the devices has written the data and not the other). See this answer for a few pointers to how mdadm does it; I don't know what LVM uses. Commented Jan 24, 2011 at 21:13
  • Good links. They have some good info on what an lvm mirror is typically used for. I'll look into how to use mdadm. Commented Jan 24, 2011 at 23:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .