Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Reiserfs constantly overwrites files
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
TinheadNed
Guru
Guru


Joined: 05 Apr 2003
Posts: 339
Location: Farnborough, UK

PostPosted: Sun Mar 14, 2004 9:49 pm    Post subject: Reiserfs constantly overwrites files Reply with quote

The topic summarises my problem - every time my laptop hangs and needs restarting without unmounting, on restarting some particular vital files will be overwritten with other ones. On my old laptop this was ALWAYS /etc/modules.conf which would be replaced with some random C code. Now, on this computer, it is always my Kopete configuration and/or KDE setup. And possibly other files as well. It's driving me around the bend. This has been happening for a year over two laptops, and at the moment my laptop is crashing a lot when shutting down but I don't have time to solve it. Losing files is too annoying though.

Help! I don't have the time to swap to ext3, my final 4th year project is due for first demonstration this Friday.
Back to top
View user's profile Send private message
zeek
Guru
Guru


Joined: 16 Nov 2002
Posts: 480
Location: Bantayan Island

PostPosted: Sun Mar 14, 2004 10:31 pm    Post subject: Reply with quote

Prepare for a barage of "I told you so" from the 'Already burned by Reiserfs club' and "It's been working stable for me without any problems since 1977" from the 'HansR fanboy ***hugger club.

Moving on to the problem, what is causing you so many unclean shutdowns? Are you having kernel opps, or is the battery running out of juice and turning off?

One idea is to run the command 'sync' before doing anything likely to crash the computer. THis will flush the write cache.
Back to top
View user's profile Send private message
Jake
Veteran
Veteran


Joined: 31 Jul 2003
Posts: 1132

PostPosted: Sun Mar 14, 2004 10:52 pm    Post subject: Reply with quote

I've had this happen a few times, but never often enough to really cause problems. My suggestion, and a good idea even if you didn't have this problem, is to keep backups.
Back to top
View user's profile Send private message
TinheadNed
Guru
Guru


Joined: 05 Apr 2003
Posts: 339
Location: Farnborough, UK

PostPosted: Sun Mar 14, 2004 11:05 pm    Post subject: Reply with quote

Answer 1: I don't know what's breaking, but before X closes it hangs. I've set up X to DontZap and DontVTSwitch or whatever it is as one of my colleagues likes to lteach people lessons in security by installing ssh keys, restarting X servers etc. The upshot of which is Magic SysRq doesn't work, so no remounting readonly.

Answer 2: By an amazingly thankful coincidence I realised my work was amazingly valuable to me and started backing it up nightly the day before it got completely overwritten. But backing up ~/.kde/ would be intensely annoying.

I don't want to just start a ext3 vs. reiser argument. I use reiser on some partitions on my server with no problems. It's just that even the people who DON'T like reiserfs have never claimed to me a routine loss of files.

BTW dmesg logs show transactions being replayed etc. but whether the journal gets corrupted and replays crazy shit is anybody's guess.
Back to top
View user's profile Send private message
CaribbeanKnight
Apprentice
Apprentice


Joined: 27 Apr 2003
Posts: 240
Location: Earth -> Europe -> Belgium -> Diest

PostPosted: Sun Mar 14, 2004 11:08 pm    Post subject: Reply with quote

just wanna say that i've had similar problems and i'm 90% sure it was due to reiserfs... see https://forums.gentoo.org/viewtopic.php?t=143121&highlight= .. using jfs now and happy again.. :)[/url]
_________________
...we ain't shit...
Linux User #353893
Back to top
View user's profile Send private message
Xe.Qon
n00b
n00b


Joined: 26 Nov 2003
Posts: 43
Location: Eugene, OR, USA

PostPosted: Sun Mar 14, 2004 11:21 pm    Post subject: Reply with quote

I used to have similar problems, but I believe I've gotten them to go away. I had the same symptoms -- X would hang completely, and when I rebooted a couple files would be overwritten with random c code (in my case, they were generally files in ~/.kde/). X seemed to be crashing because of the nvidia drivers I use (it used to crash a lot during opengl screensavers as well).

