[lxc-users] How to enable df inside a lxc container?

Stéphane Graber stgraber at ubuntu.com
Thu Nov 13 18:04:39 UTC 2014


Might be as simple as making /etc/mtab a symlink to /proc/mounts

On Thu, Nov 13, 2014 at 06:02:47PM +0000, C. L. Martinez wrote:
> Hi all
> 
>  Is it possible to display df output inside a lxc container? I have
> several CentOS 6.6 based lxc containers, and when I execute df:
> 
> [root at lxccos03 elasticsearch]# df -h
> df: no file systems processed
> [root at lxccos03 elasticsearch]#
> 
> 
> But, with a CentOS 7 lxc container, works:
> 
> 
> [root at lxccos02 ~]# df -h
> Filesystem                  Size  Used Avail Use% Mounted on
> /dev/mapper/datavol-prodvol  111G  5.7G  106G   6% /
> devtmpfs                    7.7G     0  7.7G   0% /dev
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/hugetlb
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/perf_event
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/blkio
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/net_cls
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/freezer
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/devices
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/memory
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/cpuacct,cpu
> cgroup_root                  10M     0   10M   0% /sys/fs/cgroup/cpuset
> tmpfs                       7.8G     0  7.8G   0% /dev/shm
> tmpfs                       7.8G  8.1M  7.7G   1% /run
> 
> What option do I need to enable inside CentOS 6.6 based containers??
> 
> Thanks.
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20141113/b356b1e2/attachment.sig>


More information about the lxc-users mailing list