summaryrefslogtreecommitdiff
path: root/9mount.1
blob: 66ce7efb5f4f4201ede2af6a76272ce21cb9fa08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.TH "9mount" "1" "23 July 2008" "9mount" "User commands"
.SH NAME
9mount, 9bind, 9umount \- mount/unmount 9p filesystems
.SH SYNOPSIS
.B 9mount
[ insuvx ] [ -a SPEC ] [ -c CACHE ] [ -d DEBUG ] [ -m MSIZE ] DIAL MOUNTPT
.PP
.B 9bind
OLD NEW
.PP
.B 9umount
MOUNTPT
.SH DESCRIPTION
.B 9mount
mounts a 9p filesystem served at DIAL on MOUNTPT. MOUNTPT must be
writable by you and not sticky. DIAL is a dial string assuming one of
the forms:
.PP
unix!SOCKET
.br
tcp!HOST[!PORT]
.br
virtio!CHANNEL
.br
-
.PP
where SOCKET is the name of a file representing a socket, HOST is a
hostname, PORT is a port number or service name, and CHANNEL is a
virtio channel name (currently ignored). - indicates that 9p messages
should be read/written on stdin/stdout.
.B 9mount
has several options:
.TP
-i
mount the file system with your uid/gid
.TP
-n
dry-run, print mount command to stderr but don't actually mount anything
.TP
-s
single attach mode - all users accessing the mount point see the same
filesystem (by default they'll each see a unique attach)
.TP
-u
use the 9P2000.u extensions
.TP
-v
use device mapping
.TP
-x
exclusive access - other users cannot access the mount point
.TP
-a SPEC
SPEC determines which file tree to mount when attaching to file servers that
export multiple trees
.TP
-c CACHE
turns on caching using CACHE mode. Supported modes are
.I loose
(suitable for exclusive read-only mounts), 
.IR fscache ,
and
.IR mmap .
.TP
-d DEBUG
comma seperated list of channels for which to enable debug output. Possible
channels include: err, devel, 9p, vfs, conv, mux, trans, alloc, fcall.
.TP
-m MSIZE
specifies the maximum length of a single 9p message in bytes. Must be less
than or equal to 8192 for non-root users.
.PP
.B 9bind
performs a bind mount, making the tree visible at directory OLD also visible
at mount point NEW.
.PP
.B 9umount
unmounts a 9p filesystem previously mounted by you.
.SH ENVIRONMENT
.TP
$USER
the uname to provide to the server.
.SH EXAMPLES
.TP
9mount -i 'unix!/tmp/ns.'$USER'.:0/factotum' $HOME/n/factotum
mount p9p's factotum interface
.TP
9mount 'tcp!sources.cs.bell-labs.com' $HOME/n/sources
import plan 9's "sources"
.TP
9mount -u -a/home/sqweek/mail 'tcp!wren!5640' $HOME/mail
import my maildir from my server(wren), being served by ufs
.TP
9mount -i 'tcp!wren' $HOME/n/wren; 9bind $HOME/n/wren/home/sqweek/mail $HOME/mail
again importing my maildir, this time serving via u9fs
.SH BUGS
.B 9mount
truncates user names and SPECs to 249 characters.
.B 9umount
doesn't know this, so you won't be able to unmount anything
outside your home directory. But you probably never bother
logging out if your user name is that long.
.PP
.B 9mount
doesn't update /etc/mtab.
.PP
.B 9bind
only does a "shallow", non-recursive bind - any mounted filesystems
under the OLD tree will not appear mounted in the NEW tree.
.PP
If you
.B 9bind
a non-9p filesystem outside your home directory,
.B 9umount
won't let you unmount it.
.SH AUTHOR
sqweek@gmail.com
.SH SEE ALSO
.BR mount (1)