OpenVZ Forum


Home » General » Support » *solved* VPS reboot/destroy
*solved* VPS reboot/destroy [message #22885] Wed, 07 November 2007 03:38 Go to previous message
neto is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fedora 64 bit templates
Next Topic: Help with performance problem.
Goto Forum:
  


Current Time: Sun Nov 17 13:32:28 GMT 2024

Total time taken to generate the page: 0.02841 seconds