All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] lvm on a share environnement (SAN inside)
@ 2007-09-27 13:50 hubert chomette
  2007-09-27 17:36 ` Chris Cox
  0 siblings, 1 reply; 8+ messages in thread
From: hubert chomette @ 2007-09-27 13:50 UTC (permalink / raw)
  To: linux-lvm

Hi,
I recently install a SAN at my work. One lun is used for XEN and can  
be used by two xen server.
For more flexibility I use lvm on this lun. I was very happy of the  
result, unless I discover (during a conversation with a friend) that  
lvm metadata can be compromised if the two server simulty modify  
metadata.
- So what can I do?
- Is it possible to allow LVM metadata modification by only one server?
- should I use clvm instead?
- Is it possible to migrate lvm to clvm without any data lost?

thank's for your help

regards,

ps: sorry for my poor english

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm on a share environnement (SAN inside)
  2007-09-27 13:50 [linux-lvm] lvm on a share environnement (SAN inside) hubert chomette
@ 2007-09-27 17:36 ` Chris Cox
  2007-09-27 19:01   ` hubert chomette
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Cox @ 2007-09-27 17:36 UTC (permalink / raw)
  To: LVM general discussion and development

hubert chomette wrote:
> Hi,
> I recently install a SAN at my work. One lun is used for XEN and can be
> used by two xen server.
> For more flexibility I use lvm on this lun. I was very happy of the
> result, unless I discover (during a conversation with a friend) that lvm
> metadata can be compromised if the two server simulty modify metadata.
> - So what can I do?

Use seperate LUNs.  I'm not sure what your friend is talking about.
Unless you have two machines using the same LUN, in which case
there are issues... this would be a cluster filesystem issue, or
near-high availability issue...

> - Is it possible to allow LVM metadata modification by only one server?
> - should I use clvm instead?

Metadata won't creep outside of what is visible.

> - Is it possible to migrate lvm to clvm without any data lost?

Not sure.

> 
> thank's for your help
> 
> regards,
> 
> ps: sorry for my poor english
> 
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 


-- 
Chris Cox
Sr. Unix Sys Admin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm on a share environnement (SAN inside)
  2007-09-27 17:36 ` Chris Cox
@ 2007-09-27 19:01   ` hubert chomette
  2007-09-27 21:12     ` Chris Cox
  2007-09-28  7:12     ` David Robinson
  0 siblings, 2 replies; 8+ messages in thread
From: hubert chomette @ 2007-09-27 19:01 UTC (permalink / raw)
  To: LVM general discussion and development

the two machine use the same lun, on this lun, there is one vg with a  
logical volume by virtual machine (10 virtual machine).
The idea is if one xen is down, the other can launch the virtual  
machine ad continu service.

Le 27 sept. 07 � 19:36, Chris Cox a �crit :

> hubert chomette wrote:
>> Hi,
>> I recently install a SAN at my work. One lun is used for XEN and  
>> can be
>> used by two xen server.
>> For more flexibility I use lvm on this lun. I was very happy of the
>> result, unless I discover (during a conversation with a friend)  
>> that lvm
>> metadata can be compromised if the two server simulty modify  
>> metadata.
>> - So what can I do?
>
> Use seperate LUNs.  I'm not sure what your friend is talking about.
> Unless you have two machines using the same LUN, in which case
> there are issues... this would be a cluster filesystem issue, or
> near-high availability issue...
>
>> - Is it possible to allow LVM metadata modification by only one  
>> server?
>> - should I use clvm instead?
>
> Metadata won't creep outside of what is visible.
>
>> - Is it possible to migrate lvm to clvm without any data lost?
>
> Not sure.
>
>>
>> thank's for your help
>>
>> regards,
>>
>> ps: sorry for my poor english
>>
>>
>>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>
>
> -- 
> Chris Cox
> Sr. Unix Sys Admin
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm on a share environnement (SAN inside)
  2007-09-27 19:01   ` hubert chomette
