[linux-lvm] Clustered snapshots
Federico Simoncelli
federico.simoncelli at gmail.com
Tue Oct 14 08:12:54 UTC 2008
Hi all,
I'm trying to use the snapshot feature in a cluster environment but
I keep getting this error:
# lvcreate --size 100M --snapshot --name snap /dev/vg00/lvol1
Clustered snapshots are not yet supported.
Reading the documentation:
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Cluster_Logical_Volume_Manager/snapshot_command.html
"LVM snapshots are not cluster-aware, so they require exclusive access
to a volume. For information on activating logical volumes on
individual nodes in a cluster, see Section 4.8, Activating Logical
Volumes on Individual Nodes in a Cluster."
"To activate logical volumes exclusively on one node, use the lvchange
-aey command."
I followed the instructions above but I get the same result:
# lvchange -aey /dev/vg00/lvol1
# lvcreate --size 100M --snapshot --name snap /dev/vg00/lvol1
Clustered snapshots are not yet supported.
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?
As a matter of fact I've been able to create a snapshot removing the
cluster flag from the volume group:
# vgchange -cn VolGroup01
Volume group "VolGroup01" successfully changed
# lvcreate --size 100M --snapshot --name snap /dev/vg00/lvol1
Logical volume "snap" created
What problem can arise meanwhile the cluster flag is disabled?
Should I just avoid any change to the volume group (lvcreate,
lvextend, etc...) or it might lead to really bad behaviours in any
way?
Thanks in advance,
--
Federico.
More information about the linux-lvm
mailing list