Creating clustered LVM snapshots, locking and exclusivity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I want to get clustered LV snapshotting working. I was under the impression it was simply a matter of disabling the LV on the other node (2-node cluster here). However, this fails because of locking issues.

I can change the peer node's LV to 'inactive' with (confirmed with lvscan):

[root@an-c05n01 ~]# lvchange -aln /dev/an-c05n02_vg0/vm01-rhel2_0
[root@an-c05n01 ~]# lvscan

  inactive          '/dev/an-c05n02_vg0/vm01-rhel2_0' [50.00 GiB] inherit

  But I still can't create snapshot on the other node running the VM:

[root@an-c05n02 ~]# lvcreate -L 25GiB --snapshot -n vm01-rhel2_0_snapshot /dev/an-c05n02_vg0/vm01-rhel2_0
  vm01-rhel2_0 must be active exclusively to create snapshot

So I try to set it exclusive:

[root@an-c05n02 ~]# lvchange -aey /dev/an-c05n02_vg0/vm01-rhel2_0
  Error locking on node an-c05n02.alteeve.ca: Device or resource busy

If I stop the VM running on the LV, then I can set the exclusive lock, boot the VM and later create the snapshot fine:

[root@an-c05n02 ~]# lvcreate -L 25GiB --snapshot -n vm01-rhel2_0_snapshot /dev/an-c05n02_vg0/vm01-rhel2_0
  Logical volume "vm01-rhel2_0_snapshot" created

But then later, I can't remove the exclusive value, so I can't re-active the LV after deleting the snapshot. I have to shut the VM down again in order to remove the exclusive flag.

I'm assuming it's possible to snapshot clustered LVs while they're in use, without stopping what is using them twice... Can someone help clarify what the magical incantation is?

Thanks!

--
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without access to education?

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster




[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux