========================================================= これは、 linux-2.6.29/Documentation/filesystems/xfs.txt の和訳 です。 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 更新日 : 2009/03/28 翻訳者 : Seiji Kaneko < skaneko at mbn dot or dot jp > 校正者 : Nobumitsu Takei < takei at webmaster dor gr dot jp > ========================================================= #The SGI XFS Filesystem SGI XFS ファイルシステム ====================== #XFS is a high performance journaling filesystem which originated #on the SGI IRIX platform. It is completely multi-threaded, can #support large files and large filesystems, extended attributes, #variable block sizes, is extent based, and makes extensive use of #Btrees (directories, extents, free space) to aid both performance #and scalability. XFS は高性能なジャーナリングファイルシステムで、SGI IRIX プラットフォームに 由来するものです。 これは完全にマルチスレッド対応されており、巨大なファイルと巨大なファイルシス テムの両方に対応し、拡張アトリビュートに対応し、ブロックサイズ可変なファイル システムであり、エクステントベースであり、B-tree (ディレクトリ、エクステント、 空き領域で) を多用する形で実装されています。これは性能と拡張性の両方を満たす ためです。 #Refer to the documentation at http://oss.sgi.com/projects/xfs/ #for further details. This implementation is on-disk compatible #with the IRIX version of XFS. 詳細については、http://oss.sgi.com/projects/xfs/ にある解説文書を参考 にしてください。この実装は、ディスク上で IRIX 版の XFS に互換となっています。 #Mount Options マウントオプション ============= #When mounting an XFS filesystem, the following options are accepted. XFS ファイルシステムをマウントする際には、以下のオプションを受け付けます。 allocsize=size # Sets the buffered I/O end-of-file preallocation size when # doing delayed allocation writeout (default size is 64KiB). # Valid values for this option are page size (typically 4KiB) # through to 1GiB, inclusive, in power-of-2 increments. 遅延書き込みでの割り当て時に、バッファ I/O end-of-file プリアロケーシ ョンサイズを指定します。標準値は 64KiB です。有効な値はページサイズ (通常 4KiB) の 2 の冪乗倍で、最大 1GiB です。 attr2/noattr2 # The options enable/disable (default is disabled for backward # compatibility on-disk) an "opportunistic" improvement to be # made in the way inline extended attributes are stored on-disk. # When the new form is used for the first time (by setting or # removing extended attributes) the on-disk superblock feature # bit field will be updated to reflect this format being in use. このオプションは、インライン拡張アトリビュートをディスク上に格納す る方法に「改善する可能性が高い」変更を加える動作を有効とするか無効 とするかを指定するものです。既定値は、ディスク上のデータの後方互換 性のため無効になっています。 このオプションの指定による新しい (ディスク上の) 形式が最初に使用さ れた際に (拡張アトリビュートをセットあるいは削除することによって)、 ディスク上のスーパーブロックのフィーチャビット列は、使用されている フォーマットを反映するよう更新されます。 barrier # Enables the use of block layer write barriers for writes into # the journal and unwritten extent conversion. This allows for # drive level write caching to be enabled, for devices that # support write barriers. ジャーナルと未書き込みのエクステント変換時の書き込みに対する、ブロッ クレイヤライトバリアを有効にします。 このオプションは、ライトバリアをサポートしたデバイスで、ドライブレベ ル書き込みキャッシュを有効にできるようにします。 dmapi # Enable the DMAPI (Data Management API) event callouts. # Use with the "mtpt" option. DMAPI (Data Management API) イベント起動を有効化します。 "mtpt" オプションと合わせて用いてください。 # grpid/bsdgroups and nogrpid/sysvgroups grpid/bsdgroups および nogrpid/sysvgroups # These options define what group ID a newly created file gets. # When grpid is set, it takes the group ID of the directory in # which it is created; otherwise (the default) it takes the fsgid # of the current process, unless the directory has the setgid bit # set, in which case it takes the gid from the parent directory, # and also gets the setgid bit set if it is a directory itself. これらのオプションは新規に作られたファイルのグループ ID を指定しま す。grpid が設定されている場合には、作成されたファイルのあるディレ クトリの group ID が使用されます。設定されていない場合 (既定値) に は、setgid ビットがディレクトリに設定されている場合を除いて (この場 合は親ディレクトリの gid が使われ、また対象がディレクトリだった場合 には、setgid ビットがセットされます)、現プロセスの fsgid が使われま す。 ihashsize=value # In memory inode hashes have been removed, so this option has # no function as of August 2007. Option is deprecated. メモリ inode ハッシュが削除されたため、このオプションは 2007 年 8 月以降何もしません。オプションは廃止予定です。 ikeep/noikeep # When ikeep is specified, XFS does not delete empty inode clusters # and keeps them around on disk. ikeep is the traditional XFS # behaviour. When noikeep is specified, empty inode clusters # are returned to the free space pool. The default is noikeep for # non-DMAPI mounts, while ikeep is the default when DMAPI is in use. ikeep が指定されている場合、XFS は空の inode クラスタを削除せず、 ディスクに保持し続けます。ikeep は従来の XFS の挙動です。noikeep が指定された場合には、空の inode クラスタはフリースペースプールに 戻されます。既定値は DMAPI なしのマウントでは noikeep で、DMAPI が使用されている場合は ikeep です。 inode64 # Indicates that XFS is allowed to create inodes at any location # in the filesystem, including those which will result in inode # numbers occupying more than 32 bits of significance. This is # provided for backwards compatibility, but causes problems for # backup applications that cannot handle large inode numbers. XFS がファイルシステム中のどの位置にでも inode を作成してよいことを 指示します。これは inode 番号が 32 ビット整数の最大値 (i.e. 2^31) 以上になっても良いことを含みます。この機能は従来との互換性のために 提供されたものですが、大きな inode 番号を扱えないバックアップアプ リケーションで問題を起こすかも知れません。 largeio/nolargeio # If "nolargeio" is specified, the optimal I/O reported in # st_blksize by stat(2) will be as small as possible to allow user # applications to avoid inefficient read/modify/write I/O. # If "largeio" specified, a filesystem that has a "swidth" specified # will return the "swidth" value (in bytes) in st_blksize. If the # filesystem does not have a "swidth" specified but does specify # an "allocsize" then "allocsize" (in bytes) will be returned # instead. # If neither of these two options are specified, then filesystem # will behave as if "nolargeio" was specified. nolargeio が指定された場合は、stat(2) で報告される最適な I/O st_blocksize は、ユーザアプリケーションが効率の悪い読み・書き・更新 I/O を避けるよう可能な限り小さくされます。largeio が指定された場 合、swidth が指定されたファイルシステムでは、st_blocksize には swidth の値 (バイト単位) が返されます。ファイルシステムで swidth の 指定がなく、allocsize の指定がある場合、allocsize の値 (バイト単位) が代わりに返されます。 どちらのオプションも指定されていない場合、ファイルシステムは nolargeio が指定されている場合と同じ動作を行ないます。 logbufs=value # Set the number of in-memory log buffers. Valid numbers range # from 2-8 inclusive. # The default value is 8 buffers for filesystems with a # blocksize of 64KiB, 4 buffers for filesystems with a blocksize # of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB # and 2 buffers for all other configurations. Increasing the # number of buffers may increase performance on some workloads # at the cost of the memory used for the additional log buffers # and their associated control structures. メモリ上のログバッファの数を指定します。有効な値は 2 から 8 までで す。 既定値は、ブロックサイズが 64KiB の場合ファイルシステムあた り 8 バッファで、ブロックサイズが 32KiB の場合ファイルシステムあた り 4 バッファ、ブロックサイズが 16KiB の場合ファイルシステムあたり 3 バッファで、それ以外の構成では 2 バッファです。バッファの数を増や すことによって一部の負荷環境では性能が向上しますが、追加のログバッ ファと関連する制御構造体の分のメモリを消費します。 logbsize=value # Set the size of each in-memory log buffer. # Size may be specified in bytes, or in kilobytes with a "k" suffix. # Valid sizes for version 1 and version 2 logs are 16384 (16k) and # 32768 (32k). Valid sizes for version 2 logs also include # 65536 (64k), 131072 (128k) and 262144 (256k). # The default value for machines with more than 32MiB of memory # is 32768, machines with less memory use 16384 by default. メモリ上のログバッファのサイズを指定します。サイズはバイト単位で指 定するか、"k" サフィックスを付けてキロバイト単位で指定するかです。 バージョン 1 とバージョン 2 で有効なログサイズは 16384(16k) と 32768(32k) です。バージョン 2 ログでは更に 65536 (64k), 131072 (128k) と 262144 (256k) が指定できます。32MiB 以上のメモリを持つマ シンの既定値は 32768 で、それ以下のマシンでは 16384 です。 logdev=device and rtdev=device # Use an external log (metadata journal) and/or real-time device. # An XFS filesystem has up to three parts: a data section, a log # section, and a real-time section. The real-time section is # optional, and the log section can be separate from the data # section or contained within it. 外部ログ (メタデータジャーナル) または/および外部リアルタイムデバイ スを用います。XFS ファイルシステムは三つの部分 (データ部、ログ部、 リアルタイム部) からできています。リアルタイム部はオプションで、ロ グ部はデータ部と分離することも、中に含めることもできます。 mtpt=mountpoint # Use with the "dmapi" option. The value specified here will be # included in the DMAPI mount event, and should be the path of # the actual mountpoint that is used. "dmapi" オプションと合わせて用います。ここで指定した値は DMAPI マウ ントイベントに含まれます。この値は使用するマウントポイントの実パス にすべきです。 noalign # Data allocations will not be aligned at stripe unit boundaries. データ割り当て時に、ストライプ単位の境界に整列する処理を行ないませ ん。 noatime # Access timestamps are not updated when a file is read. ファイル読み込み時に、アクセスタイムスタンプを更新しません。 norecovery # The filesystem will be mounted without running log recovery. # If the filesystem was not cleanly unmounted, it is likely to # be inconsistent when mounted in "norecovery" mode. # Some files or directories may not be accessible because of this. # Filesystems mounted "norecovery" must be mounted read-only or # the mount will fail. ファイルシステムをログリカバリ実行なしにマウントします。ファイルシ ステムがクリーンにアンマウントされていない場合、norecovery モードで マウントした場合には不整合がある可能性が高いでしょう。一部のファイ ルやディレクトリに、そのことが理由でアクセスできないかも知れません。 norecovery 指定でマウントするファイルシステムは読み出しのみでマウン トしなければいけません。そうしなければマウントは失敗します。 nouuid # Don't check for double mounted file systems using the file system uuid. # This is useful to mount LVM snapshot volumes. ファイルシステム uuid を用いた、ファイルシステムの多重マウントチェッ クを行ないません。これは LVM スナップショットボリュームをマウントす る場合に便利です。 osyncisosync # Make O_SYNC writes implement true O_SYNC. WITHOUT this option, # Linux XFS behaves as if an "osyncisdsync" option is used, # which will make writes to files opened with the O_SYNC flag set # behave as if the O_DSYNC flag had been used instead. # This can result in better performance without compromising # data safety. # However if this option is not in effect, timestamp updates from # O_SYNC writes can be lost if the system crashes. # If timestamp updates are critical, use the osyncisosync option. O_SYNC 書き込みの実装を、仕様通りの O_SYNC の挙動にします。このオ プションを指定しない場合、Linux XFS は osyncisdsync オプションが 指定されている、つまり O_SYNC フラグを付けて open されたファイル は、O_DSYNC が指定されたものとして動作します。 これにより、データの安全性は犠牲にならず、性能が向上します。 但し、このオプションの性質により、O_SYNC 書き込みで行なった timestamp 更新はシステムクラッシュ時に失われます、もし timestamp 更新が必須ならば、osyncisosync オプションを使ってください。 uquota/usrquota/uqnoenforce/quota # User disk quota accounting enabled, and limits (optionally) # enforced. Refer to xfs_quota(8) for further details. ユーザディスククオータアカウンティングを有効にし、制限 (オプション) を適用します。詳細は xfs_quota(8) を参照ください。 gquota/grpquota/gqnoenforce # Group disk quota accounting enabled and limits (optionally) # enforced. Refer to xfs_quota(8) for further details. グループディスククオータアカウンティングを有効にし、制限 (オプショ ン) を適用します。詳細は xfs_quota(8) を参照ください。 pquota/prjquota/pqnoenforce # Project disk quota accounting enabled and limits (optionally) # enforced. Refer to xfs_quota(8) for further details. プロジェクトディスククオータアカウンティングを有効にし、制限 (オプ ション) を適用します。詳細は xfs_quota(8) を参照ください。 sunit=value and swidth=value # Used to specify the stripe unit and width for a RAID device or # a stripe volume. "value" must be specified in 512-byte block # units. # If this option is not specified and the filesystem was made on # a stripe volume or the stripe width or unit were specified for # the RAID device at mkfs time, then the mount system call will # restore the value from the superblock. For filesystems that # are made directly on RAID devices, these options can be used # to override the information in the superblock if the underlying # disk layout changes after the filesystem has been created. # The "swidth" option is required if the "sunit" option has been # specified, and must be a multiple of the "sunit" value. RAID デバイスやストライプボリュームの、ストライプユニット幅と単位 を指定します。value は 512-byte ブロック単位で指定します。 このオプションが指定されておらず、ファイルシステムがストライプボリ ューム上に作成されていた場合、または mkfs 時にストライブ幅またはユ ニットが指定されていた場合は、マウントシステムコールによりスーパー ブロックよりその値が取り出されます。 RAID デバイス上に直接作られたファイルシステムでは、内部のディスク レイアウトがファイルシステム作成後に変化した場合、これらのオプシ ョンを使って、スーパーブロック内の情報を上書きすることができます。 sunit オプションが指定されている場合、swidth オプションの指定は必 須で、かつ sunit の倍数でなければいけません。 swalloc # Data allocations will be rounded up to stripe width boundaries # when the current end of file is being extended and the file # size is larger than the stripe width size. 現在の EOF を超えて書き込みを行なおうとしており、ファイルがストライ プ長より大きい場合、データ割り当てがストライプ長境界までに拡張され ます。 #sysctls sysctl 群 ========= #The following sysctls are available for the XFS filesystem: XFS ファイルシステムでは、以下の sysctl が提供されています。 fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1) # Setting this to "1" clears accumulated XFS statistics # in /proc/fs/xfs/stat. It then immediately resets to "0". これを "1" にすることにより、これまで /proc/fs/xfs/stat に採取されてきた XFS 統計情報をクリアします。 その直後にこのビットは "0" にリセットされます。 fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000) # The interval at which the xfssyncd thread flushes metadata # out to disk. This thread will flush log activity out, and # do some processing on unlinked inodes. xfssyncd スレッドがメタデータをディスクに吐き出す時間間隔。 このスレッドが動作ログを吐き出し、unlink された inode に対して多少 の処理を行います。 fs.xfs.xfsbufd_centisecs (Min: 50 Default: 100 Max: 3000) # The interval at which xfsbufd scans the dirty metadata buffers list. xfsbufd がダーティメタデータバッファリストをスキャンする間隔です。 fs.xfs.age_buffer_centisecs (Min: 100 Default: 1500 Max: 720000) # The age at which xfsbufd flushes dirty metadata buffers to disk. xfsbufd がダーティメタデータバッファリストをディスクに吐き出す間隔 です。 fs.xfs.error_level (Min: 0 Default: 3 Max: 11) # A volume knob for error reporting when internal errors occur. # This will generate detailed messages & backtraces for filesystem # shutdowns, for example. Current threshold values are: 内部エラーが発生したときのエラー報告の音量調整です。これにより、詳 細なメッセージとファイルシステムシャットダウンのバックトレースなど を作成します。現在のしきい値は以下の通りです。 XFS_ERRLEVEL_OFF: 0 XFS_ERRLEVEL_LOW: 1 XFS_ERRLEVEL_HIGH: 5 fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127) # Causes certain error conditions to call BUG(). Value is a bitmask; # AND together the tags which represent errors which should cause panics: BUG() 関数を呼ぶことにより、特定のエラーを発生させます。 与える値はビットマスクによって定義され、エラーを示すタグを複数使うこ とにより panic が発生するはずです。 XFS_NO_PTAG 0 XFS_PTAG_IFLUSH 0x00000001 XFS_PTAG_LOGRES 0x00000002 XFS_PTAG_AILDELETE 0x00000004 XFS_PTAG_ERROR_REPORT 0x00000008 XFS_PTAG_SHUTDOWN_CORRUPT 0x00000010 XFS_PTAG_SHUTDOWN_IOERROR 0x00000020 XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040 # This option is intended for debugging only. このオプションはデバックのみで用いることを意図しています。 fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1) # Controls whether symlinks are created with mode 0777 (default) # or whether their mode is affected by the umask (irix mode). シンボリックリンクがモード 777 (既定値) で作成されるか、umask の影響 を受ける (Irix モード) かを制御します。 fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1) # Controls files created in SGID directories. # If the group ID of the new file does not match the effective group # ID or one of the supplementary group IDs of the parent dir, the # ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl # is set. SGID ディレクトリ内のファイル作成を制御します。 新しいファイルのグループ ID が実効グループ ID とも、親ディレクトリの 補助グループ ID とも一致しない場合、irix_sgid_inherit 互換 sysctl を 設定している場合、ISGID ビットはクリアされます。 fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1) # Setting this to "1" will cause the "sync" flag set # by the xfs_io(8) chattr command on a directory to be # inherited by files in that directory. このビットを "1" に設定することにより、ディレクトリに対して xfs_io(8) chattr コマンドを用いて "sync" フラグを設定していた場合、ディレクトリ 内のファイルに "sync" 属性が引き継がれます。 fs.xfs.inherit_nodump (Min: 0 Default: 1 Max: 1) # Setting this to "1" will cause the "nodump" flag set # by the xfs_io(8) chattr command on a directory to be # inherited by files in that directory. このビットを "1" に設定することにより、ディレクトリに対して xfs_io(8) chattr コマンドを用いて "nodump" フラグを設定していた場合、ディレクト リ内のファイルに "nodump" 属性が引き継がれます。 fs.xfs.inherit_noatime (Min: 0 Default: 1 Max: 1) # Setting this to "1" will cause the "noatime" flag set # by the xfs_io(8) chattr command on a directory to be # inherited by files in that directory. このビットを "1" にした場合、ディレクトリに対して xfs_io(8) chattr コマンドを用いて "noatime" フラグを設定していた場合、ディレクトリ内 のファイルに "noatime" 属性が引き継がれます。 fs.xfs.inherit_nosymlinks (Min: 0 Default: 1 Max: 1) # Setting this to "1" will cause the "nosymlinks" flag set # by the xfs_io(8) chattr command on a directory to be # inherited by files in that directory. このビットを "1" にした場合、ディレクトリに対して xfs_io(8) chattr コマンドを用いて "nosymlinks" フラグを設定していた場合、ディレクトリ 内のファイルに "nosymlinks" 属性が引き継がれます。 fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256) # In "inode32" allocation mode, this option determines how many # files the allocator attempts to allocate in the same allocation # group before moving to the next allocation group. The intent # is to control the rate at which the allocator moves between # allocation groups when allocating extents for new files. "inode32" アロケーションモード時に、このオプションは、アロケータが 次のアロケーショングループに移動する前に、一つのアロケーショングル ープ内でアロケーションを行なうファイル数を指定します。これは、新 しいファイルのためのエクステントの割り当て時に、アロケータがアロケ ーショングループ間を移動する頻度の調整のためのものです。