Yesterday we started having problems with our emails. Investigating this, I found that there some files on our system that show all the attributes including inode, owner, group, permissions, size and date as questions marks when listed by an ls command.

When I try to access any of these files to view them, update them, move or delete them, I get an input/output error. Due to the inode also being shown as a question mark rather than a real value, I can't delete them using the inode.

Now I can't even do an ls on this system - I get a segmentation fault when I try to run the ls command.

Any thoughts on what might be happening and how I can recover from this problem? Is there any further information I might be able to provide that could help towards finding a cause and with luck a solution? The box is running Debian Wheezy.

  • Check some logfiles in /var/log, like messages or syslog for error messages, as well as less dmesg. A fsck as suggested below cannot be run while the filesystem is mounted. Is that directory on the root fs? – ott-- Jan 8 '16 at 6:15
  • 1
    Is this a local filesystem, or a remotely mounted one as from NFS or Samba? – roaima Jan 8 '16 at 12:08

is your filesystem ok ? Please run fsck to check and fix problems before running any commands to look at the files.


It seems that the filesystem is definitely not ok. I have found other corrupted files in multiple directories. As well as ls, I also can't run a lot of other commands like cat, less, mdadm, dpkg to name but a few. SO in its present state, I can't actually check anything.

I do know that I can't run fsck while a file system is mounted and have not tried to do so. The system is running software RAID 1 - how do a fsck check in that case? I have only ever used fsck on a non-raid system.

I am guessing that I should be rebooting the system off a live disk first before trying to run fsck and checking the various logfiles.

As you can tell, I am not very experienced. I do have a drive copy that I created with dd some days ago and I am thinking that restoring from that backup and then recreating & resyncing the raid arrays may, in the longer term, be a quicker option. If I did go down that route, would I better to restore one drive, recreate and resync the raid array or could I restore from the backup drive onto both drives in the raid array (identical 2Tb WD black drives) and

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.