OpenVZ Forum


Home » General » Support » Restore of VPS with mounted logical volume (LVM) (Error: undump failed: No such file or directory)
Restore of VPS with mounted logical volume (LVM) [message #38318] Sun, 06 December 2009 00:51 Go to next message
Leandro Anthonioz is currently offline  Leandro Anthonioz
Messages: 5
Registered: May 2008
Junior Member
Hi, I'm using OpenVz in Debian Lenny, kernel 2.6.26-2-openvz-686 and I have a problem with checkpointing/restore functionality. Maybe somebody can help me.

I create a VPS and a LVM logical volume. Then, I put the logical volume inside VPS, format it and mount it. Then, I do a VPS checkpoint, ok. When I attempt to restore VPS, i have an error "Error: undump failed: No such file or directory". If I unmount the volume BEFORE checkpoint VPS, restore works ok, but I need restore VPS with volume ALREADY mounted.

This is exactly what I do:

# Create a new VPS and a new LVM logical volume
vzctl create 100
lvcreate --size 1G --name vol-new /dev/vg0

# "Put" the logical volume inside VPS
vzctl set 100 --devnodes vg0/vol-new:rw --save

# Enter to VPS
vzctl start 100
vzctl enter 100

# Format logical volume, mount it and save a file
mkfs -t ext3 /dev/vg0/vol-new
mkdir /mnt/volume
mount /dev/vg0/vol-new /mnt/volume
nano /mnt/volume/Hello.txt

# Exit to HN
exit

# Checkpoint VPS
vzctl chkpnt 100 --suspend
vzctl chkpnt 100 --dump --dumpfile /vz/dump/100.dump
vzctl chkpnt 100 --kill

# Attempt to restore VPS (in same HN)
vzctl restore 100 --undump --dumpfile /vz/dump/100.dump

# Last command output:

Restoring VE ...
Starting VE ...
VE is mounted
undump...
Setting CPU units: 1000
Setting devices
Configure meminfo: 65536
Error: undump failed: No such file or directory
Restoring failed:
Error: -2 mounting /mnt/volume ext3 40000000
Error: rst_namespace: -2
VE start failed
Stopping VE ...
VE was stopped
VE is unmounted

I was reading about mount scripts (100.mount), but I couldn't solve this problem. What is wrong?

Any help will be very appreciate it. Thank you!

Re: Restore of VPS with mounted logical volume (LVM) [message #38400 is a reply to message #38318] Tue, 15 December 2009 02:21 Go to previous messageGo to next message
Leandro Anthonioz is currently offline  Leandro Anthonioz
Messages: 5
Registered: May 2008
Junior Member

Hi all, I still can not solve this problem. Do you think maybe this is a bug? Anybody have experience dumping and restoring VPS with mounted LVM volumes? In that case, could you please post an example of <VID>.mount file? Thanks in advance!

Re: Restore of VPS with mounted logical volume (LVM) [message #38897 is a reply to message #38318] Wed, 17 February 2010 01:44 Go to previous messageGo to next message
Leandro Anthonioz is currently offline  Leandro Anthonioz
Messages: 5
Registered: May 2008
Junior Member
Hi all, I still cann't solve this problem. I download vzctl source code and debug it with gdb and DDD, but code is difficult to interpret for me (I'm not a kernel hacker ;D).

After that, I use strace and found this:

----------------------
stat64("/etc/vz/conf/100.start", 0xbfc83f74) = -1 ENOENT (No such file or directory)
close(10) = 0
read(11, Error: undump failed: No such file or directory
Restoring failed:
Error: -2 mounting /mnt/volume ext3 40000000
Error: rst_namespace: -2
----------------------

According first line, seems that vzctl needs (in this case) a start script (100.start), but I cann't understand why. Well, I wrote 100.start script without any code (only "#!/bin/bash" and an "echo" command) an next attempt to do restore, I get this:

----------------------
Restoring VE ...
Starting VE ...
VE is mounted
undump...
Setting CPU units: 1000
Setting devices
Configure meminfo: 65536
VE start failed
Stopping VE ...
get context...
VE was stopped
VE is unmounted
----------------------

After create 100.start script, error "No such file or directory" disappears. However, I cann't restore VPS yet. What code I need write in 100.start script?

Any help will be greatly appreciated. Thank you very much!
Re: Restore of VPS with mounted logical volume (LVM) [message #38926 is a reply to message #38897] Sat, 20 February 2010 10:52 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello Leandro,

first of all, thank you very much for such a descriptive report.
I filed a bug. Please, refer to http://bugzilla.openvz.org/show_bug.cgi?id=1436
Re: Restore of VPS with mounted logical volume (LVM) [message #38934 is a reply to message #38926] Sat, 20 February 2010 20:16 Go to previous message
Leandro Anthonioz is currently offline  Leandro Anthonioz
Messages: 5
Registered: May 2008
Junior Member
Hi Marat! Thank you very much for make the bug report!

If you need some other information (vzctl version, etc), please tell me.

Best regards,

Leandro.
Previous Topic: netdev_add Operation not permitted
Next Topic: Install kvm with openvz like Proxmox
Goto Forum:
  


Current Time: Tue Sep 10 04:52:53 GMT 2024

Total time taken to generate the page: 0.04487 seconds