Creating a ReiserFS filesystem

In most cases, you will create ReiserFS partitions when you first install your system. However, if you subsequently add a new disk drive to your system, you will need to partition it and create filesystems on those partitions. The ReiserFS filesystem is an excellent choice for most Linux filesystems, especially user filesystems and mail or web server partitions where you will be creating and deleting large numbers of small files. As discussed earlier, the design of the ReiserFS makes it a fast filesystem in which to locate files and also helps you get the most out of your available storage by handling small files (less than 4K) specially.

Tip Unfortunately, there is no automatic way to convert an existing filesystem of some other type to a ReiserFS filesystem. To convert an existing filesystem to ReiserFS, you would have to ■ ' ji back up all existing data from one of your existing partitions, create a new ReiserFS partition on that partition, and then restore your data there.

Listing 3-9 shows commands (and related output) used to create a ReiserFS filesystem from scratch on / dev/hda5 using the default parameters. Although this example uses the mkfs.reiserfs command directly, you could do exactly the same thing by executing the command mkfs -t reiserfs /dev/hda5.

Listing 3-9: Creating a Reiser Filesystem bible:~ # mkfs.reiserfs /dev/hda5 mkfs.reiserfs 3.6.13 (2003

A pair of credits:

BigStorage( contributes to our general fund every month, and has done so for quite a long time.

Alexander Lyamin keeps our hardware running, and was very generous to our project in many little ways.

Guessing about desired format.. Kernel 2.6.4-52-default is running. Format 3.6 with standard journal Count of blocks on the device: 48992

Number of blocks consumed by mkreiserfs formatting process: 8213 Blocksize: 4096

Hash function used to sort names: "r5" Journal Size 8193 blocks (first block 18) Journal Max transaction length 1024 inode generation number: 0 UUID: 4af72c6a-3f9c-4097-bbce-3124bc0c214a ATTENTION: YOU SHOULD REBOOT AFTER FDISK!

ALL DATA WILL BE LOST ON '/dev/hda5'! Continue (y/n):y

Initializing journal - 0%____20%____40%____60%____80%____100%


ReiserFS is successfully created on /dev/hda5.

As you may have noticed, the creation of the ReiserFS filesystem makes doubly sure that you are aware that you will erase data on your partition once the filesystem has been created. As ReiserFS is a large project for a small amount of people to look after, it is funded by various organizations. The developers have been lucky that major organizations rely heavily on the success of ReiserFS and have bought support contracts that directly help maintain the development of ReiserFS.

Continue reading here: Filesystem Benchmarks

Was this article helpful?

0 -1