系统管理指南:设备和文件系统

修改 CacheFS 文件系统

在高速缓存中修改文件系统时,需要先删除高速缓存,再重新创建它。还可能需要在单用户模式下重新引导计算机,具体取决于共享和访问文件系统的方式。

在以下示例中,使用为 /docs 文件系统指定的 demandconst 选项,删除、重新创建并重新挂载高速缓存。


# shutdown -g30 -y

.

.

.

Root password for system maintenance (control-d to bypass):

single-user privilege assigned to /dev/console. 


.

.

.

Here is where you might be prompted 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

#