Gentoo Forums
Gentoo Forums
Quick Search: in
OMG ext4: data corrupted, cant delete files [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tw04l124
Veteran
Veteran


Joined: 03 Oct 2006
Posts: 1214
Location: A t z e l, lower austria

PostPosted: Sat Feb 13, 2010 7:21 pm    Post subject: OMG ext4: data corrupted, cant delete files [solved] Reply with quote

Three Days ago I saw eix-sync completed with errors. Something about cant delete files.

Code:
xfce-extra/xfce4-volumed/

Number of files: 135322
Number of files transferred: 4626
Total file size: 182849918 bytes
Total transferred file size: 7511676 bytes
Literal data: 7511676 bytes
Matched data: 0 bytes
File list size: 3085833
File list generation time: 13.154 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 145139
Total bytes received: 6580609

sent 145139 bytes  received 6580609 bytes  189457.69 bytes/sec
total size is 182849918  speedup is 27.19
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1508) [generator=3.0.7]
>>> Retrying...


>>> Starting retry 1 of 3 with rsync://83.164.192.205/gentoo-portage
>>> Checking server timestamp ...
timed out
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(543) [Receiver=3.0.7]
>>> Retrying...


>>> Starting retry 2 of 3 with rsync://81.223.20.162/gentoo-portage
>>> Checking server timestamp ...

This is mirror.inode.at, your local friendly mirror in the neighbourhood.

Connection sponsored by inode. See http://www.inode.at/

Have a look at http://mirror.inode.at/ for further information and statistics on the server.

Please contact mirror@inode.at in case of problems.

*** Checksumming (-c) is disabled, so don't use it ***

Gentoo-Users: You've hit rsync1.at.gentoo.org/81.223.20.162

receiving incremental file list
timestamp.chk

Number of files: 1
Number of files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 27
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 98
Total bytes received: 536

sent 98 bytes  received 536 bytes  1268.00 bytes/sec
total size is 32  speedup is 0.05

This is mirror.inode.at, your local friendly mirror in the neighbourhood.

Connection sponsored by inode. See http://www.inode.at/

Have a look at http://mirror.inode.at/ for further information and statistics on the server.

Please contact mirror@inode.at in case of problems.

*** Checksumming (-c) is disabled, so don't use it ***

Gentoo-Users: You've hit rsync1.at.gentoo.org/81.223.20.162

receiving incremental file list
rsync: readlink_stat("/usr/portage/dev-libs/botan/files/botan-1.8.8-darwin-install_name-fix.patch") failed: Input/output error (5)
rsync: recv_generator: failed to stat "/usr/portage/dev-libs/botan/files/botan-1.8.8-darwin-install_name-fix.patch": Input/output error (5)
IO error encountered -- skipping file deletion
rsync: recv_generator: failed to stat "/usr/portage/dev-ruby/sqlite-ruby/files/sqlite-ruby-2.2.3-19compat.patch": Input/output error (5)
rsync: recv_generator: failed to stat "/usr/portage/media-sound/mpg123/files/mpg123-1.9.2-libtool.patch": Input/output error (5)
rsync: recv_generator: failed to stat "/usr/portage/sci-libs/cbflib/cbflib-0.8.1-r6.ebuild": Input/output error (5)

Number of files: 135322
Number of files transferred: 0
Total file size: 182849918 bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 3380544
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 20789
Total bytes received: 3469157

sent 20789 bytes  received 3469157 bytes  178971.59 bytes/sec
total size is 182849918  speedup is 52.39
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1508) [generator=3.0.7]
>>> Retrying...
^C

Exiting on signal 2
localhost roman #



This line is bad:
rsync: readlink_stat("/usr/portage/dev-libs/botan/files/botan-1.8.8-darwin-install_name-fix.patch") failed: Input/output error (5)

Ok. I did use emerge-webrsync with force

Now, I tried to sync and get the same errors. Then I deleted the hole portage tree and saw, that I had ghost files on my system!

How Do I get rid of them?



I had some of these

