Skip to contentSkip to conversation

Federicos patch for clustered snapshots

linux-lvm Dirk H. Schulz 1 participant 1 message Jan 24, 2010

lore
Share & tools
lore
#0 lore raw

Hi all,

I am new to the list, so please bear with me.

This is from this list some 15 months ago:

Quoted 24 lines
Quoted 8 lines · Federico Simoncelli

Looking at the LVM2 code (LVM2.2.02.40, tools/lvcreate.c:640):

/* FIXME Allow exclusive activation. */
if (vg_is_clustered(vg)) {
log_error("Clustered snapshots are not yet supported."); return 0;
}

Quoted 4 lines

looks like there is no way to activate a snapshot in a clustered volume group. Is the documentation wrong?
Is there anyone actively working on the "exclusive activation" FIXME that is mentioned in the comment?

Hi all,
I worked a little on this issue and I came up with a working patch for LVM2.2.02.32.
...
To be able to set the lv as exclusive you have to deactivate it on the other nodes with the command:

# lvchange -aln /dev/vg00/lvol1
Quoted 7 lines

and then you can create the snapshot:

# lvcreate --size 100M --snapshot --name snap /dev/vg00/lvol1
Logical volume "snap" created

It automatically takes care to set the lv device as exclusive (vgchange -aey). Can anyone review the patch?

I would be very interested in the outcome of this patch. Has it been reviewed, how was the result, are there binaries/source code I could deploy?

Any hint or help would be greatly appreciated.

Dirk