Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Ext3のソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Ext3
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:ファイルシステム]] [[de:Ext3]] [[en:Ext3]] [[it:Ext3]] [[ru:Ext3]] {{Related articles start}} {{Related|ファイルシステム}} {{Related|Ext4}} {{Related articles end}} Third Extended ("ext3") ファイルシステムには長所がたくさんあります。ext3 のカーネル内のコードやユーザー空間のツールは他の Linux 対応のファイルシステムよりも多く使われ、テストされ、修正が施され、改善が加えられています。ext3 はシンプルかつ強固でありながら、拡張性もあります。この記事ではファイルシステムのパフォーマンスと信頼性の両方を良くするためのヒントを説明しています。 このドキュメントでは一般的なパーティションを {{ic|/dev/hdXY}} と表記します。あなたの使用している実際のデバイスノードに適宜置き換えてください。例えば、スレーブディスクの一番目のパーティションなら {{ic|/dev/hdb1}}、一番目の SCSI または Serial ATA ディスクの二番目のパーティションなら {{ic|/dev/sda2}} になります。 == tune2fs と e2fsck を使う == まず最初に、tune2fs ユーティリティを使って ext2 や ext3 パーティションのファイルシステムオプションを変更できる (もしくは [[Ext4#ext3 から ext4 に移行|ext2 を ext3 に変換する]]) ことを確認する必要があります。''tune2fs'' の [[man ページ]]を見て下さい。 ファイルシステムに変更を加えた後は ''e2fsck'' ユーティリティを使ってファイルシステムのチェックを実行すると良いでしょう。ファイルシステムが問題ないか確認して、必要であれば修正を行います。まだ使ったことがないのであれば ''e2fsck'' ユーティリティの man ページを読んで下さい。 {{Warning|実行するときはファイルシステムをアンマウントする必要があります。''tune2fs'' や ''e2fsck'' ユーティリティを使って変更を加える前に必ずファイルシステムがアンマウントされていることを確認してください。マウント中のファイルシステムを弄った場合、ファイルシステムが破損する可能性があります。必要であれば [http://partedmagic.com/doku.php Parted Magic] や Arch Linux のインストールメディアなどの LiveCD から起動するようにしてください。}} == ディレクトリインデックスを使う == この機能は、ハッシュ化されたバイナリツリーを使ってディレクトリの情報を保存することで、巨大なディレクトリや、多数のファイルを含んでいるディレクトリでのファイルアクセスを高速化します。完全に安全に使うことができ、ほとんとの場合で、劇的にアクセス速度が向上します。したがって有効化すると良いでしょう: # tune2fs -O dir_index /dev/hdXY ディレクトリインデックスは ''tune2fs'' を実行した後に、ファイルシステムに作成されたディレクトリにだけ影響を与えます。既存のディレクトリに適用したいときは、''e2fsck'' ユーティリティを使ってファイルシステム上のディレクトリを最適化して再インデックスする必要があります: # e2fsck -D -f /dev/hdXY {{Note| * 上記のコマンドは ext2, ext3, ext4 ファイルシステムで使うことができます。ファイルシステムのサイズによって、長い時間がかかることもあります。 * Arch Linux では {{ic|/etc/mke2fs.conf}} によってディレクトリインデックスはデフォルトで有効になっています。 }} == フルジャーナリングの有効化 == {{Warning|遅延アロケーションとフルジャーナリング (例: {{ic|journal=data}}) の両方を有効にしている場合、[[ext4]] パーティションがマウントされません。}} デフォルトでは、ext3 パーティションは 'ordered' データモードでマウントされます。このモードでは、全てのデータはメインのファイルシステムに書き込まれ、メタデータがジャーナルに送られます。ジャーナルのブロックは論理的にトランザクションにグループ化されディスク I/O を削減します。大抵の場合、これで問題は発生しませんが、(特定の状況下で) 信頼性とパフォーマンスの両方を向上させる方法があります: ファイルデータそのものを含む、全てのデータをジャーナリングさせるのです (別名 'journal' データモード)。通常、全てのデータをジャーナリングするのはパフォーマンスが落ちるように思われます。データがディスクに二回書き込まれることになるからです: 一度はジャーナルに、そしてメインのファイルシステムに。しかしながら、そうではない場合があります。読み書きを同時にたくさん行うようなファイルシステムではパフォーマンスが改善された例があります。詳しくは Daniel Robbins によって IBM のウェブサイトに書かれた [http://www-106.ibm.com/developerworks/linux/library/l-fs8.html#4 この記事] を読んで下さい。 journal データモードを有効化する方法は2つあります。1つは {{ic|/etc/fstab}} でマウントオプションとして {{ic|1=data=journal}} を追加する方法です。この方法を使う場合、root ファイルシステムで journal データモードを使うときはブートローダーの設定で {{ic|1=rootflags=data=journal}} をカーネルパラメータとして設定する必要があります。二番目の方法は、tune2fs を使ってファイルシステムのスーパーブロックのデフォルトマウントオプションを変更します: # tune2fs -O has_journal -o journal_data /dev/hdXY 古いカーネルでは二番目の方法は使えないことがあるので注意してください。特に Linux 2.4.20 以下ではスーパーブロックのデフォルトマウントオプションが無視されます。さらに大胆に、ジャーナルのサイズを変更することもできます。ジャーナルを大きくすればパフォーマンスが良くなる可能性があります (そのかわりディスクの消費量は増えてリカバリにかかる時間は長くなります)。以下を実行する前に tune2fs マニュアルをよく読むようにしてください: # tune2fs -J size=$SIZE /dev/hdXY == 長ったらしいブート時のチェックを無効化 == {{Warning|チェックを無効化するのは ext3/4 などのジャーナリングファイルシステムだけにしてください。ReiserFS や XFS などの他のジャーナリングファイルシステムでも無効化できたりできなかったりしますが、テストはされていません。チェックを無効化するとファイルシステムに損害を与えたり破損してしまう可能性があります。自己責任で設定してください。}} It seems that our ext3 filesystems are still being checked every 30 mounts or so. This is a good default for many because it helps prevent filesystem corruption when you have hardware issues, such as bad IDE/SATA/SCSI cabling, power supply failures, etc. One of the driving forces for creating journaling filesystems was that the filesystem could easily be returned to a consistent state by recovering and replaying the needed journaled transactions. Therefore, we can safely disable these mount-count- and time-dependent checks if we are certain the filesystem will be quickly checked to recover the journal if needed to restore filesystem and data consistency. Before you do this please make sure your filesystem entry in /etc/fstab has a positive integer in its 6th field (pass) so that it is checked at boot time automatically. You may do so using the following command: # tune2fs -c 0 -i 0 /dev/hdXY If you just want to limit the checks to happen less often without totally disabling them (for peace of mind). A great method is to change from a number of count's check to a time frame check. See the man page. Here is once every month: # tune2fs -c 0 -i 1m /dev/hdXY == 予約済みのファイルシステム領域を回収する == Ext3 partition contain a used space of 5% for special reasons by default. The main reason is to help with less fragmentation on the filesystem. The other reason for such space is so root can log in even when the filesystem becomes 100% used. Without this option, the root user might not be able to log in to "clean up" because the system could become unstable, trying to write logs to a 100% full system for example. The issue with this is that hard drives are getting so big the 5% can add up to be quite a large amount of wasted space. (eg. 100 GB = 5 GB reserved). Now if you separate your filesystems to like /home for example it might be a good idea to adjust these and reclaim that wasted space on long-term archive partitions (see [http://www.redhat.com/archives/ext3-users/2009-January/msg00026.html this email] for more info). It's a safe bet to leave your / filesystem at 5% reserved just in case. Leave reserved space for filesystems containing /var and /tmp also or else you'll end up with problems. Now to change your reserved space to 1% of the drive, which is fair for non-root filesystems. # tune2fs -m 1 /dev/sdXY == ラベルを割り当てる == Once you have created and formated a partition, you can assign it a label using the e2label command. This allows you to add the partition to /etc/fstab using a label instead of using a device path (usefull for an USB drive). To add a label to a partition, type the following command as root: # e2label /dev/sdXY ''new-label'' If the optional argument ''new-label'' is not present, e2label will simply display the current filesystem label. If the optional argument ''new-label'' is present, then e2label will set the filesystem label to be ''new-label''q. Ext2 and ext3 filesystem labels can be at most 16 characters long; if new-label is longer than 16 characters, e2label will truncate it and print a warning message. == ユーザーエクスペリエンス == I never had problems with these tips on large (>750) filesystems. Disabling lengthy boot-time works fine as well. I get filesystem errors even with this tips. Do not disable lengthy boot time checks. If you have some big partitions, do not enable full journaling on them. I experienced reproducible freezes (about 30 seconds) when enabling this on my 250GB home partition. : Did you try tweaking bdflush as described [http://www.ibm.com/developerworks/linux/library/l-fs8.html by Daniel Robbins]?
このページで使用されているテンプレート:
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
テンプレート:Warning
(
ソースを閲覧
)
Ext3
に戻る。
検索
検索
Ext3のソースを表示
話題を追加