|
|
1.1 ! root 1: .TH BIND 1 ! 2: .SH NAME ! 3: bind, mount, unmount \- change name space ! 4: .SH SYNOPSIS ! 5: .B bind ! 6: [ ! 7: .I option ... ! 8: ] ! 9: .I new old ! 10: .PP ! 11: .B mount ! 12: [ ! 13: .I option ... ! 14: ] ! 15: .I servename old ! 16: [ ! 17: .I spec ! 18: ] ! 19: .PP ! 20: .B unmount ! 21: [ ! 22: .I new ! 23: ] ! 24: .I old ! 25: .SH DESCRIPTION ! 26: .I Bind ! 27: and ! 28: .I mount ! 29: modify the file name space of the current process ! 30: and other processes in the same name space group ! 31: (see ! 32: .IR fork (2)). ! 33: For both calls, ! 34: .I old ! 35: is the name of an existing file or directory in the ! 36: current name space where the modification is to be made. ! 37: .PP ! 38: For ! 39: .IR bind , ! 40: .I new ! 41: is the name of another (or possibly the same) ! 42: existing file or directory in ! 43: the current name space. ! 44: After a successful ! 45: .IR bind , ! 46: the file name ! 47: .I old ! 48: is an alias for the object originally named by ! 49: .IR new ; ! 50: if the modification doesn't hide it, ! 51: .I new ! 52: will also still refer to its original file. ! 53: The evaluation of ! 54: .I new ! 55: (see ! 56: .IR intro (2)) ! 57: happens at the time of the ! 58: .IR bind , ! 59: not when the binding is later used. ! 60: .PP ! 61: The ! 62: .I servename ! 63: argument to ! 64: .I mount ! 65: is the name of a file that, when opened, yields an ! 66: existing connection to a file server. ! 67: Almost always, ! 68: .I servename ! 69: will be a file in ! 70: .B /srv ! 71: (see ! 72: .IR srv (3)). ! 73: In the discussion below, ! 74: .I new ! 75: refers to the file named by the ! 76: .I new ! 77: argument to ! 78: .I bind ! 79: or the root directory of the service ! 80: available in ! 81: .I servename ! 82: after a ! 83: .I mount. ! 84: Either both ! 85: .I old ! 86: and ! 87: .I new ! 88: files must be directories, ! 89: or both must not be directories. ! 90: .PP ! 91: Options control aspects of the modification to the name space: ! 92: .TP 10 ! 93: (none) ! 94: Replace the ! 95: .I old ! 96: file by the new one. ! 97: Henceforth, an evaluation of ! 98: .I old ! 99: will be translated to the new file. ! 100: If they are directories (for ! 101: .IR mount , ! 102: this condition is true by definition), ! 103: .I old ! 104: becomes a ! 105: .I "union directory" ! 106: consisting of one directory (the new file). ! 107: .TP ! 108: .B -b ! 109: Both files must be directories. ! 110: Add the new directory to the beginning ! 111: of the union directory represented by the old file. ! 112: .TP ! 113: .B -a ! 114: Both files must be directories. ! 115: Add the new directory to the end ! 116: of the union directory represented by the old file. ! 117: .TP ! 118: .B -c ! 119: This can be used in addition to any of the above to permit ! 120: creation in a union directory. ! 121: When a new file is created in a union directory, ! 122: it is placed in the first element of the union that permits creation. ! 123: .PD ! 124: .PP ! 125: The ! 126: .I spec ! 127: argument to ! 128: .I mount ! 129: is passed in the ! 130: .IR attach (5) ! 131: message to the server, and selects among different ! 132: file trees served by the server. ! 133: .PP ! 134: The ! 135: .IR srv (3) ! 136: service registry device, normally bound to ! 137: .BR /srv , ! 138: is a convenient rendezvous point for services that can be mounted. ! 139: After bootstrap, the file ! 140: .B /srv/boot ! 141: contains the communications port to the file system from which ! 142: the system was loaded. ! 143: .PP ! 144: The effects of ! 145: .I bind ! 146: and ! 147: .I mount ! 148: can be undone with the ! 149: .I unmount ! 150: command. ! 151: If two arguments are given to ! 152: .IR unmount , ! 153: the effect is to undo a ! 154: .I bind ! 155: or ! 156: .I mount ! 157: with the same arguments. ! 158: If only one argument is given, ! 159: everything bound to or mounted upon ! 160: .I old ! 161: is unmounted. ! 162: .SH EXAMPLES ! 163: To compile a program with the C library from July 16, 1992: ! 164: .IP ! 165: .EX ! 166: mount /srv/boot /n/dump dump ! 167: bind /n/dump/1992/0716/mips/lib/libc.a /mips/lib/libc.a ! 168: mk ! 169: .EE ! 170: .SH SOURCE ! 171: .B /sys/src/cmd/bind.c ! 172: .br ! 173: .B /sys/src/cmd/mount.c ! 174: .br ! 175: .B /sys/src/cmd/unmount.c ! 176: .SH SEE ALSO ! 177: .IR bind (2), ! 178: .IR open (2), ! 179: .IR srv (3), ! 180: .IR srv (4)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.