Skip to contentSkip to conversation

Filesystem corruption

DISCUSSION devsk 5 participants 8 messages May 30, 2007 – Jun 5, 2007

lore
Share & tools
lore

devsk

author
#0 lore raw

I think people just like to spread FUD without doing any analysis of what really caused the FS corruption. It can be anything from a bad 3rd party driver to bad hardware ('bad blocks', does anybody check for them before mkfs these days? I do). People also like to try those untested patchsets, containing every blah that's thrown out by so called 'kernel hackers' which makes your system 10x faster. Rieser4 seems like an easy candidate to vent their anger on afterwards.

I have used R4 for a year now and I have had to reset my PC, troubleshooting problems with vmware/mythtv/cisco vpn client/nvidia, so many times that its not even funny! And R4 didn't give me any problems even once. It boots right up, without any files lost and consistent FS as a subsequent livecd boot and fsck proved it everytime. If I did that to ext or xfs, I would have lost big time. Only files I have ever lost were on ext3 during a sudden power failure. I don't trust safety of my data on any FS but Rieserfs. I hope people don't leave this good piece of code to rot!!

-devsk

----- Original Message ----
From: Toby Thain <[email protected]>
To: David Masover <[email protected]>
Cc: ReiserFS List <[email protected]>
Sent: Wednesday, May 30, 2007 9:42:01 AM
Subject: Re: Filesystem corruption

Quoted 11 lines · David Masover
Quoted 8 lines · On Tuesday 29 May 2007 07:36:13 Toby Thain wrote:
Quoted 4 lines
Quoted 4 lines

but you can't
mention using reiserfs in mixed company without someone accusing you of
throwing your data away.

People who repeat this rarely have any direct experience of Reiser; they repeat what they've heard; like all myths and legends they are transmitted orally rather than based on scientific observation.

Quoted 7 lines

Well, there is one problem I vaguely remember that I don't think has been
addressed, I think it was one of those lets-put-it-off-till-v4 things. It was
the fact that there are a limited number of inodes (or keys, or whatever you
call a unique file),

But does it cause data loss? One usually sees claims that "reiserfs ate my data", or "I heard reiserfs ate somebody's data", but without supplying a root cause - bad memory? powerfail? bad disk? etc.

Quoted 8 lines

and no way of knowing how many you have left until your FS will suddenly, one day refuse to create another file.

... switching away from Reiser4
means I no longer see random files (including stuff in, for example, /sbin,
that I hadn't touched in months) go up in smoke.

I only wish sanity had prevailed over kernel inclusion, then we'd see it shaken down a lot quicker, like R3 was.

Quoted 9 lines

Ordinarily I like to help debug things, but not at the risk of my data. Maybe
I'll try again later, and see if I can reproduce it in a VM or somewhere
safe...

I do still follow the list, though, in case something interesting happens.

Yeah, R4 is "something interesting". :) I still hope it gets finished...

--Toby

Quoted 2 lines

It
was fun while it lasted!

____________________________________________________________________________________Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow

#1 lore raw
Quoted 1 line · devsk

I think people just like to spread FUD without doing any analysis of what really caused the FS corruption.

I fear you're right. OTOH, filesystem developers on this list (and others including ZFS list) tend to be extremely meticulous.

--Toby

#2 lore raw
In reply to devsk
Quoted 5 lines · On Wednesday 30 May 2007 12:22:17 devsk wrote:

I have used R4 for a year now and I have had to reset my PC, troubleshooting problems with vmware/mythtv/cisco vpn client/nvidia, so many times that its not even funny! And R4 didn't give me any problems even once. It boots right up, without any files lost and consistent FS as a subsequent livecd boot and fsck proved it everytime.

That happened to me for maybe a year or so, I'm not sure. Then, slowly, I started to get problems. The machine crashing due to some nvidia bug -- or even a reiser-specific oops or something -- then I'd have to fsck it, which would take an hour or more, then I'd boot, and apparently no problems.