The thing I did that (I believe) fixed it was to add "nolapic" to the end of my kernel line in Grub. The post I found it in suggested adding "noapic nolapic", but I already don't have apic compiled into my kernel. I'm not sure what apic and lapic do, so I would do a little research before appending them. It doesn't seem to have any averse effects on my computer (a laptop). My computer hasn't hardlocked once since I added them (and hence, no fs corruption).

In the thread CaribbeanKnight mentioned, somebody suggested that the option "notail" in /etc/fstab could cause corruption as well. I've gotten rid of that flag and not had any problems, although I doubt it was what fixed my issues. (It also causes problems with, e.g., lilo).

Good luck!
Back to top
View user's profile Send private message
TinheadNed
Guru
Guru


Joined: 05 Apr 2003
Posts: 339
Location: Farnborough, UK

PostPosted: Sun Mar 14, 2004 11:24 pm    Post subject: Reply with quote

Thanks for the link. I appear to be getting exactly the same problems as you. I'm also confused by the no-fsck-on-reboot thing. While the explanation makes sense, I remember about a year ago my laptop actually doing quick fsck type jobs on my reiser partition. I assume it was an init script thing. Admittedly they didn't appear to fix the problem.

I was looking forward to reiser4 but now I reckon I'll admire from a distance.

It's just a shame I can't tune the partition in a way to make it more secure. I'm not using noatime or notail. At this rate I'll have to start using sync in the options.
Back to top
View user's profile Send private message
Xe.Qon
n00b
n00b


Joined: 26 Nov 2003
Posts: 43
Location: Eugene, OR, USA

PostPosted: Mon Mar 15, 2004 1:31 am    Post subject: Reply with quote

Did you try appending "noapic nolapic"? That was what seemed to fix my problem, not removing "notail".
Back to top
View user's profile Send private message
zeek
Guru
Guru


Joined: 16 Nov 2002
Posts: 480
Location: Bantayan Island

PostPosted: Mon Mar 15, 2004 6:27 am    Post subject: Reply with quote

TinheadNed wrote:
BTW dmesg logs show transactions being replayed etc. but whether the journal gets corrupted and replays crazy shit is anybody's guess.


If you boot to single user mode and fsck do the files show up in lost+found?
Back to top
View user's profile Send private message
TinheadNed
Guru
Guru


Joined: 05 Apr 2003
Posts: 339
Location: Farnborough, UK

PostPosted: Mon Mar 15, 2004 10:03 am    Post subject: Reply with quote

I can't find noapic or nolapic in the man page for mount as an option so I'll research that this evening.

I ran fsck once, and as it was still going after half an hour I turned it off to go to bed. I'm sure I'm doing something wrong with reiserfs. It's supposed to be better and faster, but my harddrive has always felt sluggish, files get lost, and fscks take YEARS!
Back to top
View user's profile Send private message
georwell
Guru
Guru


Joined: 25 Jun 2003
Posts: 430
Location: Uppsala, Sweden

PostPosted: Mon Mar 15, 2004 10:26 am    Post subject: Reply with quote

Quote:
I'm sure I'm doing something wrong with reiserfs. It's supposed to be better and faster, but my harddrive has always felt sluggish, files get lost, and fscks take YEARS!


Perhaps your a candidate for the $25 support call? You could probably even write it off as a donation if your company does that type of stuff.
Back to top
View user's profile Send private message
Xe.Qon
n00b
n00b


Joined: 26 Nov 2003
Posts: 43
Location: Eugene, OR, USA

PostPosted: Mon Mar 15, 2004 3:45 pm    Post subject: Reply with quote

TinheadNed wrote:
I can't find noapic or nolapic in the man page for mount as an option so I'll research that this evening.


