mkfs.jfs
Create a JFS filesystem
SYNOPSIS
mkfs.jfs [options] device
PARAMETERS
-q
Quiet mode. Suppresses most output except for errors.
-V
Print version information and exit.
-c
Check device for bad blocks before creating the file system. This option might take a significant amount of time.
-r ratio
Reserved block count ratio. Specifies the percentage of blocks reserved for use by the file system. The ratio must be between 0 and 100. This is typically used to ensure that the file system can still be used by privileged processes even when non-privileged users have filled it.
-s size
This option is ignored by mkfs.jfs as JFS always uses a fixed block size of 4KB. It is provided for compatibility with other mkfs commands but has no effect.
-L label
Set the volume label for the new file system. The label can be up to 16 characters long.
device
The block device (e.g., /dev/sdb1) or file that will be formatted as a JFS file system. This argument is mandatory.
DESCRIPTION
The mkfs.jfs command is used to build a new Journaled File System (JFS) on a specified device, typically a disk partition or a file that will act as a block device. JFS is a robust and scalable file system developed by IBM, known for its journaling capabilities which help maintain file system consistency and data integrity, especially after system crashes or unexpected power loss.
When executed, mkfs.jfs irrevocably erases all existing data on the target device and initializes the necessary JFS data structures, including the superblock, allocation group descriptors, and inode tables. It prepares the device so that it can be mounted and used for storing files and directories. Although not as prevalent as Ext4 or XFS on Linux systems today, JFS offers a stable and reliable option for specific use cases, inheriting its design principles from high-performance enterprise systems like IBM AIX and OS/2.
CAVEATS
Using mkfs.jfs will permanently erase all data on the specified device. Always double-check the 'device' argument before execution to prevent accidental data loss. JFS typically uses a fixed block size of 4KB, unlike some other filesystems that allow customization. While stable, JFS development on Linux is less active compared to other modern journaling filesystems like Ext4, XFS, or Btrfs.
FIXED BLOCK SIZE
Unlike many other file systems, JFS uses a fixed block size of 4KB. The mkfs.jfs command does not provide an option to change this, and any `-s` option provided will be ignored.
ROOT PRIVILEGES
To execute mkfs.jfs successfully, you typically need root privileges, as it operates directly on block devices.
HISTORY
The Journaled File System (JFS) originated from IBM's AIX operating system in the early 1990s as JFS1, later evolving into JFS2 for OS/2 Warp and subsequent AIX versions. It was designed to provide high performance and data integrity for demanding enterprise environments. The Linux port of JFS2 began in the late 1990s, with IBM releasing the source code under the GPL, leading to its inclusion in the Linux kernel mainline. The mkfs.jfs command, part of the jfsutils package, is the primary tool for preparing devices with this file system format on Linux. While once a prominent alternative, its usage has somewhat declined on Linux in favor of newer, actively developed filesystems, but it remains a robust and supported option.