JFS (file system)

Last updated

JFS
Developer(s) IBM et al.
Full nameIBM Journaled File System
Introduced1990 and 1999 with JFS1 in AIX 3.1 and JFS in OS/2 4.5
Partition IDs 0x35 (MBR)
Structures
Directory contents B+ tree
File allocationBitmap/extents
Limits
Max volume size32 × 250 bytes (32 PiB)
Max file size4 × 250 bytes (4 PiB)
Max no. of filesNo limit defined
Max filename length255 bytes
Allowed filename
characters
Any Unicode except NUL
Features
Dates recordedModification (mtime), attribute modification (ctime), access (atime)
Date resolution1 ns
Forks Yes
File system
permissions
Unix permissions, ACLs
Transparent
compression
Only in JFS1 on AIX
Transparent
encryption
No (provided at the block device level)
Data deduplication No
Other
Supported
operating systems
AIX, OS/2, Linux, eComStation, ArcaOS

Journaled File System (JFS) is a 64-bit journaling file system created by IBM. There are versions for AIX, OS/2, eComStation, ArcaOS and Linux operating systems. The latter is available as free software under the terms of the GNU General Public License (GPL). HP-UX has another, different filesystem named JFS that is actually an OEM version of Veritas Software's VxFS.

Contents

In the AIX operating system, two generations of JFS exist, which are called JFS (JFS1) and JFS2 respectively. [1]

IBM's JFS was originally designed for 32-bit systems. JFS2 was designed for 64-bit systems. [2]

In other operating systems, such as OS/2 and Linux, only the second generation exists and is called simply JFS. [3] This should not be confused with JFS in AIX that actually refers to JFS1.

History

IBM introduced JFS with the initial release of AIX version 3.1 in February 1990. This file system, now called JFS1 on AIX, was the premier file system for AIX over the following decade and was installed in thousands or millions of customers' AIX systems. Historically, the JFS1 file system is very closely tied to the memory manager of AIX, [1] which is a typical design for a file system supporting only one operating system. JFS was one of the first file systems to support Journaling.

In 1995, work began to enhance the file system to be more scalable and to support machines that had more than one processor. Another goal was to have a more portable file system, capable of running on multiple operating systems. After several years of designing, coding, and testing, the new JFS was first shipped in OS/2 Warp Server for eBusiness in April 1999, and then in OS/2 Warp Client in October 2000. In December 1999, a snapshot of the original OS/2 JFS source was granted to the open source community and work was begun to port JFS to Linux. The first stable release of JFS for Linux appeared in June 2001. [3] The JFS for Linux project is maintained by a small group of contributors known as the JFS Core Team. [4] This release of sources also worked to form the basis of a re-port back to OS/2 of the open-source JFS.

In parallel with this effort, some of the JFS development team returned to the AIX Operating System Development Group in 1997 and started to move this new JFS source base to the AIX operating system. In May 2001, a second journaled file system, Enhanced Journaled File System (JFS2), was made available for AIX 5L. [1] [3]

Early in 2008 there was speculation that IBM is no longer interested in maintaining JFS and thus it should not be used in production environments. [5] However, Dave Kleikamp, a member of the IBM Linux Technology Center and JFS Core Team, [4] explained that they still follow changes in the Linux kernel and try to fix potential software bugs. He went on to add that certain distributions expect a larger resource commitment from them and opt not to support the filesystem. [6]

In 2012, TRIM command support for solid-state drives was added to JFS. [7]

Features

JFS supports the following features. [8] [9]

Journal

JFS is a journaling file system. Rather than adding journaling as an add-on feature like in the ext3 file system, it was implemented from the start. The journal can be up to 128 MB. JFS journals metadata only, which means that metadata will remain consistent but user files may be corrupted after a crash or power loss. JFS's journaling is similar to XFS in that it only journals parts of the inode. [10]

B+ tree

JFS uses a B+ tree to accelerate lookups in directories. JFS can store 8 entries of a directory in the directory's inode before moving the entries to a B+ tree. JFS also indexes extents in a B+ tree.

Dynamic inode allocation

JFS dynamically allocates space for disk inodes as necessary. Each inode is 512 bytes. 32 inodes are allocated on a 16 kB Extent.

Extents

