You are not logged in.

#1 2011-11-07 11:27:20

Awebb
Member
Registered: 2010-05-06
Posts: 6,304

[SOLVED] reiserfs: can the journal be full?

I recently discovered that working with billions of files can be a pain in Ext3/4, because the inode table will be full, before 10% of the disk space is used. I remembered that reiserfs was said to be good in this scenario, so I gave it a shot.

While I know, that the reiserfs journal works differently from the Ext3 inode table, I'm still uncertain what I have to pay attention to. df -i does not show the status of the journal and - since reiser documentation is rarely written with Ext in mind - I still have trouble finding the right keywords to feed the search engine with.

1. Can the reiserfs (not Reiser4!) journal be full or does it grow dynamically?
2. Are there any tools I can use to check the status of the journal?
3. Does it make sense to move the journal to it's own device generally, or is this highly case sensitive?

EDIT:

Wonderful. Just as I posted my questions, I had a bright moment and understood the Wikipedia article:

Design

ReiserFS stores file metadata ("stat items"), directory entries ("directory items"), inode block lists ("indirect items"), and tails of files ("direct items") in a single, combined B+ tree keyed by a universal object ID. Disk blocks allocated to nodes of the tree are "formatted internal blocks". Blocks for leaf nodes (in which items are packed end-to-end) are "formatted leaf blocks". All other blocks are "unformatted blocks" containing file contents. Directory items with too many entries or indirect items which are too long to fit into a node spill over into the right leaf neighbour. Block allocation is tracked by free space bitmaps in fixed locations.

By contrast, ext2 and other Berkeley FFS-like file systems of that time simply used a fixed formula for computing inode locations, hence limiting the number of files they may contain.[17] Most such file systems also store directories as simple lists of entries, which makes directory lookups and updates linear time operations and degrades performance on very large directories. The single B+ tree design in ReiserFS avoids both of these problems due to better scalability properties.

So, does this answer 1.? Did I get it? Will an Ext3-like full inode table never happen on reiserfs?

Last edited by Awebb (2011-11-07 13:20:02)

Offline

#2 2011-11-07 11:57:56

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] reiserfs: can the journal be full?

As far as I understand, a journal and an inode table aren't the same, even between ext3/4 and ReiserFS. Ext3/4 do not allow for inodes to be added or removed (short of reformatting). ReiserFS, however, allocates inodes dynamically. So you shouldn't run out of inodes on ReiserFS. So while ext3/4's inode table is fully static, ReiserFS's one is dynamic.

The journal of a journaling filesystem merely logs transactions so the file system can be put back in a consistent state after e.g. a crash or a power outage. That has nothing to do with the inode table.

In case you're still interested in changing ReiserFS journal size, check this from man 8 reiserfs.tunefs:

-s N, --journal-size=N
    journal size. This is the journal size. For journal on host device it must be gretter than 512 blocks and lesser than count of blocks described by first bitmap block. In other words, journal must be lesser or equals block_size * 8 journal offset - 1. In the case given journal size not equals previous journal size tunefs.reiserfs will perform journal resizing. For relocated journal it will be recreated with new params. And for standard journal data blocks will be relocated first, then journal will be recreated with new boundaries.

The journal does not grow dynamically though, every Linux filesystem test I've seen so far had multiple test runs for different ReiserFS journal sizes.

Last edited by .:B:. (2011-11-07 12:00:56)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2011-11-07 13:19:49

Awebb
Member
Registered: 2010-05-06
Posts: 6,304

Re: [SOLVED] reiserfs: can the journal be full?

Oh, you're right, I confused inodes and the journal again.

Thanks for the hint on reiserfs.tunefs, that was pretty much what I was looking for. I never had to deal with filesystems before (I mean besides creating, deleting and resizing them in gparted).

I've learned another thing: When your google-fu fails, type "locate [keyword]", everything you need is usually out there.

Marked as solved.

Offline

Board footer

Powered by FluxBB