This article'slead sectionmay need to be rewritten. Please review thelead guide and helpimprove the lead of this article if you can.(July 2014) (Learn how and when to remove this message) |
| Developer(s) | IBM et al. |
|---|---|
| Full name | IBM Journaled File System |
| Introduced | 1990 and 1999 with JFS1 inAIX 3.1 and JFS inOS/2 4.5 |
| Partition IDs | 0x35 (MBR) |
| Structures | |
| Directory contents | B+ tree |
| File allocation | Bitmap/extents |
| Limits | |
| Max volume size | 32 × 250 bytes (32PiB) |
| Max file size | 4 × 250 bytes (4 PiB) |
| Maxno. of files | No limit defined |
| Max filename length | 255 bytes |
| Allowed filename characters | AnyUnicode exceptNUL |
| Features | |
| Dates recorded | Modification (mtime), attribute modification (ctime), access (atime) |
| Date resolution | 1 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 a64-bitjournaling file system created byIBM. There are versions forAIX,OS/2,eComStation,ArcaOS andLinuxoperating 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 ofVeritas Software'sVxFS.
In the AIX operating system, two generations of JFS exist, which are calledJFS (JFS1) andJFS2 respectively.[1]
IBM'sJFS was originally designed for32-bit systems.JFS2 was designed for64-bit systems.[2]
In other operating systems, such as OS/2 and Linux, only the second generation exists and is called simplyJFS.[3] This should not be confused with JFS inAIX that actually refers to JFS1.
IBM introduced JFS with the initial release of AIX version 3.1 in February 1990. This file system, now calledJFS1 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 supportJournaling.
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 theopen source community and work was begun to port JFS toLinux. The first stable release ofJFS for Linux appeared in June 2001.[3] TheJFS for Linux project is maintained by a small group of contributors known as theJFS 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 theIBM Linux Technology Center and JFS Core Team,[4] explained that they still follow changes in theLinux kernel and try to fix potentialsoftware 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 forsolid-state drives was added to JFS.[7]
JFS supports the following features.[8][9]
JFS is ajournaling file system. Rather than adding journaling as an add-on feature like in theext3 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 toXFS in that it only journals parts of theinode.[10]
JFS uses aB+ tree to accelerate lookups in directories. JFS can store 8 entries of a directory in the directory'sinode before moving the entries to a B+ tree. JFS also indexes extents in a B+ tree.
JFS dynamically allocates space for diskinodes as necessary. Each inode is 512 bytes. 32 inodes are allocated on a 16 kB Extent.
JFS allocates files as anextent. An extent is a variable-length sequence of Aggregate blocks. An extent may be located in severalallocation groups. To solve this the extents are indexed in a B+ tree for better performance when locating the extent locations.
Compression is supported only in JFS1 on AIX and uses a variation of theLZ algorithm. Because of highCPU usage and increased free spacefragmentation, compression is not recommended for use other than on a single userworkstation or off-linebackup areas.
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]
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.
Thesuperblock maintains information about the entire file system and includes the following fields:
In the Linux operating system, JFS is supported with thekernel module (since the kernel version2.4.18pre9-ac4) and the complementaryuserspace utilities packaged under the nameJFSutils. MostLinux distributions support JFS unless it is specifically removed due to space restrictions, such as onlive 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, however, 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]