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

C. L. Martinez carlopmart at gmail.com
Thu Nov 13 18:02:47 UTC 2014


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.


More information about the lxc-users mailing list