[Users] Basic questions about ploop snapshotting

Roman Haefeli reduzent at gmail.com
Sat Oct 18 12:45:31 PDT 2014


On Don, 2014-10-16 at 16:38 -0600, Scott Dowdle wrote:
> Greetings,
> 
> ----- Original Message -----
> > I think I'm having some brainfart moment on how snapshots really
> > function.
> 
> Ok, I played with it... and I *THINK* I understand it now.
> 
> Your first snapshot is like a base... and you have to have additional
> snapshots above your base... or you can't rollbackup.
> 
> So, if the correct way to do what I wanted to do is:
> 
> vzctl snapshot {ctid} --skip-suspend --skip-config --name base
>  (a snapshot named base gets created)
> 
> Now I can make second snapshot to work on:
> vzctl snapshot {ctid} --skip-suspend --skip-config --name zimbra806
>  (a second snapshot named zimbra806 is created)
> 
> Now I can do my upgrade attempt...
> If it doesn't go well, I would want to:
>   vzctl snapshot-switch {ctid} --id {id-for-base}
> That would switch it to the base and zimbra 806 would be inactive and
> I could then:
>   vzctl snapshot-delete {ctid} --id {id-for-zimbra806}
>   That deletes the snapshot named zimbra806 *WITHOUT* merging down.
> 
> If the upgrade *DOES* go well... and I want to make the active
> snapshot my new base I can:
> (assuming the active snapshot is zimbra806 and I didn't switch back to
> base)
>   vzctl snapshot-delete {ctid} --id {id-for-zimbra806}
> That would merge down the data from zimbra806 to base before deleting
> zimbra806.
> 
> One thing to note about deleting snapshots... if you want to delete a
> snapshot *WITHOUT* merging data down... it has to be inactive without
> any other snapshot depending on it.  If you try to delete a snapshot
> that is active or has other snapshots depending in it... it will merge
> down before deleting.
> 
> Is that correct?  That's how it appears to work to me.  You *REALLY*
> have to know what you are doing to get the desired results.

I'm not quite following all of your statements. Specifically, I don't
see why you think you need a base AND a first snapshot. One snapshot is
sufficient for later restoring. Also, I don't think you need to
understand the underlying architecture in order to successfully use
snapshots (it might be helpful or interesting, but not really
necessary). The command 'snapshot-switch' reliably restores the state of
the CT it had at the time when you created the snapshot. It's as simple
as that. Also, when deleting snapshots, vzctl auto-magically does the
right thing in that it merges or deletes when it is appropriate without
affecting the other snapshots of the given container.

> I do have a separate question... and that is... when working with
> OpenVZ and snapshots I've been using the vzctl command's snapshot
> features and have *NOT* tried using the ploop command directly.  The
> ploop command does have a snapshot-merge parameter whereas vzctl
> doesn't.  I'm not sure if it is recommended to use the ploop command
> directly.  I think I'll stick with using vzctl as the interface to
> ploop snapshots.  Oh, I forgot to put a question in there.  Hmmm, I
> guess my question is:
> 
> When dealing with ploop-based OpenVZ containers... is it recommended
> to use vzctl as the ploop interface and avoid the ploop command... or
> is it ok to ploop directly?  The idea of using the ploop command
> directly is scary to me for some reason.

I haven't played around with the ploop commands, but I suppose their
focus is really only on the storage, i.e. the ploop image, while vzctl
deals with config, ram dump and storage at the same time. When dealing
with containers, it seems to me vzctl is the more appropriate front-end

Roman
 





More information about the Users mailing list