[linux-lvm] re --corelog: does synchronization re-copy all data?

malahal at us.ibm.com malahal at us.ibm.com
Mon Feb 23 07:11:32 UTC 2009

Daniel B. [dsb at smart.net] wrote:
> In the LVM Administrator's Guide, at least the one at
> http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/LV_create.html ,
> it says:"
>   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.
> Does that last sentence mean that _all_ the data is recopied, or just
> that all _regions_ are checked and not all the data necessarily has
> to be copied (perhaps only change regions have to be copied, but
> unchanged regions don't)?

Everything has to be re-copied because it doesn't know what is changed
as the "log" is kept in memory which is lost after a reboot.

> More generally, can LVM perform RAID1-style mirroring with only
> two disks (without having to re-copy everything each boot)
> (and, of course, being recoverable in case either disk fails)?

You should be able to force LVM to create a log device on one of your
two devices (--alloc anywhere)

Thanks, Malahal.

More information about the linux-lvm mailing list