logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

fs_setcachesize - Sets the size of the disk cache

Cautions

       This command is not operative on machines using a memory cache, and results in an error message. To
       change memory cache size, edit the cacheinfo file and reboot, or reboot and provide the -blocks argument
       to the afsd command.

       On machines using a disk cache, do not set the cache size to exceed 85% to 90% of the actual disk space
       available for the cache directory. The cache implementation itself requires a small amount of space on
       the partition.

Description

       The fssetcachesize command changes the number of kilobyte blocks of local disk space available to the
       Cache Manager for its data cache, on machines that use a disk cache. The command is not operative on
       machines that use a memory cache.

       To return the cache size to the default value specified in the third field of the local
       /etc/openafs/cacheinfo file, provide a value of 0 to the -blocks argument.

       To return the cache size to the value set when the machine was last rebooted, use the -reset flag instead
       of the -blocks argument. This is normally the amount specified in the cacheinfo file, unless the -blocks
       argument was included on the afsd command to override the cacheinfo value.

       To display the current cache size and amount of cache in use, for both disk and memory caches, use the fsgetcacheparms command.

Examples

       The following command sets the disk cache size to 25000 kilobyte blocks.

          % fs setcachesize -blocks 25000

       Both of the following commands reset the disk cache size to the value in  the  cacheinfo  file,  assuming
       that the -blocks argument to the afsd command was not used.

          % fs setcachesize -blocks 0
          % fs setcachesize -reset

Name

       fs_setcachesize - Sets the size of the disk cache

Options

-blocks <size>
           Specifies  the amount of disk space available for the Cache Manager to devote to the cache.  The size
           should be a positive integer followed by an optional suffix:  "K"  for  kibibytes  (1024  bytes,  the
           default),  "M"  for  mebibytes  (1024  kibibytes),  "G"  for  gibibytes (1024 mebibytes), and "T" for
           tebibytes (1024 gibibytes).  Provide a value of 0 to set cache size to the default specified  in  the
           cacheinfo file.

       -reset
           Returns  the cache size to the value set when the machine was last booted. This agrees with the value
           in the cacheinfo file unless the -blocks argument was used on the afsd command.

       -help
           Prints the online help for this command. All other valid options are ignored.

Privilege Required

       The issuer must be logged in as the local superuser root.

See Also

cacheinfo(5), afsd(8), fs_getcacheparms(1)

Synopsis

fssetcachesize [-blocks <size(0= reset)>>] [-reset] [-help]

       fssetca [-b <size(0= reset)>>] [-r] [-h]

       fscachesize [-b <size(0= reset)>>] [-r] [-h]

       fsca [-b <size(0= reset)>>] [-r] [-h]

See Also