LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-08-2016, 04:14 PM   #1
chriscrutch
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Rep: Reputation: 0
Can't rm files with input/output errors on ext4 filesystem


The short version of this story is that I had a motherboard whose hard drive controller went bad. Got a new box and popped in the old hard drives. There's a couple hundred files that have "input/output" errors. I know that often indicates hard drive failure. Multiple tests tell me that the hard drive is fine and the errors are related to the bad motherboard.

The problem is that I can't delete the bad files. Some GUI programs won't even list the contents of a directory that has one of the bad files. I have a vague notion that I have to delete the inodes of the affected files, but I don't know enough about filesystems to know how to do that. "fsck.ext4 -y" says the disk is clean, and a non-destructive "badblocks" says the disk is fine, too. "ls -il" in an affected directory lists just a question mark for the inode of an affected file, so I definitely don't know how to delete the inode if I can't even find it's number.

I can restore the affected files from backups, but need to be able to delete them first. Any ideas? Thanks all.

--chriscrutch
 
Old 05-08-2016, 07:32 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
If you have backups of the drive contents (good job, many don't) why don't you just re-format the drives and restore from your backups. It'll be quicker in the long run than mucking about trying to fix each individual problem. Just a thought.
 
Old 05-08-2016, 10:16 PM   #3
chriscrutch
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Hmmmm. To be completely honest, I hadn't considered that. Any time I hear "re-format" I get nervous a bit. But maybe that's the way to go.

I'd love to learn more about filesystems and linux, though. I've been running Linux on my main computer full-time for over ten years now, but there's always something new to learn. I'll keep plugging and asking for a little bit, before I resort to a full wipe and backup. Thank you for the suggestion. It's probably what I'll end up doing.

--chriscrutch
 
Old 05-09-2016, 12:28 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Are they "normal" files, or all in lost+found ?.
Personally I never trust a filesystem that has had an "event" - trash it and start over from that backup.
 
Old 05-09-2016, 01:43 AM   #5
chriscrutch
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Are they "normal" files, or all in lost+found ?
All "normal" files. None of them are in lost+found. And I can understand the fear of trusting the filesystem, but the slightly longer version of the story is that I had two HDs in the old computer that had the same problem, thought it was a drive issue, replaced BOTH drives, and ended up in the same situation. The chances of having FOUR hard drives all fail in the same way seems pretty remote, so I don't think it's REALLY a filesystem issue, but rather an issue with the now replaced motherboard.

--chriscrutch
 
Old 05-09-2016, 03:19 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
It's a filesystem issue. Might have been caused by that m/board, but it's broken.
Open a bug and get the devs to tell you what debug data they need.
 
Old 05-09-2016, 08:22 AM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by chriscrutch View Post
"fsck.ext4 -y" says the disk is clean, and a non-destructive "badblocks" says the disk is fine, too.
You need to include the "-f" option to force a check of a filesystem that is not marked "dirty".
 
  


Reply

Tags
errors, ext4, hdd, inode, rm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync error: errors selecting input/output files, dirs (code 3) at main.c(323) cucolin@ Linux - Networking 4 09-17-2020 02:03 PM
Input/output errors at start-up fof3 Linux - Newbie 3 02-13-2006 08:52 PM
Knoppix 4.0.2 - HD install - input/output errors on README files and docs kitcatcher Linux - Distributions 3 11-12-2005 10:40 AM
NFS Input/Output error after filesystem mounted problem wahhh Linux - Networking 1 09-06-2004 07:48 PM
Input/Output errors on files Poetics Slackware 4 08-25-2003 05:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration