mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-22 05:44:31 +08:00
docs: filesystems: convert afs.txt to ReST
- Add a SPDX header; - Adjust document and section titles; - Comment out text-only ToC; - Mark literal blocks as such; - Add it to filesystems/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/d77f5afdb5da0f8b0ec3dbe720aef23f1ce73bb5.1581955849.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
7627216830
commit
ca6e9049a0
@ -1,8 +1,10 @@
|
|||||||
====================
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
kAFS: AFS FILESYSTEM
|
|
||||||
====================
|
|
||||||
|
|
||||||
Contents:
|
====================
|
||||||
|
kAFS: AFS FILESYSTEM
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. Contents:
|
||||||
|
|
||||||
- Overview.
|
- Overview.
|
||||||
- Usage.
|
- Usage.
|
||||||
@ -14,8 +16,7 @@ Contents:
|
|||||||
- The @sys substitution.
|
- The @sys substitution.
|
||||||
|
|
||||||
|
|
||||||
========
|
Overview
|
||||||
OVERVIEW
|
|
||||||
========
|
========
|
||||||
|
|
||||||
This filesystem provides a fairly simple secure AFS filesystem driver. It is
|
This filesystem provides a fairly simple secure AFS filesystem driver. It is
|
||||||
@ -35,35 +36,33 @@ It does not yet support the following AFS features:
|
|||||||
(*) pioctl() system call.
|
(*) pioctl() system call.
|
||||||
|
|
||||||
|
|
||||||
===========
|
Compilation
|
||||||
COMPILATION
|
|
||||||
===========
|
===========
|
||||||
|
|
||||||
The filesystem should be enabled by turning on the kernel configuration
|
The filesystem should be enabled by turning on the kernel configuration
|
||||||
options:
|
options::
|
||||||
|
|
||||||
CONFIG_AF_RXRPC - The RxRPC protocol transport
|
CONFIG_AF_RXRPC - The RxRPC protocol transport
|
||||||
CONFIG_RXKAD - The RxRPC Kerberos security handler
|
CONFIG_RXKAD - The RxRPC Kerberos security handler
|
||||||
CONFIG_AFS - The AFS filesystem
|
CONFIG_AFS - The AFS filesystem
|
||||||
|
|
||||||
Additionally, the following can be turned on to aid debugging:
|
Additionally, the following can be turned on to aid debugging::
|
||||||
|
|
||||||
CONFIG_AF_RXRPC_DEBUG - Permit AF_RXRPC debugging to be enabled
|
CONFIG_AF_RXRPC_DEBUG - Permit AF_RXRPC debugging to be enabled
|
||||||
CONFIG_AFS_DEBUG - Permit AFS debugging to be enabled
|
CONFIG_AFS_DEBUG - Permit AFS debugging to be enabled
|
||||||
|
|
||||||
They permit the debugging messages to be turned on dynamically by manipulating
|
They permit the debugging messages to be turned on dynamically by manipulating
|
||||||
the masks in the following files:
|
the masks in the following files::
|
||||||
|
|
||||||
/sys/module/af_rxrpc/parameters/debug
|
/sys/module/af_rxrpc/parameters/debug
|
||||||
/sys/module/kafs/parameters/debug
|
/sys/module/kafs/parameters/debug
|
||||||
|
|
||||||
|
|
||||||
=====
|
Usage
|
||||||
USAGE
|
|
||||||
=====
|
=====
|
||||||
|
|
||||||
When inserting the driver modules the root cell must be specified along with a
|
When inserting the driver modules the root cell must be specified along with a
|
||||||
list of volume location server IP addresses:
|
list of volume location server IP addresses::
|
||||||
|
|
||||||
modprobe rxrpc
|
modprobe rxrpc
|
||||||
modprobe kafs rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
|
modprobe kafs rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
|
||||||
@ -77,14 +76,14 @@ The second module is the kerberos RxRPC security driver, and the third module
|
|||||||
is the actual filesystem driver for the AFS filesystem.
|
is the actual filesystem driver for the AFS filesystem.
|
||||||
|
|
||||||
Once the module has been loaded, more modules can be added by the following
|
Once the module has been loaded, more modules can be added by the following
|
||||||
procedure:
|
procedure::
|
||||||
|
|
||||||
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
|
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
|
||||||
|
|
||||||
Where the parameters to the "add" command are the name of a cell and a list of
|
Where the parameters to the "add" command are the name of a cell and a list of
|
||||||
volume location servers within that cell, with the latter separated by colons.
|
volume location servers within that cell, with the latter separated by colons.
|
||||||
|
|
||||||
Filesystems can be mounted anywhere by commands similar to the following:
|
Filesystems can be mounted anywhere by commands similar to the following::
|
||||||
|
|
||||||
mount -t afs "%cambridge.redhat.com:root.afs." /afs
|
mount -t afs "%cambridge.redhat.com:root.afs." /afs
|
||||||
mount -t afs "#cambridge.redhat.com:root.cell." /afs/cambridge
|
mount -t afs "#cambridge.redhat.com:root.cell." /afs/cambridge
|
||||||
@ -104,8 +103,7 @@ named volume will be looked up in the cell specified during modprobe.
|
|||||||
Additional cells can be added through /proc (see later section).
|
Additional cells can be added through /proc (see later section).
|
||||||
|
|
||||||
|
|
||||||
===========
|
Mountpoints
|
||||||
MOUNTPOINTS
|
|
||||||
===========
|
===========
|
||||||
|
|
||||||
AFS has a concept of mountpoints. In AFS terms, these are specially formatted
|
AFS has a concept of mountpoints. In AFS terms, these are specially formatted
|
||||||
@ -123,42 +121,40 @@ culled first. If all are culled, then the requested volume will also be
|
|||||||
unmounted, otherwise error EBUSY will be returned.
|
unmounted, otherwise error EBUSY will be returned.
|
||||||
|
|
||||||
This can be used by the administrator to attempt to unmount the whole AFS tree
|
This can be used by the administrator to attempt to unmount the whole AFS tree
|
||||||
mounted on /afs in one go by doing:
|
mounted on /afs in one go by doing::
|
||||||
|
|
||||||
umount /afs
|
umount /afs
|
||||||
|
|
||||||
|
|
||||||
============
|
Dynamic Root
|
||||||
DYNAMIC ROOT
|
|
||||||
============
|
============
|
||||||
|
|
||||||
A mount option is available to create a serverless mount that is only usable
|
A mount option is available to create a serverless mount that is only usable
|
||||||
for dynamic lookup. Creating such a mount can be done by, for example:
|
for dynamic lookup. Creating such a mount can be done by, for example::
|
||||||
|
|
||||||
mount -t afs none /afs -o dyn
|
mount -t afs none /afs -o dyn
|
||||||
|
|
||||||
This creates a mount that just has an empty directory at the root. Attempting
|
This creates a mount that just has an empty directory at the root. Attempting
|
||||||
to look up a name in this directory will cause a mountpoint to be created that
|
to look up a name in this directory will cause a mountpoint to be created that
|
||||||
looks up a cell of the same name, for example:
|
looks up a cell of the same name, for example::
|
||||||
|
|
||||||
ls /afs/grand.central.org/
|
ls /afs/grand.central.org/
|
||||||
|
|
||||||
|
|
||||||
===============
|
Proc Filesystem
|
||||||
PROC FILESYSTEM
|
|
||||||
===============
|
===============
|
||||||
|
|
||||||
The AFS modules creates a "/proc/fs/afs/" directory and populates it:
|
The AFS modules creates a "/proc/fs/afs/" directory and populates it:
|
||||||
|
|
||||||
(*) A "cells" file that lists cells currently known to the afs module and
|
(*) A "cells" file that lists cells currently known to the afs module and
|
||||||
their usage counts:
|
their usage counts::
|
||||||
|
|
||||||
[root@andromeda ~]# cat /proc/fs/afs/cells
|
[root@andromeda ~]# cat /proc/fs/afs/cells
|
||||||
USE NAME
|
USE NAME
|
||||||
3 cambridge.redhat.com
|
3 cambridge.redhat.com
|
||||||
|
|
||||||
(*) A directory per cell that contains files that list volume location
|
(*) A directory per cell that contains files that list volume location
|
||||||
servers, volumes, and active servers known within that cell.
|
servers, volumes, and active servers known within that cell::
|
||||||
|
|
||||||
[root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/servers
|
[root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/servers
|
||||||
USE ADDR STATE
|
USE ADDR STATE
|
||||||
@ -171,8 +167,7 @@ The AFS modules creates a "/proc/fs/afs/" directory and populates it:
|
|||||||
1 Val 20000000 20000001 20000002 root.afs
|
1 Val 20000000 20000001 20000002 root.afs
|
||||||
|
|
||||||
|
|
||||||
=================
|
The Cell Database
|
||||||
THE CELL DATABASE
|
|
||||||
=================
|
=================
|
||||||
|
|
||||||
The filesystem maintains an internal database of all the cells it knows and the
|
The filesystem maintains an internal database of all the cells it knows and the
|
||||||
@ -181,7 +176,7 @@ the system belongs is added to the database when modprobe is performed by the
|
|||||||
"rootcell=" argument or, if compiled in, using a "kafs.rootcell=" argument on
|
"rootcell=" argument or, if compiled in, using a "kafs.rootcell=" argument on
|
||||||
the kernel command line.
|
the kernel command line.
|
||||||
|
|
||||||
Further cells can be added by commands similar to the following:
|
Further cells can be added by commands similar to the following::
|
||||||
|
|
||||||
echo add CELLNAME VLADDR[:VLADDR][:VLADDR]... >/proc/fs/afs/cells
|
echo add CELLNAME VLADDR[:VLADDR][:VLADDR]... >/proc/fs/afs/cells
|
||||||
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
|
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
|
||||||
@ -189,8 +184,7 @@ Further cells can be added by commands similar to the following:
|
|||||||
No other cell database operations are available at this time.
|
No other cell database operations are available at this time.
|
||||||
|
|
||||||
|
|
||||||
========
|
Security
|
||||||
SECURITY
|
|
||||||
========
|
========
|
||||||
|
|
||||||
Secure operations are initiated by acquiring a key using the klog program. A
|
Secure operations are initiated by acquiring a key using the klog program. A
|
||||||
@ -198,17 +192,17 @@ very primitive klog program is available at:
|
|||||||
|
|
||||||
http://people.redhat.com/~dhowells/rxrpc/klog.c
|
http://people.redhat.com/~dhowells/rxrpc/klog.c
|
||||||
|
|
||||||
This should be compiled by:
|
This should be compiled by::
|
||||||
|
|
||||||
make klog LDLIBS="-lcrypto -lcrypt -lkrb4 -lkeyutils"
|
make klog LDLIBS="-lcrypto -lcrypt -lkrb4 -lkeyutils"
|
||||||
|
|
||||||
And then run as:
|
And then run as::
|
||||||
|
|
||||||
./klog
|
./klog
|
||||||
|
|
||||||
Assuming it's successful, this adds a key of type RxRPC, named for the service
|
Assuming it's successful, this adds a key of type RxRPC, named for the service
|
||||||
and cell, eg: "afs@<cellname>". This can be viewed with the keyctl program or
|
and cell, eg: "afs@<cellname>". This can be viewed with the keyctl program or
|
||||||
by cat'ing /proc/keys:
|
by cat'ing /proc/keys::
|
||||||
|
|
||||||
[root@andromeda ~]# keyctl show
|
[root@andromeda ~]# keyctl show
|
||||||
Session Keyring
|
Session Keyring
|
||||||
@ -232,20 +226,19 @@ socket), then the operations on the file will be made with key that was used to
|
|||||||
open the file.
|
open the file.
|
||||||
|
|
||||||
|
|
||||||
=====================
|
The @sys Substitution
|
||||||
THE @SYS SUBSTITUTION
|
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
The list of up to 16 @sys substitutions for the current network namespace can
|
The list of up to 16 @sys substitutions for the current network namespace can
|
||||||
be configured by writing a list to /proc/fs/afs/sysname:
|
be configured by writing a list to /proc/fs/afs/sysname::
|
||||||
|
|
||||||
[root@andromeda ~]# echo foo amd64_linux_26 >/proc/fs/afs/sysname
|
[root@andromeda ~]# echo foo amd64_linux_26 >/proc/fs/afs/sysname
|
||||||
|
|
||||||
or cleared entirely by writing an empty list:
|
or cleared entirely by writing an empty list::
|
||||||
|
|
||||||
[root@andromeda ~]# echo >/proc/fs/afs/sysname
|
[root@andromeda ~]# echo >/proc/fs/afs/sysname
|
||||||
|
|
||||||
The current list for current network namespace can be retrieved by:
|
The current list for current network namespace can be retrieved by::
|
||||||
|
|
||||||
[root@andromeda ~]# cat /proc/fs/afs/sysname
|
[root@andromeda ~]# cat /proc/fs/afs/sysname
|
||||||
foo
|
foo
|
@ -49,6 +49,7 @@ Documentation for filesystem implementations.
|
|||||||
9p
|
9p
|
||||||
adfs
|
adfs
|
||||||
affs
|
affs
|
||||||
|
afs
|
||||||
autofs
|
autofs
|
||||||
fuse
|
fuse
|
||||||
overlayfs
|
overlayfs
|
||||||
|
Loading…
Reference in New Issue
Block a user