Skip to contentSkip to conversation

apparent file corruption on 2.4.2

DISCUSSION Wade Hampton 2 participants 2 messages Mar 2, 2001

lore
Share & tools
lore
#0 lore raw

Greetings,

This is a CC of a post I sent last night to the redhat-list. I am forwarding it to the kernel list as I hear others have had file corruption and this might be of interest.... Also, if anyone has any ideas....

I got a couple of responses including:

1) Backup/restore the partition (in this case /)

2) Try shutdown -F now then do an FSCK again

3) There is something else you can do, but it's rather radical. Overwrite the entries directly in the directory table. You would have to write a program to do it, but it should solve the problem. Warren Melnick <[email protected]>

4) From Kernel Traffic #107 For 16 Feb, item #3 "I resorted to using debugfs to remove these entries,
and re-running e2fsck". [I may try this tonight!]

System information:
Dell PIII 600 with 20G ATAPI, ATAPI DVD, ZIP, CD-R IDE-SCSI loaded for CD-R, DVD
3COM 3C905 100T NIC
3dfx AGP video
RedHat 7.0 with updates
2.4.0 or 2.4.2 kernel, stock (no custom patches)

Original post follows:

I had some problems with shutting down my RH 7.0 box (2.4.0) and had to hit the reset button. I then tried booting to 2.4.2 which I had just installed. However, I got a lot of disk errors and the sizes on quite a few files were changed to 104.

A second hard reboot and startup of 2.4.0, a single user fsck of all partitions and reboot seemed to make all well, however a couple of files are messed up, /bin/hostname and /dev/dsp.

I can't move, delete, or do anything with these files. I tried chattr, touch, etc. and the only thing I can do is change the access date with touch.

b--sr-s--t 1 1769209956 1852796526 116, 101 May 29 2023
/binold/hostname

prwxr-x--T 1 2232483836 2312881283 0 Mar 1 22:41
/dev/dsp

I recovered /bin by copying /bin/* to /binnew, moving /bin to /binold, then moving /binnew to /bin. I then recovered /bin/hostname from the RPM file, but now I can't do anything with /binold/hostname....

I tried chattr, chmod, chgrp, mv, cat, vi, touch, etc.

Does anyone have any ideas. I can live with one messed up file in /binold, but I can't live with a messed up /dev/dsp. I really don't want the Microsoft solution (reload)....

Any help would be MOST appreciated!
--
Wade Hampton

#1 lore raw
Quoted 7 lines · Wade Hampton

I can't move, delete, or do anything with these files. I tried chattr, touch, etc. and the only thing I can do is change the access date with touch.

b--sr-s--t 1 1769209956 1852796526 116, 101 May 29 2023
/binold/hostname

Quoted 6 lines

prwxr-x--T 1 2232483836 2312881283 0 Mar 1 22:41
/dev/dsp

Does anyone have any ideas. I can live with one messed up file in /binold, but I can't live with a messed up /dev/dsp. I really don't want the Microsoft solution (reload)....

You could always rename /dev to /devold, copy the rest of your device files back, and run "mknod /dev/dsp c 14 3" to recreate /dev/dsp.

You probably need to boot using a rescue floppy (tomsrtbt if needed), and run debugfs to delete them. It is strange that you can't even delete these files. Sometimes there is a problem with files > 2GB in size, but there should be no problems with block special or pipes. What sort of errors do you get, and is there anything in syslog?

Cheers, Andreas

Signature · 3 lines
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert