[Lxc-users] Ubuntu + lxc-stop

Gordon Henderson gordon at drogon.net
Fri Jun 11 13:38:57 UTC 2010


On Fri, 11 Jun 2010, Papp Tamás wrote:

> Papp Tamás wrote, On 2010. 06. 11. 15:15:
>> hi!
>>
>> If the start of the container was not fine (actually fstab contained
>> some items), I cannot stop it properly:
>>
>> $ fuser -vm /dev/mapper/sister-newsletter
>>                      USER        PID ACCESS COMMAND
>> /dev/mapper/sister-newsletter:
>>                      root     kernel mount /data/lxc/newsletter
>>
>> So the fs is now in read-only mode.
>>
>> Can you help me on this? Is this a bug, or do I make something wrong?
>
> Sorry! This fuser is only a simple mount. But I still had to umount the
> partition and mount it again, to be able to use it.
>
> Why?

Possibly because when shutting down the container, it's running the native 
ubuntu shutdown scripts - which remount the root filesystem read-only.

I had this with Debian until I removed the scripts - although I've since 
been using the "lxc-watchdog" script provided by Dobrica Pavlinusic:

http://blog.rot13.org/2010/03/lxc-watchdog_missing_bits_for_openvz_-_linux_containers_migration.html

it will strip out some init scripts on first invocation and fiddle with 
the inittab in a way that lets you shutdown or reboot containers - and 
also gets them to do a nice shutdown when you shutdown the host.

Gordon


More information about the lxc-users mailing list