Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running Ubuntu Server 12.04 and I would like to reboot my system. I ssh into it fine, but when I run sudo reboot I get the following error -bash: /usr/bin/sudo: Input/output error. It is at this point that I noticed other commands are disabled and I am no longer able to write or save any files to the disk. Short of manually rebooting the system, is there a way to fix this? I am not sure I understand exactly what is going on.

share|improve this question
3  
This looks v. bad. Since this might indicate a corruption of the filesystem, I would shutdown the system ASAP, launch a liveCD / rescueCD, backup all files before doing anything else and only then check the filesystem or run any further diagnostics. (by the way, is the disk mounted rw?) –  January Oct 22 '12 at 16:29
3  
@January, you're right and you should post this as an answer. The hard disk is damaged, when the system gets an I/O error it remounts the disk as read-only to protect the data; that's why after the error the user is unable to write to the disk again. –  roadmr Oct 22 '12 at 16:47
    
Oh wow, now Im a little scared. I was trying to do a commit with subversion, and they kept failing. I thought a simple reboot might do the trick. Ill have to make sure to back everything up as soon as I get home. Ill update this post after with the results –  user489041 Oct 22 '12 at 17:46
    
It is probably worth checking if any partitions are full. –  Bailey S Oct 23 '12 at 23:25
    
Im not sure exactly what the issue was. When I went home, I hit the power button, and it wouldn't even turn off. I kept getting Input/output error. Whatever the reason, I finally got it shutdown and rebooted it. When it came back up, everything seemed to be fine. I was able to sudo and to write to the file system. I am not sure what happened but am thankful that a reboot did the trick. I wonder if it had something to do with the systems up time. Its been on for about 45 days or so. –  user489041 Oct 24 '12 at 14:31

1 Answer 1

Your hard drive most likely dropped off the SATA bus. If it had simply encountered an error and your filesystem had remounted read-only, you'd have gotten a different error - sudo: unable to open /var/lib/sudo/something/something: Read-only filesystem or similar.

When you rebooted, your drive decided to play nicely again. This might be an isolated once-in-a-lifetime issue caused by a power burp or something, or it might be an early indicator of impending drive failure. Check SMART data on the drive, and consider replacing the drive.

Uptime has nothing to do with this. Linux systems are easily capable of years of uninterrupted uptime (though in practice this would mean a years-old version of the kernel, and therefore shouldn't really be strived for).

share|improve this answer
    
Very good info. I havent had any issues with it since this issue. I have been keeping my eyes open for it though –  user489041 Nov 26 '12 at 15:11

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.