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
link|improve this question
feedback

1 Answer

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.)

link|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
feedback

Your Answer

 
or
required, but never shown

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