I have one of our production Ubuntu machines set up by PRODUCTION Unix team here in our company, but somehow when I am doing like this -

root@machineA:/test01# ls -lt
ls: reading directory .: Input/output error
total 0

It is giving me an error. And if I am trying to create any directory in the promary01 directory, it is giving me an error as well -

mkdir: cannot create directory `/test01/primary': Read-only file system

Any thoughts on what is wrong? I am thinking to fix this myself instead of telling UNIX PROD guys as I have root access, and I will be able to learn something new as well.

Maybe it was not mounted properly?

  • what is the output of cat /proc/mounts ?
    – SHW
    Feb 1, 2014 at 9:00
  • It may be a good idea to do a filesystem check (e2fsck), which may happen automatically if you reboot the system.
    – brm
    Feb 1, 2014 at 10:29
  • @SHW: This is what I get on the console from cat /proc/mounts - /dev/sdb /test01 ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0 /dev/sdc /test02 ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
    – arsenal
    Feb 1, 2014 at 17:23
  • It's clear that I/O error has to do with faulty disc, as said by Timo. And I guess, denial of directory creation is because, you have mounted the test01 as Read-Only. remount it as sudo mount -o remount,rw /test01
    – SHW
    Feb 3, 2014 at 5:15

3 Answers 3


Input/Output errors are more an indication of faulty discs than of unproperly mounted filesystems. I have seen that mostly with USB drives, but also with IDE, SATA and SCSI.

You should definitely ask your support to get a look at that and replace.

  • 1
    Indeed. My experience has been that if Linux gets an I/O error with a given partition, it will immediately remount the partition in question read-only. The thinking: We don't want to write to a hard disk with problems, because that might corrupt data.
    – samiam
    Feb 2, 2014 at 4:51
  • I had something very similar: my virtual machine lives in a network drive. When there is a momentary loss of network connection the virtual machine remounted the root partition as read-only. The system crashed soon after because it couldn't even write tmp files. On reboot it went to an initramfs prompt and requested to run fsck.
    – craq
    Jul 18, 2018 at 2:09

I have encountered this several times on micro SD cards running on a variation of Raspberry pi's - the fix has been fsck /dev/sdx -a where sdx is your partition.


This happened to me recently on Ubuntu 22.04, and the issue was a pending update in my Windows 10. the drive was NTFS and was used in both OSes. What fixed the issue was to boot up win10, let the windows update do its thing, and then do a shutdown. reboot and all was fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .