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

[Linux-cluster] Creating clustered LVM snapshots, locking and exclusivity



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?


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