1 |
The Doctor <drwho@××××××××.net> posted 4978B84A.6080204@××××××××.net, |
2 |
excerpted below, on Thu, 22 Jan 2009 13:17:46 -0500: |
3 |
|
4 |
> I just gave it a try with a 32 megabyte SD card on my laptop. |
5 |
|
6 |
32 megs? That's small! How old is it? I looked at that and thought to |
7 |
myself "typo, he must have meant gigs", but then I saw the below... |
8 |
|
9 |
> ...but I wasn't able to create a ReiserFS file system: |
10 |
|
11 |
> reiserfs_create_journal: cannot create a journal of 8193 blocks with 18 |
12 |
> offset on 7456 blocks |
13 |
> |
14 |
> Oops. Too small a device, I guess. So, I tried EXT3: |
15 |
|
16 |
Yes, it must have been 32 meg. reiserfs uses a 4k blocksize by default, |
17 |
and as it mentions, an 8193 block journal, again by default. That's |
18 |
about... 32 MB. So yes indeed, you'd have problems fitting that on a 32 |
19 |
MB device -- it'd be all journal! There are parameters you can add to |
20 |
mkfs.reiserfs/mkreiserfs to change both the block size (-b, 512 byte to |
21 |
8k, 4k default) and the journal size (-s, 513-32749 blocks, default |
22 |
8193), thus yielding a minimum journal size of 256.5kb which would have |
23 |
easily fit, but you'd not be expected to know that since you don't run it |
24 |
routinely, and even many who do probably don't know it. |
25 |
|
26 |
BTW, due to reiserfs' dedicated journal (hidden) file, the fact it can't |
27 |
be disabled (tho it can be on a separate device) and the frequency it'll |
28 |
be written, I don't believe reiserfs is particularly suitable for flash |
29 |
based media. |
30 |
|
31 |
But for much the same reason, no traditionally journalled filesystem, |
32 |
where journalled means rewriting the data twice, is particularly suitable |
33 |
for flash. So ext3 is out as well, tho ext2 will work. |
34 |
|
35 |
The modern alternative, as implemented by reiser4 and now btrfs (I |
36 |
believe), isn't journaling per se, but what is called wandering trees, |
37 |
write the data once and then migrate the metadata up the tree. |
38 |
|
39 |
But even that's not the best for flash. Logging filesystems, which |
40 |
continuously write new data appended to the end of the old data, to the |
41 |
size of the volume before scrubbing deletions and etc, work better, since |
42 |
they don't rewrite anything until the entire volume is full, then they |
43 |
rewrite and compress the data toward the beginning of the volume, and |
44 |
start appending again, so no blocks are ever worn out more than a single |
45 |
cycle more than the rest of the device, depending on where the current |
46 |
log-writing pointer is located. |
47 |
|
48 |
-- |
49 |
Duncan - List replies preferred. No HTML msgs. |
50 |
"Every nonfree program has a lord, a master -- |
51 |
and if you use the program, he is your master." Richard Stallman |