df error – ‘df: cannot read table of mounted file systems’

[root@host]# df -h
df: cannot read table of mounted file systems
[root@host]# cat etc/mtab
(nothing)
[root@host]# lvdisplay
Parse error at byte 6 (line 1): unexpected token

This is often related to a disk space issue. A post from insanelabs.com recommended freeing up space and then rebuilding /etc/mtab from /proc/mounts like so:
[root@host]# grep -v rootfs /proc/mounts > /etc/mtab
Seemed to do the trick, df is now returning expected results.

df - techpain.com

Share

11 thoughts on “df error – ‘df: cannot read table of mounted file systems’”

  1. Awesome recommendation. Worked on CentOS6. I would like to add, that you should try to find out if there is a space issue and overcome that first, then run this command.

  2. I know this might be a bit late, but usually, these happen when your / partition is full due to various reasons

  3. root@mail:~# df -h
    df: cannot read table of mounted file systems
    root@mail:~# cat /etc/mtab
    root@mail:~# lvdisplay
    -bash: lvdisplay: command not found
    root@mail:~# apt-get install lvdisplay
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package lvdisplay
    root@mail:~#

    Something does not work. I decided to clean up disk space, but here is …

Leave a Reply

Your email address will not be published. Required fields are marked *