Reiserfs question
Russell Coker
russell at coker.com.au
Thu Oct 28 13:47:45 UTC 2004
On Thu, 28 Oct 2004 03:51, ngc4013 at cox.net wrote:
> In the past I too have lost data due to power outages and ext2 or ext3
> filesystems, but now I have exclusively been using reiserfs for about 5
> years now on all my boot drives and on my RAID boxes. I typically see >25%
> speed increase when writing out large files and accessing them for
> processing purposes and have had zero data loss. Reiserfs4 is looking like
> it will provide >60% increase in file writes and a boost in file reads...
> wish it was ready for prime time.
When I was last using ReiserFS it was impossible to do a full fsck of a file
system that was mounted read-only. This meant that certain classes of error
which on Ext2/3 could be fixed by a regular fsck run required that the
machine be booted from other media. This could be fixed by having reiserfsck
in the initrd, but AFAIK no-one has done this.
Last time I spoke to Hans about corrupted ReiserFS file systems causing system
crashes (not orderly panics) through access to random memory he didn't seem
to consider it a big deal. Checking all data structures decreases
performance. The ext2/3 developers seem to have a goal of never having a
corrupted file system kill the entire machine.
Reiser3 has some annoying design deficiencies. One of which is that you can't
use a ReiserFS file system to store an image of another ReiserFS file system.
This means that for example if you have a file system that is corrupted
beyond the ability of reiserfsck to repair you must make sure that you put an
image of it on an ext2/3 file system if you want to keep a copy to test new
versions of reiserfsck. Otherwise a fsck of the file system which contains
the image file will make it contain both sets of files, here's an example:
mkreiserfs /dev/hda6
mount /dev/hda6 /mnt
cp ~/foo /mnt
umount /mnt
mkreiserfs /dev/hda7
mount /dev/hda7 /mnt
dd if=/dev/hda6 of=/mnt/fs-image
umount /mnt
reiserfsck /dev/hda7
mount /dev/hda7 /mnt
find /mnt -name foo (reveals that the file is there, it's escaped from
fs-image).
ReiserFS performed much better than ext2/3 for file creation, deletion, and
random file stat operations before directory indexing was added. Even
afterwards ReiserFS seemed to have a performance benefit in these areas but
it was much smaller. ReiserFS performed significantly worse than ext2/3 for
writing small amounts of data if you don't mount with notails. Mounting with
notails removes one of the advantages of ReiserFS which is better space
efficiency for small files. ReiserFS performed very poorly when compared to
ext2/3 for writing data to files a byte at a time when I last benchmarked it.
Also creating a large hole in a file has given terrible performance for
ReiserFS (seek 10G and write 1 byte and the kernel will use some minutes of
CPU time and block everything else).
One minor bug I found on ReiserFS which AFAIK has not been fixed is that if
process A is in a loop of "write 1 byte to file and seek to 0" then another
process which opened the same file read-only would not be able to close it
(the close would block forever). There is probably some good potential for
DOS attacks in that.
I like Hans and I like ReiserFS. But the situations in which I use it are
limited for the above reasons. Also ReiserFS can not be used as a root file
system for SE Linux which is another reason for me not to use it.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
More information about the fedora-test-list
mailing list