[lxc-devel] lxc-attach: Could not delete snapshot, after lxc-stop when did lxc-attach before

"Axel Schöner" axel.schoener at gmx.de
Mon Sep 26 21:15:21 UTC 2011


Hi @all,

In my mail a few days before i wrote about problems which occur when using "lxc-attach". I first tried to create a snapshot with BTRFS, start the container, stop it and delete the snapshot. This is not problematic, also when i connect via "lxc-console" before. 
But if i do a "lxc-attach" before stopping the container then the snapshot could not be deleted.
I have tried today the "lxc-clone" command to create a LVM-snapshot.
The same problem occurs with LVM-snapshots and "lxc-attach".

lxc version: 0.7.5 from git(2011-09-20)
kernel: ubuntu-oneric(3.0.4+) patched with the latest patch for pid-ns

Strace shows that the volumes are busy. But i can't find a solution for this problem. Can someone help me please?
The output of strace is attached for the lvm case, for btrfs it is similar.


Why do i need this functionality?
At the moment i'm writing a PAM-module for my bachelor thesis. This module allows to start a container via PAM and redirect the non-privileged user in a container(simple bash and graphical). This module will be certainly published opensource.

Thanks,
Axel


----------  Forwarded Message  ----------
Subject: Problem after lxc-attach while deleting btrfs-snapshot
Date: Wednesday, 21. September 2011, 17:06:56
From: Schoener, Axel <axel at myprojects4u.de>
To: lxc-users at lists.sourceforge.net

lxc version: 0.7.5 from git(2011-09-20)
kernel: ubuntu-oneric(3.0.4+) patched with the latest patch for pid-ns

Start and attach to the container works fine.
When exit the container and do lxc-stop, the container stops.
The problem is, i can't remove the rootfs via btrfs delete.
If i don't use lxc-attach before, then i can remove the snapshot after lxc-
stop.

The same problem occurs if i stop the container via halt from inside 
(attached).

I' ve tried it with and without syscap.


Need some help.

Thanks,
Axel
-----------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: straceLVM
Type: application/octet-stream
Size: 47748 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20110926/78f218a3/attachment.obj>


More information about the lxc-devel mailing list