JFS allocates files as an extent. An extent is a variable-length sequence of Aggregate blocks. An extent may be located in several allocation groups. To solve this the extents are indexed in a B+ tree for better performance when locating the extent locations.

Compression

Compression is supported only in JFS1 on AIX and uses a variation of the LZ algorithm. Because of high CPU usage and increased free space fragmentation, compression is not recommended for use other than on a single user workstation or off-line backup areas.

Concurrent input / output (CIO)

JFS normally applies read-shared, write-exclusive locking to files, which avoids data inconsistencies but imposes write serialization at the file level. The CIO option disables this locking. Applications such as relational databases which maintain data consistency themselves can use this option to largely eliminate filesystem overheads. [11]

Allocation groups

JFS uses allocation groups. Allocation groups divide the aggregate space into chunks. This allows JFS to use resource allocation policies to achieve great I/O performance. The first policy is to try to cluster disk blocks and disk inodes for related data in the same AG in order to achieve good locality for the disk. The second policy is to distribute unrelated data throughout the file system in an attempt to minimize free-space fragmentation. When there is an open file JFS will lock the AG the file resides in and only allow the open file to grow. This reduces fragmentation as only the open file can write to the AG.

Superblocks

The superblock maintains information about the entire file system and includes the following fields:

On Linux

In the Linux operating system, JFS is supported with the kernel module (since the kernel version 2.4.18pre9-ac4) and the complementary userspace utilities packaged under the name JFSutils. Most Linux distributions support JFS unless it is specifically removed due to space restrictions, such as on live CDs.[ citation needed ]

According to benchmarks of the available filesystems for Linux, JFS is fast and reliable, with consistently good performance under different kinds of load. [12]

Actual usage of JFS in Linux is uncommon, as ext4 typically offers better performance[ citation needed ]. JFS does have a niche role in Linux: it offers a case-insensitive mount option, unlike most other Linux file systems. [13]

There are also potential problems with JFS, such as its implementation of journal writes. They can be postponed until there is another trigger—potentially indefinitely, which can cause data loss over a theoretically infinite timeframe. [14]

See also

Related Research Articles

XFS is a high-performance 64-bit journaling file system created by Silicon Graphics, Inc (SGI) in 1993. It was the default file system in SGI's IRIX operating system starting with its version 5.3. XFS was ported to the Linux kernel in 2001; as of June 2014, XFS is supported by most Linux distributions; Red Hat Enterprise Linux uses it as its default file system.

ReiserFS is a general-purpose, journaling file system initially designed and implemented by a team at Namesys led by Hans Reiser and licensed under GPLv2. Introduced in version 2.4.1 of the Linux kernel, it was the first journaling file system to be included in the standard kernel. ReiserFS was the default file system in Novell's SUSE Linux Enterprise until Novell decided to move to ext3 for future releases on October 12, 2006.

ext2, or second extended file system, is a file system for the Linux kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed according to the same principles as the Berkeley Fast File System from BSD, it was the first commercial-grade filesystem for Linux.

ext3, or third extended filesystem, is a journaled file system that is commonly used by the Linux kernel. It used to be the default file system for many popular Linux distributions. Stephen Tweedie first revealed that he was working on extending ext2 in Journaling the Linux ext2fs Filesystem in a 1998 paper, and later in a February 1999 kernel mailing list posting. The filesystem was merged with the mainline Linux kernel in November 2001 from 2.4.15 onward. Its main advantage over ext2 is journaling, which improves reliability and eliminates the need to check the file system after an unclean shutdown. Its successor is ext4.

<span class="mw-page-title-main">Defragmentation</span> Rearrangement of sectors on a hard disk into contiguous units

In the maintenance of file systems, defragmentation is a process that reduces the degree of fragmentation. It does this by physically organizing the contents of the mass storage device used to store files into the smallest number of contiguous regions. It also attempts to create larger regions of free space using compaction to impede the return of fragmentation. Some defragmentation utilities try to keep smaller files within a single directory together, as they are often accessed in sequence.

Reiser4 is a computer file system, successor to the ReiserFS file system, developed from scratch by Namesys and sponsored by DARPA as well as Linspire. Reiser4 was named after its former lead developer Hans Reiser. As of 2021, the Reiser4 patch set is still being maintained, but according to Phoronix, it is unlikely to be merged into mainline Linux without corporate backing.

The inode is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attributes may include metadata, as well as owner and permission data.

