Skip to contentSkip to conversation

re --corelog: does synchronization re-copy all data?

linux-lvm Daniel B. 2 participants 3 messages Feb 22, 2009 – Feb 25, 2009

lore
Share & tools
lore

Daniel B.

author
#0 lore raw

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)?

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)?

Thanks,
Daniel

Signature · 2 lines
Daniel B.
[email protected]
#1 lore raw
Quoted 11 lines · Daniel B. [[email protected]] 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.

Quoted 4 lines

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.

Quoted 3 lines

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.

author
#2 lore raw
Quoted 8 lines · [email protected] wrote:
Quoted 3 lines · Daniel B. [[email protected]] wrote:

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)

So what happens if the disk containing the log dies? Does LVM keep running (presenting the logical volume implemented on the physical volumes on the still-working disk)?

(And what happens at reboot time (with the failed disk still in place)?)

Thanks,
Daniel

Signature · 2 lines
Daniel B.
[email protected]