^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) kAFS: AFS FILESYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) ====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) .. Contents:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - Overview.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - Usage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) - Mountpoints.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) - Dynamic root.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) - Proc filesystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) - The cell database.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) - Security.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) - The @sys substitution.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) Overview
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) This filesystem provides a fairly simple secure AFS filesystem driver. It is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) under development and does not yet provide the full feature set. The features
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) it does support include:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) (*) Security (currently only AFS kaserver and KerberosIV tickets).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) (*) File reading and writing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) (*) Automounting.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) (*) Local caching (via fscache).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) It does not yet support the following AFS features:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) (*) pioctl() system call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) Compilation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) The filesystem should be enabled by turning on the kernel configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) options::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) CONFIG_AF_RXRPC - The RxRPC protocol transport
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) CONFIG_RXKAD - The RxRPC Kerberos security handler
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) CONFIG_AFS - The AFS filesystem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Additionally, the following can be turned on to aid debugging::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) CONFIG_AF_RXRPC_DEBUG - Permit AF_RXRPC debugging to be enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) CONFIG_AFS_DEBUG - Permit AFS debugging to be enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) They permit the debugging messages to be turned on dynamically by manipulating
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) the masks in the following files::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) /sys/module/af_rxrpc/parameters/debug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) /sys/module/kafs/parameters/debug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) Usage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) =====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) When inserting the driver modules the root cell must be specified along with a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) list of volume location server IP addresses::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) modprobe rxrpc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) modprobe kafs rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) The first module is the AF_RXRPC network protocol driver. This provides the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) RxRPC remote operation protocol and may also be accessed from userspace. See:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) Documentation/networking/rxrpc.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) The second module is the kerberos RxRPC security driver, and the third module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) is the actual filesystem driver for the AFS filesystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) Once the module has been loaded, more modules can be added by the following
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) procedure::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) Where the parameters to the "add" command are the name of a cell and a list of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) volume location servers within that cell, with the latter separated by colons.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) Filesystems can be mounted anywhere by commands similar to the following::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) mount -t afs "%cambridge.redhat.com:root.afs." /afs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) mount -t afs "#cambridge.redhat.com:root.cell." /afs/cambridge
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) mount -t afs "#root.afs." /afs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) mount -t afs "#root.cell." /afs/cambridge
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) Where the initial character is either a hash or a percent symbol depending on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) whether you definitely want a R/W volume (percent) or whether you'd prefer a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) R/O volume, but are willing to use a R/W volume instead (hash).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) The name of the volume can be suffixes with ".backup" or ".readonly" to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) specify connection to only volumes of those types.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) The name of the cell is optional, and if not given during a mount, then the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) named volume will be looked up in the cell specified during modprobe.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) Additional cells can be added through /proc (see later section).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) Mountpoints
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) AFS has a concept of mountpoints. In AFS terms, these are specially formatted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) symbolic links (of the same form as the "device name" passed to mount). kAFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) presents these to the user as directories that have a follow-link capability
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) (ie: symbolic link semantics). If anyone attempts to access them, they will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) automatically cause the target volume to be mounted (if possible) on that site.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) Automatically mounted filesystems will be automatically unmounted approximately
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) twenty minutes after they were last used. Alternatively they can be unmounted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) directly with the umount() system call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) Manually unmounting an AFS volume will cause any idle submounts upon it to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) culled first. If all are culled, then the requested volume will also be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) unmounted, otherwise error EBUSY will be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) This can be used by the administrator to attempt to unmount the whole AFS tree
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) mounted on /afs in one go by doing::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) umount /afs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) Dynamic Root
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) A mount option is available to create a serverless mount that is only usable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) for dynamic lookup. Creating such a mount can be done by, for example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) mount -t afs none /afs -o dyn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) This creates a mount that just has an empty directory at the root. Attempting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) to look up a name in this directory will cause a mountpoint to be created that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) looks up a cell of the same name, for example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) ls /afs/grand.central.org/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) Proc Filesystem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) ===============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) The AFS modules creates a "/proc/fs/afs/" directory and populates it:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) (*) A "cells" file that lists cells currently known to the afs module and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) their usage counts::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) [root@andromeda ~]# cat /proc/fs/afs/cells
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) USE NAME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 3 cambridge.redhat.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) (*) A directory per cell that contains files that list volume location
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) servers, volumes, and active servers known within that cell::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) [root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/servers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) USE ADDR STATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 4 172.16.18.91 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) [root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/vlservers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) ADDRESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 172.16.18.91
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) [root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/volumes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) USE STT VLID[0] VLID[1] VLID[2] NAME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 1 Val 20000000 20000001 20000002 root.afs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) The Cell Database
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) =================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) The filesystem maintains an internal database of all the cells it knows and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) IP addresses of the volume location servers for those cells. The cell to which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) the system belongs is added to the database when modprobe is performed by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) "rootcell=" argument or, if compiled in, using a "kafs.rootcell=" argument on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) the kernel command line.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) Further cells can be added by commands similar to the following::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) echo add CELLNAME VLADDR[:VLADDR][:VLADDR]... >/proc/fs/afs/cells
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) No other cell database operations are available at this time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) Security
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) Secure operations are initiated by acquiring a key using the klog program. A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) very primitive klog program is available at:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) https://people.redhat.com/~dhowells/rxrpc/klog.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) This should be compiled by::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) make klog LDLIBS="-lcrypto -lcrypt -lkrb4 -lkeyutils"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) And then run as::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) ./klog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) Assuming it's successful, this adds a key of type RxRPC, named for the service
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) and cell, eg: "afs@<cellname>". This can be viewed with the keyctl program or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) by cat'ing /proc/keys::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) [root@andromeda ~]# keyctl show
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) Session Keyring
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) -3 --alswrv 0 0 keyring: _ses.3268
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 2 --alswrv 0 0 \_ keyring: _uid.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 111416553 --als--v 0 0 \_ rxrpc: afs@CAMBRIDGE.REDHAT.COM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) Currently the username, realm, password and proposed ticket lifetime are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) compiled in to the program.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) It is not required to acquire a key before using AFS facilities, but if one is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) not acquired then all operations will be governed by the anonymous user parts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) of the ACLs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) If a key is acquired, then all AFS operations, including mounts and automounts,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) made by a possessor of that key will be secured with that key.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) If a file is opened with a particular key and then the file descriptor is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) passed to a process that doesn't have that key (perhaps over an AF_UNIX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) socket), then the operations on the file will be made with key that was used to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) open the file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) The @sys Substitution
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) =====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) The list of up to 16 @sys substitutions for the current network namespace can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) be configured by writing a list to /proc/fs/afs/sysname::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) [root@andromeda ~]# echo foo amd64_linux_26 >/proc/fs/afs/sysname
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) or cleared entirely by writing an empty list::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) [root@andromeda ~]# echo >/proc/fs/afs/sysname
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) The current list for current network namespace can be retrieved by::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) [root@andromeda ~]# cat /proc/fs/afs/sysname
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) foo
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) amd64_linux_26
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) When @sys is being substituted for, each element of the list is tried in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) order given.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) By default, the list will contain one item that conforms to the pattern
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) "<arch>_linux_26", amd64 being the name for x86_64.