OVZ container unmout issue

From vpsget wiki
Jump to: navigation, search

Symptoms:

-impossible to unmount/stop vz container.

   vzctl stop CID
   vzctl umount CID
  "Can't umount /vz/root/<CID>: Device or resource busy"

-inside container you can;'t install software, restart services with error like this: "[Errno 30] Read-only file system: '/var/run/yum.pid'"

Steps to fix:

fuser /vz/root/<VZID>

get process id

lsof /vz/root/<VZID>     

COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
bash    259025 root  cwd    DIR  0,139     4096 58467282 
/vz/root/<VZID>/etc/<path>/<processName> 


Kill the process with corresponding ID:

 kill -9 259025