Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (1) — Plan9 3rd Edition (Vita Nuova)

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)

keyring-auth(2)

security-auth(2)

sys-intro(2)

sys-bind(2)

sys-dial(2)

intro(3)

getauthinfo(8)

BIND(1)

NAME

bind, mount, unmount − change name space

SYNOPSIS

­bind [ ­option ...  ] ­source target

­mount [ ­option ...  ] ­addr target [ ­spec ]

­unmount [ ­source ] ­target

DESCRIPTION

The bind and mount commands modify the file name space of the current process and other processes in the same name space group (see sys-pctl(2)). For both calls, ­target is the name of an existing file or directory in the current name space where the modification is to be made. 

For bind, ­source is the name of an existing file or directory in the current name space.  After a successful bind, the file name ­target is an alias for the object originally named by ­source ; if the modification doesn’t hide it, ­source will also still refer to its original file.  The evaluation of ­source (see sys-intro(2)) happens at the time of the bind, not when the binding is later used.

Both ­source and ­target files must be of the same type: either both directories or both files. 

For mount, ­addr is usually a network address for a machine acting as a file server.  This argument should then conform to the conventions described in sys-dial(2). It can also be the name of a file that when opened gives a connection to a file server. The optional ­spec argument to ­mount is passed in the attach(5) message and selects amongst different file trees offered by the server.

The effects of ­bind and ­mount can be undone by unmount. If two arguments are given to unmount, the effect is to undo a ­bind or ­mount with the same arguments. If only one argument is given, everything bound to or mounted on ­target is unmounted. 

OPTIONS

Options control aspects of the modification to the name space:

­-r The default option for both bind and mount. Replace the ­target file by the new one ­source.  Henceforth, an evaluation of the pathname ­target will be translated to the new file.  If they are directories (for mount, this condition is true by definition), ­target becomes a ­union directory consisting of one directory (the source directory). 

­-b Both files must be directories.  Add the source directory to the beginning of the union directory represented by the target directory. 

­-a Both files must be directories.  Add the source directory to the end of the union directory represented by the target directory. 

­-c This can be used in addition to any of the above to permit creation in a union directory.  When a new file is created in a union directory, it is placed in the first element of the union that permits creation. 

­-A For ­mount only. Do not authenticate the connection to the server before proceeding with mount. Otherwise the connection is authenticated by security-auth(2).

-C alg For ­mount only, specify the algorithm, alg, to be used following authentication for digesting or encryption. See ssl(3) for the supported algorithms. The default is none: ssl(3) is not used after authentication.

-f kfile For mount only, specify the keyfile to be used when authenticating.  The default is /usr/user/keyring/default.  See keyring-auth(2) for more details.

CAVEAT

The ­# character in the name of a kernel device must be quoted when used in a ­bind or ­unmount command, or the shell will take it as the start of a comment. 

SOURCE

­/appl/cmd/bind.b
­/appl/cmd/mount.b
­/appl/cmd/unmount.b

SEE ALSO

sh(1), keyring-auth(2), security-auth(2), sys-intro(2), sys-bind(2), sys-dial(2), intro(3), getauthinfo(8)
 

Plan 9  —  June 29, 2000

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026