Re: [Vserver] lvremove: "Can't remove open logical volume"

From: Rik Bobbaers <>
Date: Fri 15 Sep 2006 - 10:38:37 BST
Message-ID: <>

Mehdi Bennani wrote:
> Hi,
> Thanks a lot, but my lv's are the root of each vserver so I have to stop
> them before umounting, then the namespace is no longer in use and I get:
> vnamespace: vc_enter_namespace(): No such process
> Obviously if I try it before stopping the vserver, I get:
> umount: /vservers/vtest3: device is busy

if you stop a vserver, the namespace is gone. so that's never the
problem. but the OTHER running virtual servers still have the dir
mounted in its namespace. that's why my script loops over all the
running namespaces, and unmounts them there.

i just adapted my script to:
gandalf:/var/log# cat /usr/local/bin/unmount_vserver
if [ -n "$1" ]
   for i in `ls -1 /proc/virtual | egrep -v 'info|status'`; do
vnamespace -e $i umount $1; done
   umount $1
   exit 0;
exit 1;

if you use this, you can safely remove the logical volume without having
that problem.
ps. i have the same setup as you... 1 LV per vserver :)


aka Rik Bobbaers
K.U.Leuven - LUDIT          -=- Tel: +32 485 52 71 50 -=-
"Work hard and do your best, it'll make it easier for the rest"
-- Garfield
Vserver mailing list
Received on Fri Sep 15 10:44:02 2006
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 15 Sep 2006 - 10:44:08 BST by hypermail 2.1.8