[linux-lvm] Re: Clustered snapshots

Federico Simoncelli federico.simoncelli at gmail.com
Tue Oct 14 16:18:20 UTC 2008

On Tue, Oct 14, 2008 at 10:12 AM, Federico Simoncelli
<federico.simoncelli at gmail.com> wrote:
> 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;
> }
> 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.
I'm not sure if my work is enough to prevent wrong behaviours but in
my tests worked ok.
The same patch should be applied both on the lvm2 and the lvm2-cluster
rpm packages in order to work.
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

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?

Thanks in advance,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-2_02_34-fix-exclsnap.patch
Type: application/octet-stream
Size: 1652 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20081014/27dc90a6/attachment.obj>

More information about the linux-lvm mailing list