Code:
localhost ~ # rm -r /usr/portage/
rm: cannot remove `/usr/portage/dev-libs/botan/files/botan-1.8.8-darwin-install_name-fix.patch': Input/output error
rm: cannot remove `/usr/portage/sci-libs/cbflib/cbflib-0.8.1-r6.ebuild': Input/output error
rm: cannot remove `/usr/portage/media-sound/mpg123/files/mpg123-1.9.2-libtool.patch': Input/output error
rm: cannot remove `/usr/portage/dev-ruby/sqlite-ruby/files/sqlite-ruby-2.2.3-19compat.patch': Input/output error
localhost ~ # rm /usr/portage/dev-libs/botan/files/botan-1.8.8-darwin-install_name-fix.patch
rm: cannot remove `/usr/portage/dev-libs/botan/files/botan-1.8.8-darwin-install_name-fix.patch': Input/output error
localhost ~ # cd /usr/portage/dev-libs/botan/files/
localhost files # ls
ls: cannot access botan-1.8.8-darwin-install_name-fix.patch: Input/output error
botan-1.8.8-darwin-install_name-fix.patch
localhost files # ls -al
ls: cannot access botan-1.8.8-darwin-install_name-fix.patch: Input/output error
total 8
drwxr-xr-x 2 portage portage 4096 2010-02-13 20:10 .
drwxr-xr-x 3 portage portage 4096 2010-02-13 20:10 ..
-????????? ? ?       ?          ?                ? botan-1.8.8-darwin-install_name-fix.patch


Look at the last line, pls.

kernel is: Linux localhost 2.6.32-tuxonice-r1
filesystem is ext4, on top of luks + lvm
_________________
ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl.so.3


Last edited by tw04l124 on Tue Mar 23, 2010 1:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 349
Location: San Diego, California USA

PostPosted: Sat Feb 13, 2010 7:53 pm    Post subject: Reply with quote

Doesn't look good. Either you got serious FS corruption at an unclean powerdown at some point. Or, more likely, you're having hardware issues. If it's hardware issues, then that needs to be dealt with first. You can't have a stable system with flaky hardware. Look in your kernel logs (like with 'dmesg'). If you're seeing messages in there related to SATA errors or timeouts then it's most likely hardware issues and you need to solve that first.
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1427

PostPosted: Sun Feb 14, 2010 11:48 am    Post subject: Reply with quote

Can you umount and fsck it?

If your portage tree is on your main filesystem, you'll need to mark it as dirty and then reboot for it to get checked (I can't remember how to off the top of my head...:oops: )
Back to top
View user's profile Send private message
luke16
n00b
n00b


Joined: 20 Mar 2010
Posts: 3

PostPosted: Sat Mar 20, 2010 7:09 pm    Post subject: Reply with quote

I am having trouble with my samsung spinpoint F2. It is developing bad sectors (this is the 3rd out of three of this model that have had problems with bad sectors), and I am getting the same rsync error on quite a few files if I try that. It seems that while rsync can't stat certain files, those files are still readable from nautilus and seem to be free from corruption, so I would guess that the problem is with the ext4 filesystem? I have already run fsck on it, and it has come back as saying that it has correct such and such inodes, etc. There are apparently only 21 bad sectors at the moment, but I have a feeling that number will grow.

I have backups for it, but they are a bit out of date.
Back to top
View user's profile Send private message
tw04l124
Veteran
Veteran


Joined: 03 Oct 2006
Posts: 1214
Location: A t z e l, lower austria

PostPosted: Tue Mar 23, 2010 1:21 pm    Post subject: Reply with quote

Well The kernel i Used as I wrote the article had a bad implementation of the ext4 driver. That was my problem what I figured out.

So, My solution was: fsck from arch-linux and then update kernel in gentoo installation and e2fsck.

ext4 is very buggy if you ask me, dont touch it!
_________________
ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl.so.3
Back to top
View user's profile Send private message
loftwyr
l33t
l33t


Joined: 29 Dec 2004
Posts: 970
Location: 43°38'23.62"N 79°27'8.60"W

PostPosted: Tue Mar 23, 2010 2:15 pm    Post subject: Reply with quote

Smartmontools are your friend. They will work with your drive to keep track of the bad sectors and help track the drives status.

However, if your drive has bad sectors and they're growing, time to get a new drive. Any file system suffers from bad sectors, ext4 is no different. Hardware errors will always destroy a good filesystem.
_________________
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Back to top
View user's profile Send private message
luke16
n00b
n00b


Joined: 20 Mar 2010
Posts: 3

PostPosted: Tue Mar 23, 2010 9:40 pm    Post subject: Reply with quote

loftwyr wrote:
Smartmontools are your friend. They will work with your drive to keep track of the bad sectors and help track the drives status.

However, if your drive has bad sectors and they're growing, time to get a new drive. Any file system suffers from bad sectors, ext4 is no different. Hardware errors will always destroy a good filesystem.


When I first got the drive, I did a "self-test" using palimpsest, but apparently it would have been better to do something such as e2fsck -c -c -k -C 0 /dev/sdx instead, as the self-test doesn't attempt to write to every bit of the drive. That is assuming that the bad sectors were problems that were physically on the platter itself, and not caused by a bad write head. After trying the above e2fsck command, one of the drives is now reading almost 3000 bad sectors, so now I am wiping it to send it back for warranty. Once my replacement gets here, I will fully test it this time, then swap drives, so that I can fully test the one in my main computer to see if it has similar problems.
Back to top
View user's profile Send private message
tw04l124
Veteran
Veteran


Joined: 03 Oct 2006
Posts: 1214
Location: A t z e l, lower austria

PostPosted: Wed Mar 24, 2010 1:55 pm    Post subject: Reply with quote

I am curious, whats the manufacturer and model of the drive, pls
_________________
ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl.so.3
Back to top
View user's profile Send private message
gerard82
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1855
Location: Netherlands

PostPosted: Wed Mar 24, 2010 2:02 pm    Post subject: Reply with quote

Hi tw04l124,
I disagree about ext4.
Been using it for over a year w/o any problem.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has Firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
luke16
n00b
n00b


Joined: 20 Mar 2010
Posts: 3

PostPosted: Wed Mar 24, 2010 5:14 pm    Post subject: Reply with quote

tw04l124 wrote:
I am curious, whats the manufacturer and model of the drive, pls


Samsung HD103SI I think the problem might be bad firmware, actually. The bad sectors seem to only show up when I am doing something hd intensive, such as burning a cd and copying files to it at the same time, but that's just a guess.

I wanted to go with something that was quiet and cool running, which would hopefully mean that it would have a longer lifetime. I also went with samsung because the last model to "die" on me was a western digital, which became slow to write data, and because the samsung won out over another model of WD after looking at some benchmark tests at tomshardware.
Back to top
View user's profile Send private message
tw04l124
Veteran
Veteran


Joined: 03 Oct 2006
Posts: 1214
Location: A t z e l, lower austria

PostPosted: Thu Mar 25, 2010 10:02 pm    Post subject: Reply with quote

gerard82 wrote:
Hi tw04l124,
I disagree about ext4.
Been using it for over a year w/o any problem.
Gerard.



What branch are you using? How often do you change your kernel? How often do you update your system?

In the last year I was a kernel jumper, I tested every new version of the kernel available. A very bad idea indeed.

Do you run stable?

My system was fucked up 5 times in the last year, because of crappy ext4 code in the kernel.

Arch-Linux has a more stable ext4 implementation, so when problems occur I fix them with arch-linux.

The only solution for me is now to keep the kernel and so keep complications down.


When you look in the development logs, you will see how stable ext4 is, there are millions of changes and I had 5 times bad luck. Next time for me installing a new system I go back go ext3, never had any problems with that.

Also I filled up my harddisk 5 times to the maximum (3 Gigs free) and the hole speed improvement is gone. Ext4 is good as you have at least 30 % of free disk space. My hole files are fragmented to the hell now.
_________________
ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl.so.3
Back to top
View user's profile Send private message
gerard82
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1855
Location: Netherlands

PostPosted: Fri Mar 26, 2010 12:50 pm    Post subject: Reply with quote

I run amd64 multilib stable.
I do have quite a big /etc/portage/package.keywords file though.
I am running kde-4.4.1 and had to unmask kde4 and qt and more.
The kernel I am running is gentoo-sources-2.6.30-r5.
I tried gentoo-sources-2.6.31-r6 but it refused nvidia-drivers to work.
I will try 2.6.31-r10 soon.
Of course I don't try to wreck my system since it's my only OS.
If it fails I don't have anything to fall back to.
Power failures are very rare where I live.
Couple of months ago we had one while my box was running,no problems fortunately.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has Firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum