Restore of VPS with mounted logical volume (LVM) [message #38318] |
Sun, 06 December 2009 00:51 |
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!
|
|
|