[ClusterLabs] snapshots in a clvm environment - some questions for proceeding

Digimer lists at alteeve.ca
Fri Feb 24 13:20:09 EST 2017


On 24/02/17 01:00 PM, Lentes, Bernd wrote:
> 
> 
> ----- On Feb 24, 2017, at 6:24 PM, Bernd Lentes bernd.lentes at helmholtz-muenchen.de wrote:
> 
>> Hi,
>>
>> we have a two node cluster, our resources are several virtual machines running
>> on kvm. The vm's reside in plain logical volumes, without a filesystem inside
>> the lv's.
>> The lv's reside on a SAN.
>> I know that i can do a snapshot of a lv while having clvm when i acitivate it
>> exclusively on one node. OK.
>> I tried it via lvchange -aly. I got "lvchange Using logical volume(s) on command
>> line. lvchange    Activating logical volume "lv_cluster_01" locally". Seems to
>> work.
>> Then i'm able to take the snapshot. But what is when i'd like to activate the lv
>> cluster-wide again ? Is the snapshot gone or corrupted ?
>> I tried to activate it cluster-wide again with "lvchange -vay". Seems to work
>> too.
>> Because, if i leave it exclusively activated on one note, i loose my high
>> availibilty. How can it migrate to the other host if it is exclusively
>> activated ?
>> How can i find out if a lv is activated exclusively ? How can i find out on
>> which node it is activated exclusively ?
>>
>> Thanks.
>>
> 
> I read https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/cluster_activation.html .
> It seems that a local activation is not an exclusiv one. Ok. I tried "lvchange -vaey" for that lv, but got:
> lvchange    Using logical volume(s) on command line
> lvchange    Activating logical volume "lv_cluster_01" exclusively
> lvchange  Error locking on node 40a86414: Device or resource busy
> 
> I shut down the guest, still the same message.
> 
> Bernd
>  
> 
> Helmholtz Zentrum Muenchen
> Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
> Ingolstaedter Landstr. 1
> 85764 Neuherberg
> www.helmholtz-muenchen.de
> Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
> Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Heinrich Bassler, Dr. Alfons Enhsen
> Registergericht: Amtsgericht Muenchen HRB 6466
> USt-IdNr: DE 129521671

In my experience, you had to inactivate the LVs on both nodes, then
re-activate as exclusive on the one node before you could do snapshots.
This required powering off the guest server.

Aside from this, I strongly recommend against snapshots as a backup
mechanism anyway. There is no way to ensure that that operating system
and applications are in a clean state when you take the snapshot, so
using the image is like recovering from sudden power loss. If data was
in cache but not flushed out, you could have corruption.

If you can't stop your VMs, I'd recommend using a backup application
inside the VM that knows how to ensure that your apps and the OS are in
a clean state, particularly for DBs.

-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould




More information about the Users mailing list