<div dir="ltr">On Tue, Apr 2, 2013 at 7:37 PM, Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">Quoting Fajar A. Nugraha (<a href="mailto:list@fajar.net">list@fajar.net</a>):<br>

</div></div><div class="im"></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">
> If your changes are NOT kernel-related, then the easy way is if the root<br>
> filesystem is on a snapshot/clone-capable fs (e.g. btrfs,zfs). Otherwise<br>
> just use plain tar/rsync/whatever to copy the filesystem. I do NOT<br>
> recommend using LVM snapshot as (from experience) it's more hassle than<br>
> what it's worthed.<br>
<br>
</div>Hi Fajar,<br>
<br>
what do you mean?  Apart from the fact that my systems tend to not start<br>
out with a spare partition to into a PV :) I've not had trouble.<br>
<br></blockquote><div><br></div><div>Last time I check, you need to estimate how much space the snapshot will occupy, and you need to keep monitoring its usage so it never goes full. If the origin LV had lots of writes after the snapshot is created, the allocated snapshot space will fill up making the snapshot full and invalidated. At that time it's pretty much good-bye-data-in-the-snapshot.<br>
</div><div><br></div><div style>This is different from btrfs and zfs, where you don't need to pre-allocate dedicated space for snapshot. Worst-case scenario on a disk full, new writes will be rejected, but old data will remain intact.<br>
</div><div style><br></div><div style>  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Since I'm getting ready to implement clone in the C api, if you're<br>
having trouble I'd like to make sure I fix it while I'm doing so.<br>
<br></blockquote><div><br></div><div style>It depends on the usage. Support for LVM snapshots in lxc-clone is great for testing purposes, but personally I think it should come with a big "WARNING: always make sure you have enough space reserved for the snapshot, otherwise you may lose data".</div>
<div style><br></div><div style>-- <br></div><div style>Fajar</div></div></div></div>