Solaris のシステム管理 (第 1 巻)

例 - キャッシュ内でファイルシステムを変更する

次の例では、キャッシュが削除されてから再び作成され、ファイルシステム /docs に指定された demandconst オプションを使用して再びマウントされます。この例は、シングルユーザーモードでリブートするなどの手順を示しています。必要であれば他のコマンドを使用して、この例の作業を実行することもできます。


# shutdown -g30 -y
.
.
.
Type Cntrl-d to proceed with normal startup,
(or give root password for system maintenance):
# enter password:
.
.
.
Here is where you might be prompted from system to run fsck on the 
file system where the cache is located.
 
# fsck /local
# mount /local
# cfsadmin -d all /local/mycache
# cfsadmin -c /local/mycache
# init 6
.
.
.
console login:
password:
# mount -F cachefs -o backfstype=nfs,cachedir=/local/cache1, demandconst merlin:/docs /docs 
#

ファイルシステムをキャッシュに正常に戻せなかった場合は、次のようなエラーメッセージが表示されます。


cachefsstat: /doc: not a cachefs mount point