How to set a reiserfs partition to get an occasional fsck?
While the new logging filesystems are a great improvement
my experience is that they can't survive forever in the real world without an occasional rebuild or fsck.
The suse and other lists have warnings by people burnt by reiserfs. I haven't (yet) lost any data but have had some scary times.
This hasn't been bugs in reiserfs (3.6) itself
as most instability was tracked to (very marginally) flakey RAM.
However while the glitches were caused by corrupt RAM
they left me with faults in the filesystem, faults that persisted across reboots.
These included un-list-able and un-cat-able files.
ie: read or ask the size of that file
and it's bye-bye to that terminal.
It made the whole system unuseable
as processes "trod on the cracks" and hung.
Backups? Hah, not with that file in the partition.
So I think a lot of bad press stems from the misconception
that any filesystem can avoid bitrot forever without an fsck.
But this is painful to do by hand, I have to boot a rescue system
and run reiserfsck by hand, to do the root and system partitions.
How can I get back the old behaviour an fsck happening
during reboot every x reboots or y days?
Or, how can I trigger an "fsck reboot"?
TIA, michaelj
PS: I've just realized I can do it by adding an fsck
into the linuxrc script of a cooked initrd image.
That would give me an "fsck boot" option in grub. Comments?
Signature · 3 lines
Michael James [email protected] System Administrator voice: 02 6246 5040 CSIRO Bioinformatics Facility fax: 02 6246 5166
2004-01-29T23:15:10 Michael James:
Quoted 2 lines
PS: I've just realized I can do it by adding an fsck
into the linuxrc script of a cooked initrd image.
I'm sure there are many approaches that can be used, but it so happens that I can specifically comment on that one, having recently gotten started playing with initrds.
They're so easy, so fun!
If I wanted to make a "fsck boot", here's how _I_ would do it.
dd if=/dev/zero bs=1024k count=4 of=initrd.fs mke2fs initrd.fs
mount -o loop initrd.fs /mnt
# copy a full busybox setup onto /mnt
# copy the statically-linked fsck binary I want to /mnt sync
umount /mnt
gzip -9 <initrd.fs >initrd.img
That's a rescue disk. If you want it to be completely automated, add this etc/init.d/rcS, mode 0755:
#!/bin/sh fsck command I want reboot
I've got a statically linked busybox (along with a lot of other components, all statically linked against uClibc) available from <URL:http://bent.latency.net/bent/>. For rescue disk creation you'll want to unpack elsewhere and delete docs, and var/lib/bpm (where the complete package sources are installed).
To boot such an initrd, besides specifying your kernel and initrd, you want to add "rw" and "root=/dev/ram0" to your boot options.
But I don't think I'd actually respond this way to the problem you've got. RAM is so cheap, run memtest86 to find out for sure which bits are marginal, and replace 'em.
-Bennett