LinuxCommandLibrary

mkreiserfs

Create ReiserFS filesystem

SYNOPSIS

mkreiserfs [options] device

PARAMETERS

-b block_size
    Sets the block size in bytes. Default is 4096. Must be a power of 2 and greater than 1023.

-d format_version
    Specifies the format version. Available options: 3.6 (default) and 4. Use only if absolutely necessary (check 'man 5 reiserfs').

-f average_size
    Set the average size of files on the filesystem to optimize space allocation.

-g hash_function
    Sets the hash function used for directory indexing. Valid options are r5, rupasov, or tea. Default is rupasov.

-j journal_size
    Sets the journal size in kilobytes. Default is calculated based on the filesystem size.

-l volume_label
    Sets the volume label of the filesystem.

-o hash_alg
    Sets the hash algorithm for format version 4. Options include 'rupasov' (default) and 'tea'.

-q
    Quiet mode. Suppresses output.

-V
    Prints the version and exits.

-v
    Verbose mode. Prints additional information.

DESCRIPTION

The mkreiserfs command is used to create a ReiserFS filesystem on a specified device or partition. ReiserFS is a journaling filesystem, known for its efficiency with small files.

Using mkreiserfs involves specifying the device or partition, and optionally setting various parameters to tune the filesystem's behavior. Parameters such as block size, journal size, and format version can be configured to optimize the filesystem for specific workloads. Incorrect use of mkreiserfs can lead to data loss, so careful consideration should be given to the chosen parameters before execution.

CAVEATS

Using the wrong parameters with mkreiserfs can result in an unusable filesystem and potential data loss. Always double-check your parameters and ensure you are using the correct device before running the command. It's highly recommended to back up any important data before creating a new filesystem. Incorrect block size can lead to incompatibility with certain tools. Using format version 4 is not generally recommended and should only be done if you understand the consequences. Check 'man 5 reiserfs' for additional details.

EXAMPLE USAGE

To create a ReiserFS filesystem on /dev/sdb1 with default settings:
mkreiserfs /dev/sdb1

To create a ReiserFS filesystem with a specified journal size:
mkreiserfs -j 8192 /dev/sdb1

VERIFICATION

After creating the filesystem, you can verify it using fsck.reiserfs or mount it and inspect its structure.

HISTORY

ReiserFS was developed by Namesys. Version 3 was widely adopted. Later Reiser4 was created, but never widely adopted. mkreiserfs is the utility for creating ReiserFS version 3 and version 4 filesystems. The 3.6 version is the most reliable version.

SEE ALSO

mkfs(8), fsck.reiserfs(8), mount(8), reiserfsck(8), resize_reiserfs(8)

Copied to clipboard