JFS

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page JFS and the translation is 23% complete.
Outdated translations are marked like this.
Resources

JFS (Journaled File System) は、IBM によって作成された、64 ビットのジャーナリングファイルシステムです。Linux カーネルのための実装は、GNU 一般公衆利用許諾書の下で自由ソフトウェアとして利用できます。JFS は資源をあまり使用せず、比較的高速に、何かに特化されたものとは反対に (例えば XFS は大きなファイルに対しては高速ですが、小さなファイルに対しては低速です)、あらゆる種類のファイルシステムの操作を行うことができます。ですから、JFS はバッテリ駆動の、例えばノートパソコンのようなデバイスにとって特に良いものとなります。

インストール

カーネル

JFSは標準のLinuxカーネルでサポートされています:

カーネル JFSのサポートを有効にする
File systems  --->
   <*> JFS filesystem support

JFSのオプションの機能:

カーネル JFSのオプションの機能を追加する
File systems  --->
   <*> JFS filesystem support
   [*]   JFS POSIX Access Control Lists
   [*]   JFS Security Labels
   [ ]   JFS debugging
   [*]   JFS statistics

Emerge

ファイルシステムユーティリティがsys-fs/jfsutilsパッケージで利用可能です:

root #emerge --ask sys-fs/jfsutils

Usage

Creation

root #mkfs.jfs /dev/sda1

Mount

root #mount -t jfs /dev/sda1 /path/to/mountpoint

Extracting a Fsck Log

jfs_fscklog can extract the fsck log from a JFS device.

root #jfs_fscklog -d /dev/sda1 -f fsck.log

Tuning

jfs_tune can change different parameters, to change the UUID:

root #jfs_tune -l -U random /dev/sda1

Utilities

Utility Description[1] Man page
fsck.jfs A hard link to jfs_fsck.
jfs_fsck Checks a JFS filesystem for corruption. jfs_fsck(8)
mkfs.jfs A hard link to jfs_mkfs.
jfs_mkfs Creates a new JFS filesystem. jfs_fsck(8)
jfs_debugfs A utility to perform low-level actions on a JFS filesystem. jfs_debugfs(8)
jfs_fscklog Extracts the fsck log from a JFS filesystem. jfs_fscklog(8)
jfs_logdump Dumps the journal of a filesystem into ./jfslog.dmp. jfs_logdump(8)
jfs_tune Adjusts tunable parameters of a filesystem. jfs_tune(8)

Troubleshooting

Fsck

重要
Unmount the filesystem to prevent file damage.

To check a JFS filesystem for corruption, run fsck.jfs:

root #fsck.jfs /dev/sda1

Debugfs

jfs_debugfs can be used to perform low-level actions on a JFS filesystem.

In this example, a JFS filesystem with the layout:

Tree

test/
├── a
├── b
├── c

First, the inode needs to be known for the root of the directory.

重要
The 2 is the inode number
user $ls -id
2 .

Next, enter the debugfs interface with jfs_debugfs:

root #jfs_debugfs /dev/sda1

Now list the directory using the inode number:

>dir 2
idotdot = 2
 
4096	test

4096 is the inode of the test directory, now list the contents of that directory:

>dir 4096
idotdot = 2
 
4097	a
4098	b
4099	c

To see everything that the debugfs interface do, read the man-page jfs_debugfs(8).

関連項目

References