0

I have a server with an LVM volume mounted under /mnt. When running df -h to check free disk space, it appears to show the space consumed under /mnt as being used in /:

[root@monitor spool]# df -h
Filesystem                            Size  Used Avail Use% Mounted on
/dev/mapper/centos-root                50G   44G  6.2G  88% /
devtmpfs                              2.4G     0  2.4G   0% /dev
tmpfs                                 2.4G  128K  2.4G   1% /dev/shm
tmpfs                                 2.4G  197M  2.2G   9% /run
tmpfs                                 2.4G     0  2.4G   0% /sys/fs/cgroup
/dev/mapper/centos-home                85G   33M   85G   1% /home
/dev/sda1                             497M  204M  294M  41% /boot
/dev/mapper/recordings-newrecordings  394G   42G  332G  12% /mnt/newrecordings
/dev/mapper/data-db1                   50G  364M   49G   1% /mnt/db

Whilst this does have a certain logic - after all /mnt is under / - it does incorrectly indicate that the space is being used under / when in fact its on a separate mounted volume. This is causing some problems as our SNMP monitor keeps misreporting the / volume as nearly full, when it isn't.

Edit: Further to comments below, to illustrate my point better

ncdu shows the available disk space as follows:

ncdu 1.11 ~ Use the arrow keys to navigate, press ? for help
--- / --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   42.3 GiB [##########] /mnt
    1.4 GiB [          ] /usr
  917.9 MiB [          ] /var
  234.5 MiB [          ] /run
  178.0 MiB [          ] /boot
   21.9 MiB [          ] /etc
   19.1 MiB [          ] /root
  188.0 KiB [          ] /home
  132.0 KiB [          ] /dev
    4.0 KiB [          ] /tmp
.   0.0   B [          ] /proc
    0.0   B [          ] /sys
@   0.0   B [          ]  lib64
@   0.0   B [          ]  sbin
@   0.0   B [          ]  lib
@   0.0   B [          ]  bin
e   0.0   B [          ] /srv
e   0.0   B [          ] /opt
e   0.0   B [          ] /media
    0.0   B [          ]  .autorelabel
  • 2
    What's your basis for this belief? – Jenny D Apr 14 '16 at 9:11
  • / is 50GB but only contains approx 2GB of data - yet df reports the disk as having 44GB used. – btongeorge Apr 14 '16 at 9:12
  • 2
    / is your root filesystem and not /root which is roots home - you root partition is 88% full – Sum1sAdmin Apr 14 '16 at 9:15
  • 2
    Unmount them and try ncdu again. – Michael Hampton Apr 14 '16 at 11:40
  • 1
    to clarify the reason for doing the check after umount: if there's any data in the directory /mnt/db or /mnt/newrecordings, this will be hidden by the mounted filesystem. But it would still take up space. – Jenny D Apr 14 '16 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.