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

From: Rik Bobbaers <Rik.Bobbaers_at_cc.kuleuven.be>
Date: Fri 15 Sep 2006 - 10:07:05 BST
Message-ID: <450A6D39.70505@cc.kuleuven.be>

> Try to unmount your volume for each active name space:
> vnamespace -e [namespace of context <xid>] umount /your/lvm/volume

i "scripted" it like this:
gandalf:~# cat /usr/local/bin/unmount_vserver
#!/bin/sh
if [ -n "$1" ]
then
   for i in `ls -1 /proc/virtual | egrep -v 'info|status'`; do
vnamespace -e $i umount $1; done
   exit 0;
fi
exit 1;

you just do unmount_vserver /vservers/bleh
and it makes sure it's unmounted in all namespaces.

it doesn't do much checking, but you get the picture, feel free to add
more sanity/safety checks ;)

greetz,

-- 
harry
aka Rik Bobbaers
K.U.Leuven - LUDIT          -=- Tel: +32 485 52 71 50
Rik.Bobbaers_at_cc.kuleuven.be -=- http://harry.ulyssis.org
"Work hard and do your best, it'll make it easier for the rest"
-- Garfield
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Fri Sep 15 10:08:16 2006
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 15 Sep 2006 - 10:08:24 BST by hypermail 2.1.8