0

Today, on my Centos server I tried to add a user but got the following error:

-bash: /usr/sbin/useradd: Input/output error

How do i fix it?

Thanks

UPDATE:

var/log/messages is blank

df -h also gives me a the same input/output error:

-bash: /usr/sbin/df: Input/output error

'free' also gives me the same error:

-bash: /usr/sbin/free: Input/output error

Also, I cannot even shutdown the server ie: shutdown -s, gives me the same error.

Any ideas what might be the issue?

  • 1
    More info please. Anything in /var/log/messages? What does df -h say? What does mount say? – Marki Aug 11 '13 at 20:01
  • I've run into this once or twice when running out of memory and swap space, there's no room to store stdin/out or write to the terminal buffer sessions I believe. – inetplumber Aug 11 '13 at 20:50
  • So please also show the output of free. – Marki Aug 11 '13 at 21:02
  • please see my update – DextrousDave Aug 12 '13 at 19:19
  • It looks like serious filesystem corruption. Do you see anything in the output of dmesg? Hope you've got backups! – larsks Aug 12 '13 at 19:26
1

Sorry to agree with Larsks, but FS Corruption seems the most likely culprit. I've seen this a couple of times, and its been disk corruption each time.

If you are able:

touch forcefsck
then to reboot, either
init 6

OR

echo 1 > /proc/sys/kernel/sysrq

Although avoid the "echo..." because its more akin to hitting the reset button! Good luck

  • Thank you GeoSword, but I contacted my ISP to restart the server from their end since I could not restart it remotely...After the restart, the server is fine now again. But thanks for the tip... – DextrousDave Aug 16 '13 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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