Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running the linux distro on my server.When i want to verify the size of the disk, i'm issuing this commnand to get the output.

 df -h

But it does not produce ANY output.Strangely enough when i'm issuing other command such as fdisk -l or du -h it can show output normally.

Does anyone now why is this happening?Thanks.


here is the output of cat /etc/fstab

 none     /dev/pts       devpts   rw   0     0

and this is for mount command

 none on /dev/pts type devpts (rw)
 none on /proc/sys/fs/binfmt_misc tpe binfmt_misc  (rw)


here is the output of cat /proc/mounts

 /dev/vzfs / vzfs rw,relatime,usrquota,grpquota 0 0
 proc /proc proc rw,relatime 0 0
 sysfs /sys sysfs rw,relatime 0 0
 none /dev/tmpfs rw,relatime 0 0
 none /dev/pts devpts rw,relatime 0 0
 none /proc/sys/fs/binfmt_misc binfmt_msc rw,relatime 0 0
share|improve this question
Which distro? How about df without -h? Are you running as root or sudo permission? – quanta Sep 12 '12 at 7:38
@quanta my distro is centos.I'm running as root.All the command df is not working.. – user119720 Sep 12 '12 at 7:45
Please post your /etc/fstab file and also the output of the mount command. – ramruma Sep 12 '12 at 8:21
df reads /etc/mtab, could you show us this file? Both fdisk and du do something completely different. – scai Sep 12 '12 at 8:31
user119720, you've asked ten questions on SF, nearly all of which have one or more answer, but you've accepted an answer to only three. May I suggest that you review your older questions and see if you can improve your accept rate? It will make more people likely to answer future questions. – MadHatter Sep 12 '12 at 9:42
up vote 4 down vote accepted

How about this:

$ \df

\ to ignore df alias.


here is the output of cat /proc/mounts

 /dev/vzfs / vzfs rw,relatime,usrquota,grpquota 0 0

/dev/vzfs --> looks like you're running OpenVZ (check by using virt-what). And if so, root filesystem is mounted by the host system, not the guest, therefore, there is no / in the /etc/mtab and df shows nothing. To fix, link /etc/mtab to /proc/mounts:

rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab


share|improve this answer
nope..its not working.sorry – user119720 Sep 12 '12 at 8:02
@user119720: updated my answer. – quanta Sep 12 '12 at 9:47
thanks..altough i'm not tested this yet,but you've already point me to the right direction.i will check out this first thing in the morning. – user119720 Sep 12 '12 at 10:14

It may be that you are not running the correct df; perhaps there is a badly-named alias or shellscript in your path. Run which df to check.

If you are running the correct df, then perhaps it has been corrupted or overwritten. Run rpm -qf $(which df) to see which package owns df, and then run rpm -V packagename or rpm -V $(rpm -qf $(which df)) to see if it has changed since installation.

share|improve this answer
i've already run which df and it shows me this path : /bin/df when i'm running rpm -qf $(which df) it show me this output: coreutils-5.97-34.el5_8.1 and lastly when i'm running rpm -V $(rpm -qf $(which df)) ,it doesn't show me any output and neither the df command is working – user119720 Sep 12 '12 at 8:14
If you run strace df, is there anything obviously wrong? – ramruma Sep 12 '12 at 8:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.