Only, recently, these fsck-a-thons started happening more and more often, and I started to lose random files. They'd just be silently truncated to 0 bytes. And not files I was writing a lot -- I'm talking about things like /bin/mount.

Now, maybe it's an amd64-specific bug. Or (somehow) a dmraid-specific bug, or a dont_load_bitmap bug. (Who can blame me; without dont_load_bitmap, it takes at least 30 seconds, maybe a minute to mount.) Could even be, somehow, a Gentoo-specific bug. Could be a 350-gig-partition bug, or even a bug of the it-hates-me variety. (My server ran Reiser4 for awhile longer, with no problems, but I wasn't about to take chances there.)

But, I switched a friend over to Ubuntu, and he had the same kind of problems. In fact, he had them first (I thought it was his computer, for awhile).

Finally, we switched to stock Ubuntu kernels and XFS, me on dmraid, him on normal linux raid5 (md), and we now have no problems. It's even faster -- the biggest gain for Reiser4 was /usr/portage, which doesn't exist on Ubuntu.

Quoted 2 lines

If I did that to ext
or xfs, I would have lost big time.

Well, I'm on XFS on my desktop now, and ext3 on my server. No problems at all so far. Also much faster, because my desktop now has a repacker (xfs_fsr).

Quoted 1 line

I hope people don't leave this good piece of code to rot!!

Me too, but you know, I can no longer afford to spend a few hours running fsck for no apparent reason. I no longer have a machine that can do anything but just work.

The killer feature of Reiser4, as implemented, is small file performance that makes ReiserFSv3 weep, and v3 makes XFS weep. All the other stuff we were promised is either planned for a later release (repacker, pseudofiles, transaction API) or barely working (cryptocompress).

And on just about any setup I work on today, small file performance is a small enough priority that even the slightest hint of instability is a deal-breaker. Enough people feel the same way that ext3 is still widely used. And if it's ever really crucial, there's reiserfs3.

So, you can blame it on my hardware, or on not getting kernel inclusion, or anything you want, but the only place I still use Reiser4 is on the gameserver at our LAN party, and we're thinking of moving that to something like ext3 or xfs, just so we don't need custom kernels. And after all, that's a gameserver, it's not like the filesystem is the bottleneck anyway.

#3 lore raw
Quoted 4 lines · David Masover

Only, recently, these fsck-a-thons started happening more and more often, and I started to lose random files. They'd just be silently truncated to 0 bytes. And not files I was writing a lot -- I'm talking about things like /bin/mount.

Hm, same here. I lost /bin/sleep several times. I have a little script printing status messages to the screen, sleeping two seconds and print again - you name it. The probability that /bin/sleep is accessed at the same time the system crashes is quite high (this is _no_ write access, the system is even mounted noatime).

How could pure execution of a file cause corruption of the file itself? Any idea ?

Apart from that single file, I never had any serious problems with reiser4 on three busy systems for years - fsck.reiser4 works like charme.

Signature · 2 lines
Ingo Bormuth, voicebox & fax: +49-(0)-12125-10226517
public key 86326EC9, http://ibormuth.efil.de/contact
#4 lore raw
Quoted 10 lines · Ingo Bormuth
Quoted 3 lines · David Masover

Only, recently, these fsck-a-thons started happening more and more often, and I started to lose random files. They'd just be silently truncated to 0 bytes. And not files I was writing a lot -- I'm talking about things like /bin/mount.

Hm, same here. I lost /bin/sleep several times.