Not a mount option. They're kernel parameters. Sorry, I should have been more clear. In my /boot/grub/grub.conf, for example, there's the following line:

Code:
kernel /bzImage root=/dev/hda7 elevator=cfq video=vesa:ywrap,mtrr vga=0x318 nolapic


And if you do end up using the $25 support, please let us know what causes this... It's a little bizarre having c code (of all things) overwriting your data....
Back to top
View user's profile Send private message
TinheadNed
Guru
Guru


Joined: 05 Apr 2003
Posts: 339
Location: Farnborough, UK

PostPosted: Mon Mar 15, 2004 7:50 pm    Post subject: Reply with quote

ehehe, I'm glad I sound professional enough to work for a company. I'm a student, feeling massive crunch time right about now. I'm doing my very cool project (if I say so myself) to make a mobile robot that uses 802.11b to communicate with a base station (or whatever). Writing client and server side code is a little tricky when it vanishes.

I'm not sure what disabling the APIC would do to fix this, but I don't have much else to try.

Sod paying the $25. I think ext3 next week, just to compare.
Back to top
View user's profile Send private message
irf2003
Veteran
Veteran


Joined: 10 Sep 2003
Posts: 1078

PostPosted: Mon Mar 15, 2004 7:53 pm    Post subject: Reply with quote

Reiserfs is great for partitions containing static files, e.g
your mp3 collection, provided that you mount it RO.
it is also great for temp files, e.g. your portage "$PORTAGE_TMPDIR"
but anything else can be very dangerous, unless you
have hardware which you are 100% sure that it will
no lock up, and you have a UPS so that in case of a
power outage you will be covered.
ext3 may be a hog, but at least it's reliable.
while Reiserfs is substantially better performing, if missused
it will bite you
hth
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Mon Mar 15, 2004 8:52 pm    Post subject: Reply with quote

Consistant problems with Reiser or any of the journalling filesystems obviously aren't normal. Try nolapic as was suggested and if it works let us know.

fsck's aren't faster, it's just that journalling filesystems don't do a full fsck on boot after mounting a drive that wasn't unmounted before, they just do journal replays as that's all that should be needed.
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Mon Mar 15, 2004 9:23 pm    Post subject: Reply with quote

Malakin wrote:
Consistant problems with Reiser or any of the journalling filesystems obviously aren't normal.
Depends...from here
drobbins wrote:
Interestingly, ext3 handles journaling very differently than ReiserFS and other journaling filesystems do. With ReiserFS, XFS, and JFS, the filesystem driver journals metadata, but makes no provisions for journaling data. With metadata-only journaling, your filesystem metadata is going to be rock solid, and you will probably never need to perform an exhaustive fsck. However, unexpected reboots and system lock-ups can result in significant corruption of recently-modified data.
[...]
Here's why. Typical journaled filesystems like ReiserFS, XFS, and JFS take extra special care of metadata, but don't pay too much attention to data. In our above example, the filesystem driver was in the process of modifying several filesystem blocks. The filesystem driver updated the appropriate metadata, but didn't have time to flush the data from its caches to the new blocks on disk. Thus, when you loaded up /tmp/myfile.txt into a text editor, part or all of the file contained garbage -- blocks of data that didn't get initialized in time before the system locked up.
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Mon Mar 15, 2004 10:05 pm    Post subject: Reply with quote

Quote:
Depends...from here
Yes we're all aware of this but most of us use journalling filesystems and have never lost anything from a crash, the odds of this happening are rather small. It certainly shouldn't happen every time you crash, if this is the case then there's something wrong, especially if it's effecting the same file every time.
Back to top
View user's profile Send private message
TinheadNed
Guru
Guru


Joined: 05 Apr 2003
Posts: 339
Location: Farnborough, UK

PostPosted: Mon Mar 15, 2004 11:21 pm    Post subject: Reply with quote

It does describe the problem exactly though. I'll add the nolapic boot parameter, although I don't know what it does. I'll just have faith in y'all.
Back to top
View user's profile Send private message
Xe.Qon
n00b
n00b