@ 2007-09-27 21:12     ` Chris Cox
  2007-09-28  0:18       ` hubert chomette
  2007-09-28  7:12     ` David Robinson
  1 sibling, 1 reply; 8+ messages in thread
From: Chris Cox @ 2007-09-27 21:12 UTC (permalink / raw)
  To: LVM general discussion and development

hubert chomette wrote:
> the two machine use the same lun, on this lun, there is one vg with a
> logical volume by virtual machine (10 virtual machine).
> The idea is if one xen is down, the other can launch the virtual machine
> ad continu service.

Ok..  so the psedo HA model I mentioned.  Access to the LUN isn't live
(in concept) but only becomes available to the failover system when
the primary system fails.

Nothing wrong with this.  Remember, that when you disconnect
a LUN and reconnect it to a new host that it will scan what is
out there.  The difficulty would be for hardcoded names of
volumes, etc, if you changed those things while the secondary
system is in charge (same issue with the config on the secondary
when the primary is in charge).

 You might be able to do something
with auto discovery and a script rather than with fstab with
regards to bring LUN LVM filesystem back online.  That's probably
how I'd do it... That way, you can at least take a good stab
of making sense of the LVM when it comes online.


> 
> Le 27 sept. 07 � 19:36, Chris Cox a �crit :
> 
>> hubert chomette wrote:
>>> Hi,
>>> I recently install a SAN at my work. One lun is used for XEN and can be
>>> used by two xen server.
>>> For more flexibility I use lvm on this lun. I was very happy of the
>>> result, unless I discover (during a conversation with a friend) that lvm
>>> metadata can be compromised if the two server simulty modify metadata.
>>> - So what can I do?
>>
>> Use seperate LUNs.  I'm not sure what your friend is talking about.
>> Unless you have two machines using the same LUN, in which case
>> there are issues... this would be a cluster filesystem issue, or
>> near-high availability issue...
>>
>>> - Is it possible to allow LVM metadata modification by only one server?
>>> - should I use clvm instead?
>>
>> Metadata won't creep outside of what is visible.
>>
>>> - Is it possible to migrate lvm to clvm without any data lost?
>>
>> Not sure.
>>
>>>
>>> thank's for your help
>>>
>>> regards,
>>>
>>> ps: sorry for my poor english
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> linux-lvm mailing list
>>> linux-lvm@redhat.com
>>> https://www.redhat.com/mailman/listinfo/linux-lvm
>>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>>
>>
>>
>> -- 
>> Chris Cox
>> Sr. Unix Sys Admin
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 


-- 
Chris Cox
Sr. Unix Sys Admin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm on a share environnement (SAN inside)
  2007-09-27 21:12     ` Chris Cox
@ 2007-09-28  0:18       ` hubert chomette
  2007-09-28 15:50         ` Chris Cox
  0 siblings, 1 reply; 8+ messages in thread
From: hubert chomette @ 2007-09-28  0:18 UTC (permalink / raw)
  To: LVM general discussion and development

but the vg can be accessed by the two host.
For example:
on xen1, there is vm1, vm2, vm3 and vm4  access from SAN by /dev/ 
domU_VG/vm{1,2,3,4}-disk
on xen2, there is vm5, vm6, vm7 and vm8  access from SAN by /dev/ 
domU_VG/vm{5,6,7,8}-disk

If xen1 comes down, vm1,vm2,vm3 and vm4 are reload (manually or by  
script) on xen2
If there is intendance task on xen2, simply migrate vm{5,6,7,8} on xen1

There is no filesystem access simulty but the same vg is seen by the  
two host.

thank's for your help ;)





Le 27 sept. 07 � 23:12, Chris Cox a �crit :

> hubert chomette wrote:
>> the two machine use the same lun, on this lun, there is one vg with a
>> logical volume by virtual machine (10 virtual machine).
>> The idea is if one xen is down, the other can launch the virtual  
>> machine
>> ad continu service.
>
> Ok..  so the psedo HA model I mentioned.  Access to the LUN isn't live
> (in concept) but only becomes available to the failover system when
> the primary system fails.
>
> Nothing wrong with this.  Remember, that when you disconnect
> a LUN and reconnect it to a new host that it will scan what is
> out there.  The difficulty would be for hardcoded names of
> volumes, etc, if you changed those things while the secondary
> system is in charge (same issue with the config on the secondary
> when the primary is in charge).
>
>  You might be able to do something
> with auto discovery and a script rather than with fstab with
> regards to bring LUN LVM filesystem back online.  That's probably
> how I'd do it... That way, you can at least take a good stab
> of making sense of the LVM when it comes online.
>
>
>>
>> Le 27 sept. 07 � 19:36, Chris Cox a �crit :
>>
>>> hubert chomette wrote:
>>>> Hi,
>>>> I recently install a SAN at my work. One lun is used for XEN and  
>>>> can be
>>>> used by two xen server.
>>>> For more flexibility I use lvm on this lun. I was very happy of the
>>>> result, unless I discover (during a conversation with a friend)  
>>>> that lvm
>>>> metadata can be compromised if the two server simulty modify  
>>>> metadata.
>>>> - So what can I do?
>>>
>>> Use seperate LUNs.  I'm not sure what your friend is talking about.
>>> Unless you have two machines using the same LUN, in which case
>>> there are issues... this would be a cluster filesystem issue, or
>>> near-high availability issue...
>>>
>>>> - Is it possible to allow LVM metadata modification by only one  
>>>> server?
>>>> - should I use clvm instead?
>>>
>>> Metadata won't creep outside of what is visible.
>>>
>>>> - Is it possible to migrate lvm to clvm without any data lost?
>>>
>>> Not sure.
>>>
>>>>
>>>> thank's for your help
>>>>
>>>> regards,
>>>>
>>>> ps: sorry for my poor english
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> linux-lvm mailing list
>>>> linux-lvm@redhat.com
>>>> https://www.redhat.com/mailman/listinfo/linux-lvm
>>>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>>>
>>>
>>>
>>> -- 
>>> Chris Cox
>>> Sr. Unix Sys Admin
>>>
>>> _______________________________________________
>>> linux-lvm mailing list
>>> linux-lvm@redhat.com
>>> https://www.redhat.com/mailman/listinfo/linux-lvm
>>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>>
>>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>
>
> -- 
> Chris Cox
> Sr. Unix Sys Admin
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm on a share environnement (SAN inside)
  2007-09-27 19:01   ` hubert chomette
  2007-09-27 21:12     ` Chris Cox
