On 15 July 2013 05:29, Benjamin Henrion <span dir="ltr">&lt;<a href="mailto:bh@udev.org" target="_blank">bh@udev.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
Any idea how to ignore &quot;Dump file /vz/dump/Dump.3030 exists, trying to<br>
restore from it&quot;?<br></blockquote><div><br></div><div>Well, it is ignored. As you can see below, vzctl start found the dump file and tried restoring</div><div>from it (instead of starting from scratch). Since restoring failed, vzctl started the container</div>
<div>in a usual manner.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
If I do not set the avlue DUMPDIR in /etc/vz/vz.conf, does it ignores<br>
this dump file?<br></blockquote><div><br></div><div>No, in this case a built-in dumpdir value is used as far as I remember.</div><div>Check the sources to find out for sure.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
I had to remove the file by hand to rescue my vz.<br></blockquote><div><br></div><div>What do you mean? As I explained above (and as you can see below) container</div><div>is still started, with vzctl start ignoring the unsuccessful restore attempt.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
* 14:22 root@hn /vz/dump# vzctl restart 3030<br>
Restarting container<br>
Stopping container ...<br>
Container was stopped<br>
Container is unmounted<br>
Dump file /vz/dump/Dump.3030 exists, trying to restore from it<br>
Restoring container ...<br>
Container is mounted<br>
        undump...<br>
Setting CPU units: 1000<br>
Setting CPUs: 16<br>
Configure veth devices: veth303.1 veth303.0 veth303.2<br>
Adding interface veth303.1 to bridge vzbr0 on CT0 for CT3030<br>
Adding interface veth303.0 to bridge vzbr0 on CT0 for CT3030<br>
Adding interface veth303.2 to bridge vzbr0 on CT0 for CT3030<br>
Error: undump failed: No such file or directory<br>
Restoring failed:<br>
Error: rst_open_file: failed to lookup path &#39;/var/nagios/nagios.lock&#39;: -2<br>
Error: can&#39;t open file /var/nagios/nagios.lock<br>
Error: rst_file: -2 753032<br>
Error: rst_files: -2<br>
Error: make_baby: -2<br>
Error: rst_clone_children<br>
Error: make_baby: -2<br>
Error: rst_clone_children<br>
Container restore failed<br>
Starting container...<br>
Setting CPU units: 1000<br>
Setting CPUs: 16<br>
Configure veth devices: veth303.1 veth303.0 veth303.2<br>
Adding interface veth303.1 to bridge vzbr0 on CT0 for CT3030<br>
Adding interface veth303.0 to bridge vzbr0 on CT0 for CT3030<br>
Adding interface veth303.2 to bridge vzbr0 on CT0 for CT3030<br>
Container start in progress...<br>
<br>
* 14:23 root@hn /vz/dump# rm /vz/dump/Dump.3030<br>
<br>
* 14:24 root@hn /vz/dump# vzctl restart 3030<br>
Restarting container<br>
Stopping container ...<br>
Container was stopped<br>
Container is unmounted<br>
Starting container...<br>
Container is mounted<br>
Setting CPU units: 1000<br>
Setting CPUs: 16<br>
Configure veth devices: veth303.1 veth303.0 veth303.2<br>
Adding interface veth303.1 to bridge vzbr0 on CT0 for CT3030<br>
Adding interface veth303.0 to bridge vzbr0 on CT0 for CT3030<br>
Adding interface veth303.2 to bridge vzbr0 on CT0 for CT3030<br>
Container start in progress...<br>
<br>
* 14:24 root@hn-a231 /vz/dump#<br></blockquote><div><br></div><div><br></div><div>Which vzctl version is that? (Yes, please, whenever you are talking about vzctl, specify its version)</div><div><br></div><div>I remember that some recent version deletes a dump file on start in any case, because:</div>
<div> - if a container is restored from that file, it is no longer needed;</div><div> - if a container can&#39;t be restored from that file, it is a bad file.</div><div><br></div><div>This functionality appears in vzctl 4.3, as noted in its changelog:</div>
<div><br></div><div><div>&gt; vzctl start: remove dumpfile on successful start</div></div><div><br>For the reference, the git commit in question is this one:</div><div> <a href="http://git.openvz.org/?p=vzctl;a=commitdiff;h=eca2ff0">http://git.openvz.org/?p=vzctl;a=commitdiff;h=eca2ff0</a></div>
<div><br></div>
</div>