afs.txt 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. kAFS: AFS FILESYSTEM
  2. ====================
  3. ABOUT
  4. =====
  5. This filesystem provides a fairly simple AFS filesystem driver. It is under
  6. development and only provides very basic facilities. It does not yet support
  7. the following AFS features:
  8. (*) Write support.
  9. (*) Communications security.
  10. (*) Local caching.
  11. (*) pioctl() system call.
  12. (*) Automatic mounting of embedded mountpoints.
  13. USAGE
  14. =====
  15. When inserting the driver modules the root cell must be specified along with a
  16. list of volume location server IP addresses:
  17. insmod rxrpc.o
  18. insmod kafs.o rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
  19. The first module is a driver for the RxRPC remote operation protocol, and the
  20. second is the actual filesystem driver for the AFS filesystem.
  21. Once the module has been loaded, more modules can be added by the following
  22. procedure:
  23. echo add grand.central.org 18.7.14.88:128.2.191.224 >/proc/fs/afs/cells
  24. Where the parameters to the "add" command are the name of a cell and a list of
  25. volume location servers within that cell.
  26. Filesystems can be mounted anywhere by commands similar to the following:
  27. mount -t afs "%cambridge.redhat.com:root.afs." /afs
  28. mount -t afs "#cambridge.redhat.com:root.cell." /afs/cambridge
  29. mount -t afs "#root.afs." /afs
  30. mount -t afs "#root.cell." /afs/cambridge
  31. NB: When using this on Linux 2.4, the mount command has to be different,
  32. since the filesystem doesn't have access to the device name argument:
  33. mount -t afs none /afs -ovol="#root.afs."
  34. Where the initial character is either a hash or a percent symbol depending on
  35. whether you definitely want a R/W volume (hash) or whether you'd prefer a R/O
  36. volume, but are willing to use a R/W volume instead (percent).
  37. The name of the volume can be suffixes with ".backup" or ".readonly" to
  38. specify connection to only volumes of those types.
  39. The name of the cell is optional, and if not given during a mount, then the
  40. named volume will be looked up in the cell specified during insmod.
  41. Additional cells can be added through /proc (see later section).
  42. MOUNTPOINTS
  43. ===========
  44. AFS has a concept of mountpoints. These are specially formatted symbolic links
  45. (of the same form as the "device name" passed to mount). kAFS presents these
  46. to the user as directories that have special properties:
  47. (*) They cannot be listed. Running a program like "ls" on them will incur an
  48. EREMOTE error (Object is remote).
  49. (*) Other objects can't be looked up inside of them. This also incurs an
  50. EREMOTE error.
  51. (*) They can be queried with the readlink() system call, which will return
  52. the name of the mountpoint to which they point. The "readlink" program
  53. will also work.
  54. (*) They can be mounted on (which symbolic links can't).
  55. PROC FILESYSTEM
  56. ===============
  57. The rxrpc module creates a number of files in various places in the /proc
  58. filesystem:
  59. (*) Firstly, some information files are made available in a directory called
  60. "/proc/net/rxrpc/". These list the extant transport endpoint, peer,
  61. connection and call records.
  62. (*) Secondly, some control files are made available in a directory called
  63. "/proc/sys/rxrpc/". Currently, all these files can be used for is to
  64. turn on various levels of tracing.
  65. The AFS modules creates a "/proc/fs/afs/" directory and populates it:
  66. (*) A "cells" file that lists cells currently known to the afs module.
  67. (*) A directory per cell that contains files that list volume location
  68. servers, volumes, and active servers known within that cell.
  69. THE CELL DATABASE
  70. =================
  71. The filesystem maintains an internal database of all the cells it knows and
  72. the IP addresses of the volume location servers for those cells. The cell to
  73. which the computer belongs is added to the database when insmod is performed
  74. by the "rootcell=" argument.
  75. Further cells can be added by commands similar to the following:
  76. echo add CELLNAME VLADDR[:VLADDR][:VLADDR]... >/proc/fs/afs/cells
  77. echo add grand.central.org 18.7.14.88:128.2.191.224 >/proc/fs/afs/cells
  78. No other cell database operations are available at this time.
  79. EXAMPLES
  80. ========
  81. Here's what I use to test this. Some of the names and IP addresses are local
  82. to my internal DNS. My "root.afs" partition has a mount point within it for
  83. some public volumes volumes.
  84. insmod -S /tmp/rxrpc.o
  85. insmod -S /tmp/kafs.o rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
  86. mount -t afs \%root.afs. /afs
  87. mount -t afs \%cambridge.redhat.com:root.cell. /afs/cambridge.redhat.com/
  88. echo add grand.central.org 18.7.14.88:128.2.191.224 > /proc/fs/afs/cells
  89. mount -t afs "#grand.central.org:root.cell." /afs/grand.central.org/
  90. mount -t afs "#grand.central.org:root.archive." /afs/grand.central.org/archive
  91. mount -t afs "#grand.central.org:root.contrib." /afs/grand.central.org/contrib
  92. mount -t afs "#grand.central.org:root.doc." /afs/grand.central.org/doc
  93. mount -t afs "#grand.central.org:root.project." /afs/grand.central.org/project
  94. mount -t afs "#grand.central.org:root.service." /afs/grand.central.org/service
  95. mount -t afs "#grand.central.org:root.software." /afs/grand.central.org/software
  96. mount -t afs "#grand.central.org:root.user." /afs/grand.central.org/user
  97. umount /afs/grand.central.org/user
  98. umount /afs/grand.central.org/software
  99. umount /afs/grand.central.org/service
  100. umount /afs/grand.central.org/project
  101. umount /afs/grand.central.org/doc
  102. umount /afs/grand.central.org/contrib
  103. umount /afs/grand.central.org/archive
  104. umount /afs/grand.central.org
  105. umount /afs/cambridge.redhat.com
  106. umount /afs
  107. rmmod kafs
  108. rmmod rxrpc