For faster navigation, this Iframe is preloading the Wikiwand page for Background fsck.

Background fsck

Background fsckとは、Soft updatesで以前マウントしていて、意図しない停止をしたファイルシステムmountされた状態のままfsckしてファイルシステムを修復することである。

概要

[編集]

ファイルシステムをアンマウント(unmount, 使用を止めてマウントしていない状態にすること)しないままシステムが停止してしまった場合、通常はファイルシステムの一貫性が壊れてしまい、ファイルシステムをfsckによって修復しなければ再びマウントして使用することはできなくなる。

しかし、Soft updatesを使うとシステムがいつ停止してもファイルシステムの一貫性は基本的に壊れない。 再起動後にfsckを実行しなくてもファイルシステムをそのままマウント(mount)して使用できる。 唯一起きる矛盾は、使用されていないはずの領域が使用されているとマークされて、その領域が無駄になることである。

Background fsckとは、この状態になったファイルシステムを使用しながら無駄な領域を解放することである。 従って、fsckといっても実際の役割は一種のガベージコレクションである。

手順

[編集]

Background fsckではまず、ファイルシステムのスナップショットを作成する。 そして、このスナップショットに対してfsckを実行し、ファイルシステムを修復する。 長時間停止することなくスナップショットを作成するためにコピーオンライトを用いているが、この際ファイルシステムの変更を行う可能性のあるシステムコールはすべてブロックされ、その間だけ計算機が応答しなくなり「フリーズした」と認識されることがある。スナップショットの作成が完了した時点でブロックは解除されるので、電源を切るなど早計な手段に出るべきではない。

スナップショット(副産物)

[編集]

Background fsckの副産物としてスナップショット機能がある。 スナップショットはmksnap_ffsコマンドで簡単に作成できる。 これは一つのファイルシステムに対していくつも作成することが出来るので、UFSの簡易バックアップ機構として用いることが出来る。 実際、この手法でバックアップを行うportが存在する。

参考文献

[編集]

外部リンク

[編集]
{{bottomLinkPreText}} {{bottomLinkText}}
Background fsck
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?