Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have some strange problems here about the df command. Could and one tell me why I have the redondances in the default df output please?

[root@localhost ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                20157076   2982212  16970148  15% /
udev                    500844         0    500844   0% /dev
tmpfs                   507948       548    507400   1% /dev/shm
tmpfs                   507948       672    507276   1% /run
/dev/sda2             20157076   2982212  16970148  15% /
tmpfs                   507948         0    507948   0% /sys/fs/cgroup
tmpfs                   507948         0    507948   0% /media
/dev/sda7             10079084    490312   9076772   6% /var
/dev/sda1               516040     56300    433528  12% /boot
/dev/sda5             10079084    153736   9413348   2% /tmp
/dev/sda3             20158332    235460  18898872   2% /home
/dev/sda6             10079084    219604   9347480   3% /usr/local
/dev/sda5             10079084    153736   9413348   2% /tmp
/dev/sda7             10079084    490312   9076772   6% /var/tmp
/dev/sda3             20158332    235460  18898872   2% /home
share|improve this question

1 Answer 1

up vote 2 down vote accepted

That usually means /etc/mtab wasn't cleaned up properly at boot time, so getmntent() is returning old entries as well as the current ones. I would boot singleuser, remove /etc/mtab, then reboot; it will be recreated. (Alternately it can mean that /etc/mtab was supposed to be a symlink to /proc/mounts but the link got broken and now it's being mismanaged by code that didn't expect it to be real file; I don't have an F15 handy to check.)

share|improve this answer
    
Under Fedora15, it's like this [root@localhost ~]# ll /etc/mtab lrwxrwxrwx. 1 root root 17 Jun 11 11:27 /etc/mtab -> /proc/self/mounts –  alwinlin Jun 11 '11 at 18:35
    
Okay, that's basically the parenthesized possibility. Bug then is the link got broken, fix is to replace it, and that can be done on a running system (but still probably safer to reboot singleuser). –  geekosaur Jun 11 '11 at 18:36

Your Answer

 
discard

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.