# -bash: /bin/df: Input/output error



## rtheta (Dec 12, 2007)

Hi I'm running openSUSE 10.2 (X86-64) with ext3 and have 4 SAS drives in a RAID10 array and am having a filesystem problem. When I run commands like ps and df I get:

-bash: /bin/ps: Input/output error
-bash: /bin/df: Input/output error

Additionally trying to copy files off of this server frequently results in:

scp: /home/user/somefile: Input/output error

I don't see anything in /var/log/messages which just kind of abruptly cuts off. I can still ls and read certain files but am trying to figure out how to diagnose the problem without losing more data as this server runs a mysql daemon. Anyone have any suggestions, or thoughts either for diagnosing or fixing?

I'd rather not reboot as given the results of just doing a ps gives errors I fear that it will not come back up and this box is in a remote location. Thank you!


----------



## lensman3 (Oct 19, 2007)

I think you have lost the "/dev/xterm-windows-driver" or what ever it is called. The "ls" command is part of the bash shell, so I think the shell is talking to the text window OK. "df" and "ps" are reall commands and they are not hooking up to stdin/stdout/errout. It is like your login shell didn't get hooked up correctly when you logged in.

Try "tail -f /var/log/messages" to see if the tail end of the messages are might tell you what is wrong.

Try and start another shell. If you type in "bash", maybe a second hooked-up-correctly shell will run. 

When I do a "/usr/sbin/lsof | grep bash", bash has hooked up /dev/pty/## (##->some terminal number). pts's are pseudo terminals. See if that device directory is OK. (I don't know how you fix it on the fly!!!!). Older Unixes use to have a makedev command and it would make the entire /dev tree, but I don't think that way is used any more.

Sounds like somebody might have done a "rm -fr /dev/*". 

Good luck.


----------

