LinuxCommandLibrary

jfs_tune

Tune JFS filesystem parameters

SYNOPSIS

jfs_tune [-J] [-a bad_inode] [-b] [-D] [-j journal_dev[:start_block]] [-L volume_label] [-m minfree%] [-o option[=value]] [-p] [-P] [-N] [-V] device

PARAMETERS

-J
    Invalidate/remove the journal from the filesystem

-a bad_inode
    Set primary bad block inode number (1-32)

-b
    Print filesystem block size and exit

-D
    Dangerous: Delete all blocks/inodes (use only for recovery)

-j journal_dev[:start_block]
    Set external journal device and optional start block

-L volume_label
    Set or change filesystem volume label (max 16 chars)

-m minfree%
    Set minimum free space percentage (0-99)

-o option[=value]
    Add/remove default mount option (e.g., nointegrity)

-p
    Print current tunable parameters

-P
    Pessimistic mode: Assume fsck may fail

-N
    No-op: Print actions without changes

-V
    Print version and exit

(no options)
    Print all current settings

DESCRIPTION

jfs_tune is a utility for adjusting parameters on an existing JFS (Journaled File System) device. JFS, originally developed by IBM for AIX and ported to Linux, supports journaling for data integrity and high performance. This command allows setting the volume label, bad block inode number, minimum free space percentage, mount options, and journal location (internal or external). It prints current settings if invoked without options.

Use it to optimize filesystems post-creation with mkfs.jfs, recover from certain errors, or customize behavior. Requires root privileges and an unmounted device to prevent corruption. Incorrect usage risks data loss, so backup first and verify with jfs_fsck. Common tasks include labeling volumes for easier identification or adjusting free space thresholds for automatic full-filesystem handling.

CAVEATS

Requires root and unmounted device. Dangerous options like -D or -J can cause data loss. Always backup and run jfs_fsck after changes. Not for active filesystems.

EXAMPLE USAGE

Set label: jfs_tune -L MyJFS /dev/sdb1
Print settings: jfs_tune /dev/sdb1
External journal: jfs_tune -j /dev/sdc1:32 /dev/sdb1

HISTORY

Developed as part of IBM's open-source JFS port to Linux (2001). Initial Linux support in kernel 2.4.17; jfs_tune evolved with JFS tools for tuning AIX-derived features.

SEE ALSO

mkfs.jfs(8), jfs_fsck(8), fsck.jfs(8), mount(8)

Copied to clipboard