linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sane fsck default behavior for "Entry ... in ... has deleted/unused inode ....  Clear? yes"
@ 2012-02-04  2:51 Hin-Tak Leung
  2012-02-04 14:03 ` Theodore Tso
  0 siblings, 1 reply; 4+ messages in thread
From: Hin-Tak Leung @ 2012-02-04  2:51 UTC (permalink / raw)
  To: linux-fsdevel, tytso, linux-ext4

(I did subscribe to fs-devel, but it seems not to like @sf alias and unsubscribed me after a while - and did that circle a few times; please CC).

Have a rather broken hard disk at the moment - the bulk of it is ext3 on top of lvm2 - the default for fedora almost exactly 4 years ago. So been doing a lot of 'e2fsck -fv -y ...' lately.

Am a little surprised about what "Entry <file> in <dir> (<num>) has deleted/unused inode <num>  Clear? yes" does. it deletes the file.

I wonder should it be re-tried, or relocated to /lost+found, or anything else?

I also want to make a suggestion: when such a decision is made, I'd like to keep a record of what files are lost, etc. Can an option be added to e2fsck to log its decisions somewhere?

Thanks for all the hard-work to make fsck even possible - the hard disk has been well-used :-).

For those people who might come across this in the future - here is a tips, and may be another question/discussion about sane behavior on error:

it appears that some combination of SATA->USB enclosure plus usb-storage plus usb hci driver doesn't like read errors, and the kernel resets the usb device and reconnects whenever that happens. That has the unfortunate side effect of renaming /dev/sdb into /dev/sdc, etc, underneath lvm2, and causes lvm2 to get stuck. I suppose that's the sane behavior since one wants to stop I/O and further damage, but maybe the kernel should only reset usb storage devices on write-errors, rather than read-errors? And somehow limit the device to read-only access after a read-error?

In any case, I somehow found that I could persuade the kernel not to reset the usb device, if I disable read-ahead (i.e. hdparm -a0/-A0). I also tried disabling read-ahead on the lvm2 device itself (-A0 /dev/dm-X, where X is the logical volume), and "echo 128 > /sys/block/sdc/device/max_sectors" (or smaller number).

So it seems that slowing it down make it more reliable for an unreliable disk. Maybe this can be made automatic inside the kernel?



 


 









^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-06  0:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-04  2:51 sane fsck default behavior for "Entry ... in ... has deleted/unused inode .... Clear? yes" Hin-Tak Leung
2012-02-04 14:03 ` Theodore Tso
2012-02-04 17:53   ` Hin-Tak Leung
2012-02-06  0:03     ` Ted Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).