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

[Xen-users] Re: iSCSI and LVM



"James Harper" <james.harper@xxxxxxxxxxxxxxxx> writes:

>> "James Harper" <james.harper@xxxxxxxxxxxxxxxx> writes:
>> 
>>>> You can use live migration in such setup, even safely if you back
>>>> it by clvm.  You can even live without clvm if you deactivate your
>>>> VG on all but a single dom0 before changing the LVM metadata in any
>>>> way.  A non-clustered VG being active on multiple dom0s isn't a
>>>> problem in itself and makes live migration possible, but you'd
>>>> better understand what you're doing.
>>>
>>> You can't snapshot though. I tried that once years ago and it made a
>>> horrible mess.
>> 
>> Even if done after deactivating the VG on all but a single node?
>> That would be a bug.  According to my understanding, it should work.
>> I never tried, though, as snapshotting isn't my preferred way of
>> making backups.  On the other hand I run domUs on snapshots of local
>> LVs without any problem.  And an LV being "local" is a concept beyond
>> LVM in the above setting, so it can't matter...
>
> A snapshot is copy-on-write. Every time the 'source' is written to, a
> copy of the original block is saved to the snapshot (I may have that the
> wrong way around).

It's a little bit more complicated, but the basic idea is this.

> Doing that though involves a remapping of the snapshot every time the
> source is written to (eg block x isn't in the 'source' anymore, so
> storage is allocated to it etc) which involves a metadata update.

No, operation of the snapshot doesn't involve continuous *LVM* metadata
updates, even though the chunk mapping is really metadata with respect
to the block devices themselves.

> So if the VG remained deactivated on all nodes for the life of the
> snapshot then it may work, and maybe this is what you meant in which
> case you are correct.

Yes, I didn't elaborate, but this is my advice.

> If the activated the VG on the other nodes after creating the snapshot
> though, then problems may (will) arise!

Only if you access data in the same LV from different hosts (metadata
updates are also excluded, of course).  From this point of view, the
origin and the snapshot LVs (and the cow device) must be considered the
"same" LV.  Basically, this is why clvm does not support snapshots.  And
of course I didn't consider cluster filesystems and similar above.

I think we're pretty much on the same page.
-- 
Regards,
Feri.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.