Joined: 26 Nov 2003
Posts: 43
Location: Eugene, OR, USA

PostPosted: Wed Mar 17, 2004 11:34 pm    Post subject: Reply with quote

So is your not posting for two days an indication that your problem was fixed, or that your computer has been irrevocably destroyed? Or am I just too impatient?
Back to top
View user's profile Send private message
irf2003
Veteran
Veteran


Joined: 10 Sep 2003
Posts: 1078

PostPosted: Thu Mar 18, 2004 1:23 am    Post subject: Reply with quote

Malakin wrote:
Quote:
Depends...from here
Yes we're all aware of this but most of us use journalling filesystems and have never lost anything from a crash, the odds of this happening are rather small. It certainly shouldn't happen every time you crash, if this is the case then there's something wrong, especially if it's effecting the same file every time.

but, the odds of this happening seem to be a lot higher
with ReiserFS than say ext3. I cannot vouche for the
other more modern FS's as I have yet to use them.
but, with ReiserFS, every crash or unclean dismount translates into disaster, especially so, when there has been a lot of
write activity on the FS. As a rule of thumb, I always reformat my throw-away ReiserFS partition whenever such event occurs.
hth
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Thu Mar 18, 2004 5:18 am    Post subject: Reply with quote

Quote:
but, with ReiserFS, every crash or unclean dismount translates into disaster, especially so, when there has been a lot of write activity on the FS.
Like I said this isn't normal, if this is happening to you there is something wrong, probably a kernel problem of some sort. I've had plenty of crashes when tweaking or troubleshooting hardware and I've never lost anything on any of my systems running Reiser and this is at least several years of experience with it, what would the point of a modern journalling file system be if it always lost data on a crash, even ext2 doesn't usually lose data on a crash. Data journalling should in theory remove the possibility of any data loss but personally the performance loss isn't worth it.
Back to top
View user's profile Send private message
nmcsween
Guru
Guru


Joined: 12 Nov 2003
Posts: 381

PostPosted: Thu Mar 18, 2004 5:54 am    Post subject: Reply with quote

Quote:

Quote:
but, with ReiserFS, every crash or unclean dismount translates into disaster, especially so, when there has been a lot of write activity on the FS.
Like I said this isn't normal, if this is happening to you there is something wrong, probably a kernel problem of some sort. I've had plenty of crashes when tweaking or troubleshooting hardware and I've never lost anything on any of my systems running Reiser and this is at least several years of experience with it, what would the point of a modern journalling file system be if it always lost data on a crash, even ext2 doesn't usually lose data on a crash. Data journalling should in theory remove the possibility of any data loss but personally the performance loss isn't worth it.

Ahem reiserfs isn't a true journal FS.
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Thu Mar 18, 2004 7:44 am    Post subject: Reply with quote

Quote:
Ahem reiserfs isn't a true journal FS.
Reiser keeps a journal and replays journal entries upon booting after a crash. Seems silly to argue that you can't call it a journalling filesystem when this is the case.
Back to top
View user's profile Send private message
nmcsween
Guru
Guru


Joined: 12 Nov 2003
Posts: 381

PostPosted: Thu Mar 18, 2004 9:50 am    Post subject: Reply with quote

Im not arguing that it doesn't journal. But to my understanding reiserfs is somehow not the same as ext3 whe it comes to journaling.
Back to top
View user's profile Send private message
TinheadNed
Guru
Guru


Joined: 05 Apr 2003
Posts: 339
Location: Farnborough, UK

PostPosted: Thu Mar 18, 2004 10:09 am    Post subject: Reply with quote

My laptop is crashing slightly less atm, but that's just asking for trouble. I was going to use the noapic and nolapic until I realised that by laptop doesn't HAVE APIC support in it.

Ext3 next week I think.
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
Goto page 1, 2  Next
Page 1 of 2

 
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