[systemd-devel] systemd-nspawn: where is my container root?

Lennart Poettering lennart at poettering.net
Tue Jun 26 09:05:02 UTC 2018


On Di, 26.06.18 09:39, Nikolaus Rath (Nikolaus at rath.org) wrote:

> Hi,
> 
> That makes sense.. but is there any way to find out *globally* what
> devices are mounted in *any* namespace?

If you a PID from any process that belongs to the container you can
list its mounts by doing /proc/$PID/mountinfo. You can also access its
files through the /proc/$PID/root pseudo directory. 

There's also /usr/lib/systemd/systemd-dissect --mount if you want to
look into a raw image and have it mounted externally just like
systemd-nspawn would do it.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list