[lxc-devel] mounting filesystems in a container

Michael Tokarev mjt at tls.msk.ru
Mon Feb 15 13:56:31 UTC 2010


I've a question here.

What's a way to mont a new filesystem within a
container, besides re-starting the container?

For example, I've inserted a removable media on the
host, it's available on the host as /dev/sdb1, and is
mounted on the host as /mnt/removable.  But how to
make it available in a running container?

The same question pops up when I create a new filesystem
on host (parted + fsck etc).

Initially I had a need to re-arrange partitions/filesystems
to make some more room available for certain containers,
un-mounting things from within containers in order to re-
format filesystem works, but mounting it again does not.

Or am I missing something?

(the block device, /dev/sdb1 in that case, is not accessible
to the container in question using lxc.cgroup.devices.deny).

Thanks!

/mjt




More information about the lxc-devel mailing list