@ 2007-09-28  7:12     ` David Robinson
  2007-10-02 10:11       ` hubert chomette
  1 sibling, 1 reply; 8+ messages in thread
From: David Robinson @ 2007-09-28  7:12 UTC (permalink / raw)
  To: LVM general discussion and development

hubert chomette wrote:
> the two machine use the same lun, on this lun, there is one vg with a 
> logical volume by virtual machine (10 virtual machine).
> The idea is if one xen is down, the other can launch the virtual machine 
> ad continu service.

So its a high-availability cluster...

>>> - Is it possible to allow LVM metadata modification by only one server?
>>> - should I use clvm instead?

The link below describes what can happen.

http://www.tldp.org/HOWTO/LVM-HOWTO/sharinglvm1.html

It sounds like you should be using CLVM. CLVM extends LVM2 to provide 
cluster-wide management of Logical Volumes. LVM and CLVM are essentially 
the same thing, but CLVM is cluster aware, LVM is not.

Alasdair has some presentations which describe CLVM in detail here:

http://people.redhat.com/agk/talks/CLVM-UKUUG2007/

>>> - Is it possible to migrate lvm to clvm without any data lost?

There's no migration involved, you just need to enable cluster locking 
for the shared volume group.

eg: vgchange -c y VolumeGroupName

--Dave

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm on a share environnement (SAN inside)
  2007-09-28  0:18       ` hubert chomette
@ 2007-09-28 15:50         ` Chris Cox
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Cox @ 2007-09-28 15:50 UTC (permalink / raw)
  To: LVM general discussion and development

hubert chomette wrote:
> but the vg can be accessed by the two host.
> For example:
> on xen1, there is vm1, vm2, vm3 and vm4  access from SAN by
> /dev/domU_VG/vm{1,2,3,4}-disk
> on xen2, there is vm5, vm6, vm7 and vm8  access from SAN by
> /dev/domU_VG/vm{5,6,7,8}-disk
> 
> If xen1 comes down, vm1,vm2,vm3 and vm4 are reload (manually or by
> script) on xen2
> If there is intendance task on xen2, simply migrate vm{5,6,7,8} on xen1
> 
> There is no filesystem access simulty but the same vg is seen by the two
> host.

There's NO need for the visibility until the heart beat fails and you
make the cutover decision.  Don't make the vg active.  Have your
up/down scripts for failover and restore leave the vg inactive until
it's confirmed that it's safe and desired to bring it up on
the host.

Alternatively, use something cluster aware (if you want truer... but
not necessarily more reliable HA).

