*solved* VPS reboot/destroy [message #22885] |
Wed, 07 November 2007 03:38 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
neto
Messages: 4 Registered: November 2007
|
Junior Member |
|
|
Hi,
I've recently started experimenting OpenVZ and ran into this issue.
On a Debian etch host, running an etch guest when I do a reboot inside a VPS, I can no longer destroy it (or remove the folder).
On a server that has just rebooted, and that has been recently installed with a kernel from download.openvz.org.
/var/lib/vz is a symlink to /vz and /vz is an ext3 partition.
server1:~# uptime
05:30:19 up 2 min, 1 user, load average: 1.34, 0.61, 0.22
server1:~# uname -a
Linux server1 2.6.18-openvz-amd64 #1 SMP Tue Apr 10 19:34:07 MSD 2007 x86_64 GNU/Linux
server1:~# vzctl create 123 --ostemplate debian-4.0-amd64-minimal
Creating VPS private area: /var/lib/vz/private/123
Performing postcreate actions
VPS private area was created
server1:~# vzctl create 124 --ostemplate debian-4.0-amd64-minimal
Creating VPS private area: /var/lib/vz/private/124
Performing postcreate actions
VPS private area was created
server1:~# vzctl start 123
Starting VPS ...
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
server1:~# vzctl start 124
Starting VPS ...
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
server1:~# vzquota show 123
vzquota : (warning) Quota is running, so data reported from quota file may not reflect current values
resource usage softlimit hardlimit grace
1k-blocks 153532 1048576 1153434
inodes 7929 200000 220000
server1:~# vzquota show 124
vzquota : (warning) Quota is running, so data reported from quota file may not reflect current values
resource usage softlimit hardlimit grace
1k-blocks 153532 1048576 1153434
inodes 7929 200000 220000
server1:~# vzctl exec 123 reboot
server1:~# vzlist -a
VPSID NPROC STATUS IP_ADDR HOSTNAME
123 - stopped - -
124 4 running -
I then manually ran both scripts inside /etc/cron.d
/usr/share/vzctl/scripts/vpsnetclean then /usr/share/vzctl/scripts/vpsreboot so that the VPS comes back faster.
server1:~# /usr/share/vzctl/scripts/vpsnetclean
server1:~# /usr/share/vzctl/scripts/vpsreboot
server1:~# vzlist -a
VPSID NPROC STATUS IP_ADDR HOSTNAME
123 4 running -
124 4 running -
server1:~# vzctl exec 123 ps auxw
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 6120 676 ? Ss 16:35 0:00 init [2]
root 9663 0.0 0.0 5884 724 ? Ss 16:35 0:00 /sbin/syslogd
root 9679 0.0 0.1 25840 1228 ? Ss 16:35 0:00 /usr/sbin/sshd
root 9691 0.0 0.0 11496 804 ? Ss 16:35 0:00 /usr/sbin/cron
root 9748 0.0 0.0 8448 936 ? Rs 16:36 0:00 ps auxw
server1:~# vzctl exec 124 ps auxw
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 6120 672 ? Ss 16:32 0:00 init [2]
root 8093 0.0 0.0 5884 724 ? Ss 16:32 0:00 /sbin/syslogd
root 8116 0.0 0.1 25840 1224 ? Ss 16:32 0:00 /usr/sbin/sshd
root 8128 0.0 0.0 11496 808 ? Ss 16:32 0:00 /usr/sbin/cron
root 9751 0.0 0.0 8444 936 ? Rs 16:36 0:00 ps auxw
server1:~# vzctl stop 123
Stopping VPS ...
VPS was stopped
VPS is not mounted
server1:~# vzctl stop 124
Stopping VPS ...
VPS was stopped
VPS is not mounted
server1:~# vzctl destroy 123
Destroying VPS private area: /var/lib/vz/private/123
Can't move /var/lib/vz/private/123 -> /var/lib/vz/tmp/XjdB8l5: Device or resource busy
server1:~# vzctl destroy 124
Destroying VPS private area: /var/lib/vz/private/124
VPS private area was destroyed
A vzctl restart xxx will also do the same.
server1:~# vzctl create 125 --ostemplate debian-4.0-amd64-minimal
Creating VPS private area: /var/lib/vz/private/125
Performing postcreate actions
VPS private area was created
server1:~# vzctl start 125
Starting VPS ...
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
server1:~# vzctl restart 125
Restarting VPS
Stopping VPS ...
VPS was stopped
VPS is not mounted
Starting VPS ...
vzquota : (warning) Quota is running for id 125 already
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
server1:~# vzctl stop 125
Stopping VPS ...
VPS was stopped
VPS is not mounted
server1:~# vzctl destroy 125
Destroying VPS private area: /var/lib/vz/private/125
Can't move /var/lib/vz/private/125 -> /var/lib/vz/tmp/XpjH1Fi: Device or resource busy
lsof on the private area did not return anything.
Has anyone experienced the same behavior?
Best Regards,
*solved* Neto
[Updated on: Sat, 10 November 2007 21:11] Report message to a moderator
|
|
|
Re: VPS reboot/destroy [message #22912 is a reply to message #22885] |
Wed, 07 November 2007 13:20 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
maratrus
Messages: 1495 Registered: August 2007 Location: Moscow
|
Senior Member |
|
|
Hi,
1. What version of vzctl do you use?
2. If it is possible can you please conduct this experiment with the latest version of vzctl?
3. Quote: | lsof on the private area did not return anything.
|
Does it mean that lsof output doesn't contain any process which uses some file from ve private area?
4. In the last case please pay attention at the message Quote: | vzquota : (warning) Quota is running for id 125 already
|
try
a) vzctl stop 125
b) vzquota off 125
c) vzquota drop 125
d) vzctl start 125
e) vzctl restart 125
f) vzctl destroy 125
Thank You!
[Updated on: Wed, 07 November 2007 13:27] Report message to a moderator
|
|
|
Re: VPS reboot/destroy [message #22950 is a reply to message #22912] |
Wed, 07 November 2007 21:36 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
neto
Messages: 4 Registered: November 2007
|
Junior Member |
|
|
Hi maratrus,
Thanks for your reply.
maratrus wrote on Wed, 07 November 2007 08:20 | Hi,
1. What version of vzctl do you use?
|
server1:~# dpkg -l | grep vz
ii linux-image-2.6.18-openvz-amd64 028.18.1-2.6.18-12-1 Linux kernel binary image for version 2.6.18
ii vzctl 3.0.11-13 server virtualization solution - control too
ii vzdump 1.0-2 OpenVZ backup scripts
ii vzquota 3.0.8-2 server virtualization solution - quota tools
maratrus wrote on Wed, 07 November 2007 08:20 |
2. If it is possible can you please conduct this experiment with the latest version of vzctl?
|
By latest vestion do you mean a development version? Sure I can try it. Just let me know where to grab it from.
maratrus wrote on Wed, 07 November 2007 08:20 |
3. Does it mean that lsof output doesn't contain any process which uses some file from ve private area?
|
Thats correct.
maratrus wrote on Wed, 07 November 2007 08:20 |
4. In the last case please pay attention at the message Quote: | vzquota : (warning) Quota is running for id 125 already
|
try
a) vzctl stop 125
b) vzquota off 125
c) vzquota drop 125
d) vzctl start 125
e) vzctl restart 125
f) vzctl destroy 125
Thank You!
|
It seems that if the VE is stopped (even a vzctl stop) this happens.
Here is what I just tried (following the sequence you've put:
server1:~# vzctl create 105 --
server1:~# vzctl create 105 --ostemplate debian-4.0-amd64-minimal
Creating VPS private area: /var/lib/vz/private/105
Performing postcreate actions
VPS private area was created
server1:~# vzctl start 105
Starting VPS ...
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
server1:~# vzctl stop 105
Stopping VPS ...
VPS was stopped
VPS is not mounted
server1:~# vzquota off 105
server1:~# vzquota drop 105
server1:~# vzctl start 105
Starting VPS ...
Initializing quota ...
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
server1:~# vzctl restart 105
Restarting VPS
Stopping VPS ...
VPS was stopped
VPS is not mounted
Starting VPS ...
vzquota : (warning) Quota is running for id 105 already
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
server1:~# vzctl stop 105
Stopping VPS ...
VPS was stopped
VPS is not mounted
server1:~# vzquota off 105
server1:~# vzquota drop 105
server1:~# vzquota show 105
vzquota : (error) Can't open quota file for id 105, maybe you need to reinitialize quota: No such file or directory
vzquota : (error) Quota file must exist for show command
server1:~# vzctl destroy 105
Destroying VPS private area: /var/lib/vz/private/105
Can't move /var/lib/vz/private/105 -> /var/lib/vz/tmp/X8zw8wd: Device or resource busy
Even though after the vzctl stop, vzquota off, and vzquota drop the vzctl start no longer complains that the quota is running, if I try to destroy it, it still won't let me.
|
|
|
|
|