LinuxCommandLibrary

mkreiserfs

Create ReiserFS filesystem

SYNOPSIS

mkreiserfs [options] device

PARAMETERS

-V or --version
    Displays program version and exits.

-q or --quiet
    Suppresses most output messages during creation.

-f or --force
    Forces filesystem creation even if it's already present or not empty.

-b BLOCK_SIZE or --block-size BLOCK_SIZE
    Sets the block size in bytes (1024, 2048, or 4096). Default is 4096.

-h HASH_FUNCTION or --hash HASH_FUNCTION
    Specifies the hash function for directory entries (r5, rupasov, or tea).

-S JOURNAL_SIZE or --journal-size JOURNAL_SIZE
    Defines the journal size in blocks. Default is 8MB (2048 blocks).

-s JOURNAL_MAX_BATCH or --max-batch JOURNAL_MAX_BATCH
    Sets the maximum number of blocks to write to the journal in one transaction.

-t JOURNAL_MAX_COMMIT_AGE or --max-commit-age JOURNAL_MAX_COMMIT_AGE
    Sets the maximum time in seconds before a journal commit occurs.

-o options
    Specifies ReiserFS specific options, typically passed to the kernel module.

-l LABEL or --label LABEL
    Assigns a volume label to the filesystem.

-u UUID or --uuid UUID
    Assigns a Universal Unique Identifier (UUID) to the filesystem.

-j JOURNAL_DEVICE or --journal-device JOURNAL_DEVICE
    Uses an external device for the journal.

-A or --avoid-badblocks-check
    Skips the bad block scan during filesystem creation.

DESCRIPTION

mkreiserfs is a utility used to create a ReiserFS filesystem on a block device, such as a hard drive partition or a logical volume. ReiserFS is a journaling filesystem that organizes all filesystem objects (inodes, directories, data) into a single, balanced tree structure, aiming for efficiency and performance, especially with many small files. It was once a popular alternative to ext3, offering features like efficient handling of small files and journaling for data integrity. While it provides good performance, it has largely been superseded by newer filesystems like ext4, XFS, and Btrfs due to ongoing development, feature sets, and broader community support. It's crucial to understand that creating a new filesystem on a device will destroy all existing data on that device.

CAVEATS

ReiserFS is a legacy filesystem. Newer, more actively developed alternatives (ext4, XFS, Btrfs) are generally recommended for new deployments due to better performance, stability, and ongoing support.

While later versions improved journaling, some older ReiserFS versions (before 3.6) had a higher risk of data corruption during power failures or unclean shutdowns under specific workloads.

Always use reiserfsck to check and repair ReiserFS filesystems, especially after unclean shutdowns.

Creating a new filesystem will irrevocably destroy all existing data on the target device.

<I>USAGE EXAMPLE</I>

To create a ReiserFS filesystem on a partition like /dev/sda1 with default settings:

sudo mkreiserfs /dev/sda1

To create a ReiserFS filesystem with a specific block size and label:

sudo mkreiserfs -b 4096 -l "MyDataDisk" /dev/sdb1

Always ensure you are targeting the correct device, as this operation will erase all existing data.

HISTORY

ReiserFS was developed by Hans Reiser and Namesys, first included in the Linux kernel in version 2.4.1 in 2001. It was notable for being one of the first journaling filesystems widely available for Linux, offering improved crash recovery and efficient handling of small files compared to its predecessors. It gained some popularity as an alternative to ext3. However, its development and adoption largely stalled after Hans Reiser's conviction for murder in 2008, combined with the emergence and rapid development of ext4, XFS, and Btrfs, which offered comparable or superior features and performance, along with more robust community support.

SEE ALSO

reiserfsck(8), mount(8), fsck(8), mkfs(8)

Copied to clipboard