> 
> thank's for your help ;)
> 
> 
> 
> 
> 
> Le 27 sept. 07 � 23:12, Chris Cox a �crit :
> 
>> hubert chomette wrote:
>>> the two machine use the same lun, on this lun, there is one vg with a
>>> logical volume by virtual machine (10 virtual machine).
>>> The idea is if one xen is down, the other can launch the virtual machine
>>> ad continu service.
>>
>> Ok..  so the psedo HA model I mentioned.  Access to the LUN isn't live
>> (in concept) but only becomes available to the failover system when
>> the primary system fails.
>>
>> Nothing wrong with this.  Remember, that when you disconnect
>> a LUN and reconnect it to a new host that it will scan what is
>> out there.  The difficulty would be for hardcoded names of
>> volumes, etc, if you changed those things while the secondary
>> system is in charge (same issue with the config on the secondary
>> when the primary is in charge).
>>
>>  You might be able to do something
>> with auto discovery and a script rather than with fstab with
>> regards to bring LUN LVM filesystem back online.  That's probably
>> how I'd do it... That way, you can at least take a good stab
>> of making sense of the LVM when it comes online.
>>
>>
>>>
>>> Le 27 sept. 07 � 19:36, Chris Cox a �crit :
>>>
>>>> hubert chomette wrote:
>>>>> Hi,
>>>>> I recently install a SAN at my work. One lun is used for XEN and
>>>>> can be
>>>>> used by two xen server.
>>>>> For more flexibility I use lvm on this lun. I was very happy of the
>>>>> result, unless I discover (during a conversation with a friend)
>>>>> that lvm
>>>>> metadata can be compromised if the two server simulty modify metadata.
>>>>> - So what can I do?
>>>>
>>>> Use seperate LUNs.  I'm not sure what your friend is talking about.
>>>> Unless you have two machines using the same LUN, in which case
>>>> there are issues... this would be a cluster filesystem issue, or
>>>> near-high availability issue...
>>>>
>>>>> - Is it possible to allow LVM metadata modification by only one
>>>>> server?
>>>>> - should I use clvm instead?
>>>>
>>>> Metadata won't creep outside of what is visible.
>>>>
>>>>> - Is it possible to migrate lvm to clvm without any data lost?
>>>>
>>>> Not sure.
>>>>
>>>>>
>>>>> thank's for your help
>>>>>
>>>>> regards,
>>>>>
>>>>> ps: sorry for my poor english
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> linux-lvm mailing list
>>>>> linux-lvm@redhat.com
>>>>> https://www.redhat.com/mailman/listinfo/linux-lvm
>>>>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>>>>
>>>>
>>>>
>>>> -- 
>>>> Chris Cox
>>>> Sr. Unix Sys Admin
>>>>
>>>> _______________________________________________
>>>> linux-lvm mailing list
>>>> linux-lvm@redhat.com
>>>> https://www.redhat.com/mailman/listinfo/linux-lvm
>>>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>>>
>>>
>>>
>>> _______________________________________________
>>> linux-lvm mailing list
>>> linux-lvm@redhat.com
>>> https://www.redhat.com/mailman/listinfo/linux-lvm
>>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>>
>>
>>
>> -- 
>> Chris Cox
>> Sr. Unix Sys Admin
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 


-- 
Chris Cox
Sr. Unix Sys Admin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm on a share environnement (SAN inside)
  2007-09-28  7:12     ` David Robinson
@ 2007-10-02 10:11       ` hubert chomette
  0 siblings, 0 replies; 8+ messages in thread
From: hubert chomette @ 2007-10-02 10:11 UTC (permalink / raw)
  To: LVM general discussion and development

ok
thank's for the information
I'll try.

regards,

Le 28 sept. 07 � 09:12, David Robinson a �crit :

> hubert chomette wrote:
>> the two machine use the same lun, on this lun, there is one vg  
>> with a logical volume by virtual machine (10 virtual machine).
>> The idea is if one xen is down, the other can launch the virtual  
>> machine ad continu service.
>
> So its a high-availability cluster...
>
>>>> - Is it possible to allow LVM metadata modification by only one  
>>>> server?
>>>> - should I use clvm instead?
>
> The link below describes what can happen.
>
> http://www.tldp.org/HOWTO/LVM-HOWTO/sharinglvm1.html
>
> It sounds like you should be using CLVM. CLVM extends LVM2 to  
> provide cluster-wide management of Logical Volumes. LVM and CLVM  
> are essentially the same thing, but CLVM is cluster aware, LVM is not.
>
> Alasdair has some presentations which describe CLVM in detail here:
>
> http://people.redhat.com/agk/talks/CLVM-UKUUG2007/
>
>>>> - Is it possible to migrate lvm to clvm without any data lost?
>
> There's no migration involved, you just need to enable cluster  
> locking for the shared volume group.
>
> eg: vgchange -c y VolumeGroupName
>
> --Dave
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-10-02 10:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-27 13:50 [linux-lvm] lvm on a share environnement (SAN inside) hubert chomette
2007-09-27 17:36 ` Chris Cox
2007-09-27 19:01   ` hubert chomette
2007-09-27 21:12     ` Chris Cox
2007-09-28  0:18       ` hubert chomette
2007-09-28 15:50         ` Chris Cox
2007-09-28  7:12     ` David Robinson
2007-10-02 10:11       ` hubert chomette

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.