In computing, the Global File System 2 or GFS2 is a shared-disk file system for Linux computer clusters. GFS2 allows all members of a cluster to have direct concurrent access to the same shared block storage, in contrast to distributed file systems which distribute data throughout the cluster. GFS2 can also be used as a local file system on a single computer.

A disk quota is a limit set by a system administrator that restricts certain aspects of file system usage on modern operating systems. The function of using disk quotas is to allocate limited disk space in a reasonable way.

<span class="mw-page-title-main">File system</span> Computer filing system

In computing, a file system or filesystem governs file organization and access. A local file system is a capability of an operating system that services the applications running on the same computer. A distributed file system is a protocol that provides file access between networked computers.

The VERITAS File System is an extent-based file system. It was originally developed by VERITAS Software. Through an OEM agreement, VxFS is used as the primary filesystem of the HP-UX operating system. With on-line defragmentation and resize support turned on via license, it is known as OnlineJFS. It is also supported on AIX, Linux, Solaris, OpenSolaris, SINIX/Reliant UNIX, UnixWare and SCO OpenServer. VxFS was originally developed for AT&T's Unix System Laboratories. VxFS is packaged as a part of the Veritas Storage Foundation.

In computing, an extent is a contiguous area of storage reserved for a file in a file system, represented as a range of block numbers, or tracks on count key data devices. A file can consist of zero or more extents; one file fragment requires one extent. The direct benefit is in storing each range compactly as two numbers, instead of canonically storing every block number in the range. Also, extent allocation results in less file fragmentation.

Extended file attributes are file system features that enable users to associate computer files with metadata not interpreted by the filesystem, whereas regular attributes have a purpose strictly defined by the filesystem. Unlike forks, which can usually be as large as the maximum file size, extended attributes are usually limited in size to a value significantly smaller than the maximum file size. Typical uses include storing the author of a document, the character encoding of a plain-text document, or a checksum, cryptographic hash or digital certificate, and discretionary access control information.

The following tables compare general and technical information for a number of file systems.

ext4 is a journaling file system for Linux, developed as the successor to ext3.

chattr is the command in Linux that allows a user to set certain attributes of a file. lsattr is the command that displays the attributes of a file.

Btrfs is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager, developed together. It was created by Chris Mason in 2007 for use in Linux, and since November 2013, the file system's on-disk format has been declared stable in the Linux kernel.

A journaling file system is a file system that keeps track of changes not yet committed to the file system's main part by recording the goal of such changes in a data structure known as a "journal", which is usually a circular log. In the event of a system crash or power failure, such file systems can be brought back online more quickly with a lower likelihood of becoming corrupted.

Next3 is a journaling file system for Linux based on ext3 which adds snapshots support, yet retains compatibility to the ext3 on-disk format. Next3 is implemented as open-source software, licensed under the GPL license.

References

  1. 1 2 3 "A Mini-FAQ for JFS". JFS for Linux project.
  2. "IBM JFS and JFS2". IBM.
  3. 1 2 3 "Interview with the People Behind JFS, ReiserFS & XFS".
  4. 1 2 "JFS for Linux". JFS.SourceForge.net. Retrieved August 26, 2020.
  5. "Re: which to use: ext3, JFS, XFS, ReiserFS?". Archived from the original on March 3, 2016. Retrieved March 31, 2008.
  6. SourceForge.net: jfs-discussion
  7. "TRIM support for JFS Filesystem".
  8. "JFS overview". Steve Best, IBM. Archived from the original on January 29, 2008. Retrieved January 9, 2008.
  9. "JFS Layout" (PDF). Steve Best, IBM. Retrieved May 1, 2008.
  10. David Kleikamp. "JFS journal". OSDIR. Archived from the original on March 3, 2016. Retrieved July 7, 2008.
  11. "Improving Database Performance With AIX Concurrent I/O - White Paper" (PDF). IBM.com. IBM.
  12. "9-Way File-System Comparison With A SSD On The Linux 3.17 Kernel". Phoronix.com. Retrieved July 7, 2020.
  13. "jfs_mkfs: create a JFS formatted partition - Linux Man Pages (8)". SysTutorials.com. Retrieved July 7, 2020.
  14. Analysis and Evolution of Journaling File Systems - V. Prabhakaran and others 2013-06