Would you please describe the problem in more details?
What kernel version? What does "I lost /bin/sleep" mean?
Does it mean that:
1. /bin/sleep was truncated to 0 bytes, i.e. "ls -l /bin/sleep" shows something like -rwxr-xr-x 1 root root 0 2005-04-20 18:32 /bin/sleep
2. /bin/sleep disappeared ("ls -l /bin" doesn't show this file)
3. /bin/sleep exists, but filled by zeros
etc...

Thanks,
Edward.

Quoted 15 lines

I have a little script
printing status messages to the screen, sleeping two seconds and print again - you name it. The probability that /bin/sleep is accessed at the same time the system crashes is quite high (this is _no_ write access, the system is even mounted noatime).

How could pure execution of a file cause corruption of the file itself? Any idea ?

Apart from that single file, I never had any serious problems with reiser4 on three busy systems for years - fsck.reiser4 works like charme.

#5 lore raw
Quoted 12 lines · Edward Shishkin
Quoted 1 line · Ingo Bormuth

Hm, same here. I lost /bin/sleep several times.

Would you please describe the problem in more details? What kernel version? What does "I lost /bin/sleep" mean? Does it mean that:
1. /bin/sleep was truncated to 0 bytes, i.e. "ls -l /bin/sleep" shows something like
-rwxr-xr-x 1 root root 0 2005-04-20 18:32 /bin/sleep
2. /bin/sleep disappeared ("ls -l /bin" doesn't show this file)
3. /bin/sleep exists, but filled by zeros
etc...

The file was removed by 'fsck.reiser4 --fix' which emmitted a message about deleting a corrupted file. (Case 2 in your list).

This always happened after a system freeze or power loss. The machine freezes quite frequently - I think it has a DMA problem. Nevertheless I don't see how a file that was not written to can get corrupted.

Current kernel is 2.6.20.5 (the reiser4 patch I submitted to this list on may 2nd).

Root is mounted rw,noatime,nodiratime,onerror=remount-ro,tmgr.atom_max_age=60

Hope that helps.

Signature · 2 lines
Ingo Bormuth, voicebox & fax: +49-(0)-12125-10226517
public key 86326EC9, http://ibormuth.efil.de/contact
#6 lore raw
Quoted 23 lines · Ingo Bormuth
Quoted 9 lines · Edward Shishkin
Quoted 3 lines · Ingo Bormuth

Hm, same here. I lost /bin/sleep several times.

Quoted 10 lines

Would you please describe the problem in more details?
What kernel version? What does "I lost /bin/sleep" mean?
Does it mean that:
1. /bin/sleep was truncated to 0 bytes, i.e. "ls -l /bin/sleep" shows something like -rwxr-xr-x 1 root root 0 2005-04-20 18:32 /bin/sleep
2. /bin/sleep disappeared ("ls -l /bin" doesn't show this file)
3. /bin/sleep exists, but filled by zeros
etc...

Quoted 10 lines

The file was removed by 'fsck.reiser4 --fix' which emmitted a message about deleting a corrupted file. (Case 2 in your list).

This always happened after a system freeze or power loss. The machine freezes quite frequently - I think it has a DMA problem. Nevertheless I don't see how a file that was not written to can get corrupted.

When performing mapping read (needed for execution, etc) reiser4 converts small files from tails to extents and back (your /bin/sleep is less then 4 * blocksize, right?)

Quoted 3 lines

Current kernel is 2.6.20.5 (the reiser4 patch I submitted to this list on may 2nd).

Please, rebuild your kernel with the official patch
http://ftp.namesys.com/pub/reiser4-for-2.6/2.6.20/
It contains a bugfix related to tail conversion (races when acquiring exclusive access).

Please, report, if such data loss still takes place after upgrade.

Thanks,
Edward.

Quoted 8 lines

Root is mounted rw,noatime,nodiratime,onerror=remount-ro,tmgr.atom_max_age=60

Hope that helps.

#7 lore raw
Quoted 3 lines · Edward Shishkin

When performing mapping read (needed for execution, etc) reiser4 converts small files from tails to extents and back (your /bin/sleep is less then 4 * blocksize, right?)

Yes, it's 15k.

The conversion is done on disk, even when mounted read only? I'd like to see the logic in the code. In case you just know by heart, it' would be nice if you could give me a little hint where to start at.

Quoted 3 lines

Please, rebuild your kernel with the official patch [...]
Please, report, if such data loss still takes place after upgrade.

I'll keep you informed ...

Thanks.

Signature · 2 lines
Ingo Bormuth, voicebox & fax: +49-(0)-12125-10226517
public key 86326EC9, http://ibormuth.efil.de/contact