252 lines
7.1 KiB
Plaintext
252 lines
7.1 KiB
Plaintext
'\"macro stdmacro
|
|
.nr X
|
|
.TH cfsadmin 1M "8 Aug 1995"
|
|
.SH NAME
|
|
cfsadmin \- administer disk space used for caching file systems with the Cache File-System (CacheFS)
|
|
.SH SYNOPSIS
|
|
.B cfsadmin \-c
|
|
[
|
|
.BI "\-o " cacheFS-parameters
|
|
]
|
|
.I cache_directory
|
|
.br
|
|
.B cfsadmin \-d
|
|
[
|
|
.IR cache_ID "|"
|
|
.B all
|
|
]
|
|
.I cache_directory
|
|
.br
|
|
.BI "cfsadmin \-l " cache_directory
|
|
.br
|
|
.B cfsadmin \-u
|
|
[
|
|
.BI "\-o " cacheFS-parameters
|
|
]
|
|
.I cache_directory
|
|
.br
|
|
.BI "cfsadmin \-C " cache_directory
|
|
.SH DESCRIPTION
|
|
.IX "cfsadmin command" "" "\fLcfsadmin\fP \(em administer disk space used for caching file systems with the Cache File-System (CacheFS)"
|
|
.IX "cacheFS" "cfsadmin" "\fLcfsadmin\fP \(em administer disk space used for caching file systems with the Cache File-System (CacheFS)"
|
|
.IX "administer disk space used for caching file systems with the Cache File-System (CacheFS)" "" "\fLcfsadmin\fP \(em administer disk space used for caching file systems with the Cache File-System (CacheFS)"
|
|
.IX "cfs" "cfsadmin" "\fLcfsadmin\fP \(em administer disk space used for caching file systems with the Cache File-System (CacheFS)"
|
|
.IX "file system" "cfs" "" "\fLcfsadmin\fP \(em administer disk space used for caching file systems with the Cache File-System (CacheFS)"
|
|
The
|
|
.B cfsadmin
|
|
command provides administrative tools for managing cached file systems.
|
|
Its functions fall into four general categories:
|
|
.RS
|
|
.TP 2
|
|
\(bu
|
|
cache creation
|
|
.TP
|
|
\(bu
|
|
deletion of cached file systems
|
|
.TP
|
|
\(bu
|
|
listing of cache contents and statistics
|
|
.TP
|
|
\(bu
|
|
resource parameter adjustment when the file system is unmounted.
|
|
.RE
|
|
.LP
|
|
For each form of the command, you must specify a
|
|
cache directory, that is, the directory under which the
|
|
cache is actually stored. A path name in the front file
|
|
system identifies the cache directory.
|
|
.LP
|
|
You can specify a cache ID
|
|
when you mount a file system with CacheFS, or you can let
|
|
the system generate one for you. The
|
|
.B \-l
|
|
option includes the cache ID in its listing of information.
|
|
You must know the cache ID to delete a cached file system.
|
|
.SH OPTIONS
|
|
.TP 15
|
|
.B \-c
|
|
Create a cache under the directory specified by
|
|
.IR cache_directory .
|
|
This directory must not exist prior to cache creation.
|
|
.TP
|
|
.B \-d
|
|
Remove the file system whose cache ID you specify and release
|
|
its resources, or remove all file systems in the cache by
|
|
specifying
|
|
.BR all .
|
|
It is not necessary that a cache be removed by using
|
|
.BR cfsadmin .
|
|
The cache can simply be removed by using
|
|
.BR rm (1).
|
|
.TP
|
|
.B \-l
|
|
List file systems stored in the specified cache, as well as
|
|
statistics about them. Each cached file system is listed
|
|
by cache ID. The statistics document cache resource parameters.
|
|
The block allocation limits are given as percentages and in
|
|
512-byte block units.
|
|
Cache utilization may be accurately reported with
|
|
.BR du (1M).
|
|
.TP
|
|
.B \-u
|
|
Update resource parameters of the specified cache directory.
|
|
Parameter values can only be increased. To decrease the values,
|
|
you must remove the cache and recreate it.
|
|
All file systems in the cache directory must be unmounted
|
|
when you use this option. Changes will take effect the next
|
|
time you mount any file system in the specified cache directory.
|
|
The
|
|
.B \-u
|
|
option with no
|
|
.B \-o
|
|
option sets all parameters to their default values.
|
|
.TP
|
|
.B \-C
|
|
Convert an existing cache to the new format. This consists of converting
|
|
the cache IDs from their old form to the new form.
|
|
.br
|
|
.ne 5
|
|
.SS "CacheFS Resource Parameters"
|
|
.LP
|
|
You can specify the following cacheFS resource parameters
|
|
as arguments to the
|
|
.B \-o
|
|
option. Separate multiple parameters with commas.
|
|
.TP 15
|
|
.BI maxblocks= n
|
|
Maximum amount of storage space that CacheFS can use,
|
|
expressed as a percentage of the total number of blocks in the
|
|
front file system.
|
|
If CacheFS does not have exclusive use of the front file system,
|
|
there is no guarantee that all the space the
|
|
.B maxblocks
|
|
parameter allows will be available. The default is
|
|
.BR 90 .
|
|
.br
|
|
This value defines an upper bound on the space available to cachefs.
|
|
Once the utilization of the front file system (cachefs and non-cachefs)
|
|
reaches this value, cachefs will no longer allocate space for the caching
|
|
of files.
|
|
.TP
|
|
.BI hiblocks= n
|
|
This sets the high water mark for disk space usage.
|
|
The value
|
|
.I n
|
|
is expressed as a percentage of the total number of blocks in the front
|
|
front file system.
|
|
When the utilization of the front file system as a whole (cachefs and
|
|
non-cachefs) reaches the high water mark, cachefs will begin
|
|
removing cached files. Enough files will be removed to bring the
|
|
front file system usage down to the low water mark.
|
|
The default high water mark is
|
|
.BR 85 .
|
|
.TP
|
|
.BI lowblocks= n
|
|
This sets the low water mark for disk space usage.
|
|
The value
|
|
.I n
|
|
is expressed as a percentage of the total number of blocks in the front
|
|
front file system.
|
|
This value is used for cache replacement as described above
|
|
for
|
|
.BR hiblocks .
|
|
The default low water mark is
|
|
.BR 75 .
|
|
.TP 15
|
|
.BI maxfiles= n
|
|
Maximum number of files that CacheFS can use,
|
|
expressed as a percentage of the total number of inodes in the
|
|
front file system.
|
|
If CacheFS does not have exclusive use of the front file system,
|
|
there is no guarantee that all the inodes the
|
|
.B maxfiles
|
|
parameter allows will be available. The default is
|
|
.BR 90 .
|
|
.TP
|
|
.BI hifiles= n
|
|
This sets the high water mark for file allocation.
|
|
The value
|
|
.I n
|
|
is expressed as a percentage of the total number of blocks in the front
|
|
front file system.
|
|
When the high water mark is reached, cachefs will begin
|
|
removing cached files. Enough files will be removed to bring the
|
|
front file system usage down to the low water mark.
|
|
The default high water mark is
|
|
.BR 85 .
|
|
.TP
|
|
.BI lowfiles= n
|
|
This sets the low water mark for file allocation.
|
|
The value
|
|
.I n
|
|
is expressed as a percentage of the total number of blocks in the front
|
|
front file system.
|
|
This value is used for cache replacement as described above for
|
|
.BR hifiles .
|
|
The default low water mark is
|
|
.BR 75 .
|
|
.LP
|
|
The cache parameters may only be changed for unmounted caches. The values,
|
|
however, may be adjusted in any direction.
|
|
.SH EXAMPLES
|
|
The following example creates a cache directory named
|
|
.BR /cache :
|
|
.RS
|
|
.B
|
|
example% cfsadmin -c /cache
|
|
.RE
|
|
.LP
|
|
The following example creates a cache named
|
|
.B /cache1
|
|
that can claim a maximum of 60 percent of the blocks
|
|
in the front file system, can use 50 percent of the front
|
|
file system blocks without interference by CacheFS internal
|
|
control mechanisms (i.e., replacement). Once this allocation level has
|
|
been reached, cachefs will remove cached files until the low water
|
|
value of 40 percent is reached.
|
|
.LP
|
|
.RS
|
|
.ft 3
|
|
example% cfsadmin \-c \-o maxblocks=60,lowblocks=40,
|
|
.ti +5n
|
|
hiblocks=50 /cache1
|
|
.ft 1
|
|
.RE
|
|
.LP
|
|
The following example lists the contents of a cache directory named
|
|
.B /cache3
|
|
and provides statistics about resource utilization:
|
|
.LP
|
|
.RS
|
|
.B
|
|
example% cfsadmin \-l /cache3
|
|
.RE
|
|
.LP
|
|
The following example removes the cached file system
|
|
with cache ID
|
|
.B 23
|
|
from the cache directory
|
|
.B /cache3
|
|
and frees its resources (the cache ID is part of the
|
|
information returned by
|
|
.BR "cfsadmin \-l" ):
|
|
.LP
|
|
.RS
|
|
.B
|
|
example% cfsadmin \-d 23 /cache3
|
|
.RE
|
|
.LP
|
|
The following example removes all cached file systems from the cache
|
|
directory
|
|
.BR /cache3 :
|
|
.LP
|
|
.RS
|
|
.B
|
|
example% cfsadmin \-d all /cache3
|
|
.RE
|
|
.SH "SEE ALSO"
|
|
.BR mount (1M),
|
|
.BR fstab (4),
|
|
.BR rm (4),
|
|
.BR du (1M)
|