I have been using df -lh -x nfs --total
to get the total disk available (with file-systems)
and it has served me well, so far.
With systemd
, I see that there are entries in df
for each logged in user:
$ df -lh -x nfs --total
Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 758M 11M 748M 2% /run
/dev/mapper/system-root 78G 8.6G 65G 12% /
tmpfs 3.8G 4.0K 3.8G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
tmpfs 16M 0 16M 0% /mnt/my_ramdisk
tmpfs 758M 0 758M 0% /run/user/1003 <<<<
tmpfs 758M 0 758M 0% /run/user/1001 <<<<
total 91G 8.6G 79G 10% -
So, the total
is off!
Should I just exclude the tmpfs
with -x tmpfs
or is there any better way to
only exclude the systemd generated mounts ?
Thanks.