FS_SETCACHESIZE(1)

✨ FS_SETCACHESIZE(1) ✨

okay bestie, welcome to fs_setcachesize from the AFS Command Reference πŸ’– she's the one who tells your Cache Manager how much local disk space she's allowed to eat. iconic behavior honestly.


🌸 NAME 🌸

fs_setcachesize β€” sets the size of the disk cache. that's it, that's the whole job. slay.


πŸŽ€ SYNOPSIS πŸŽ€

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

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

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

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

four whole ways to say the same thing. she contains multitudes πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, fs setcachesize changes the number of kilobyte blocks of local disk space that the Cache Manager can use for its data cache β€” but only on machines that use a disk cache. on machines that use a memory cache? nope, this command is not operative. it simply does not apply. vibe check failed, moving on βœ‹

want to send the cache size back to the default value β€” the one sitting in the third field of your local /etc/openafs/cacheinfo file? just hand the -blocks argument a value of 0 and she'll reset it for you. no cap.

want to go back to the value that was set when the machine was last rebooted instead? use the -reset flag INSTEAD of the -blocks argument. and heads up: that boot-time value is normally the amount specified in the cacheinfo file β€” unless the -blocks argument was included on the afsd command to override the cacheinfo value. then it's whatever you said there. iykyk.

oh and if you want to actually see the current cache size plus how much cache is in use β€” for both disk and memory caches β€” you want fs getcacheparms. different command, different girl 🫢


🚨 CAUTIONS 🚨

⚠️ READ THIS PART BESTIE. i'm serious. ⚠️

this command is not operative on machines using a memory cache, and it results in an error message. like, it will yell at you. to change memory cache size you gotta either edit the cacheinfo file and reboot, or reboot and provide the -blocks argument to the afsd command. those are the only two doors πŸšͺ

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. why? because the cache implementation itself needs a small amount of space on the partition. she's hungry too. feed her. πŸ“


πŸ’… OPTIONS πŸ’…

  • -blocks &lt;size&gt; β€” 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 β€” this is the default)
    • M for mebibytes (1024 kibibytes)
    • G for gibibytes (1024 mebibytes)
    • T for tebibytes (1024 gibibytes)

and if you provide a value of 0, the cache size gets set to the default specified in the cacheinfo file. queen of resets πŸ‘‘

  • -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. so like, it's usually the same number, but not always. watch out 🌈
  • -help β€” prints the online help for this command. and btw, all other valid options are ignored when you do this. she's focused. one thing at a time ✨

🌟 EXAMPLES 🌟

this one sets the disk cache size to 25000 kilobyte blocks:

% fs setcachesize -blocks 25000

and both of these bad boys reset the disk cache size to the value in the cacheinfo file β€” assuming, of course, that the -blocks argument to the afsd command was not used:

% fs setcachesize -blocks 0
% fs setcachesize -reset

two paths, same destination. pick your fighter 😌


πŸ‘‘ PRIVILEGE REQUIRED πŸ‘‘

the issuer must be logged in as the local superuser root. yes, literally root. no shortcuts, no sneaking in the back door. main character privileges only πŸ’œ


πŸ”— SEE ALSO πŸ”—

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

go read those too, they're all part of the same little family 🧚


IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

this documentation is covered by the IBM Public License Version 1.0. it was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. legends, all of them 🫢


and that's the whole page bestie!! ✨ this lil' slice of the OpenAFS docs is dated 2026-07-27, so go forth, set that cache size responsibly, and remember β€” never past 90% πŸ’–πŸ’…πŸŽ€

πŸ“¦ where this page comes from