2007-11-08 20:49:43 +03:00
|
|
|
.\" $NetBSD: mount_psshfs.8,v 1.13 2007/11/08 17:49:43 pooka Exp $
|
2007-01-07 22:56:26 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2007 Antti Kantee. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
2007-11-08 19:40:14 +03:00
|
|
|
.Dd November 8, 2007
|
2007-01-07 22:56:26 +03:00
|
|
|
.Dt MOUNT_PSSHFS 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mount_psshfs
|
2007-02-18 01:19:20 +03:00
|
|
|
.Nd sshfs implementation for puffs
|
2007-01-07 22:56:26 +03:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2007-04-13 01:04:39 +04:00
|
|
|
.Op Ar options
|
2007-01-07 22:56:26 +03:00
|
|
|
.Ar user@host[:path]
|
|
|
|
.Ar mount_point
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility can be used to mount a file system using the ssh sftp
|
|
|
|
subprotocol, making a remote directory hierarchy appear in the
|
|
|
|
local directory tree.
|
2007-02-18 01:19:20 +03:00
|
|
|
This functionality is commonly known as
|
|
|
|
.Em sshfs .
|
2007-01-07 22:56:26 +03:00
|
|
|
.Pp
|
|
|
|
The mandatory parameters are the target host name and local mount
|
|
|
|
point.
|
2007-01-08 10:26:40 +03:00
|
|
|
The target host parameter can optionally contain a username whose
|
2007-01-07 22:56:26 +03:00
|
|
|
credentials will be used by the remote sshd, and a relative or
|
|
|
|
absolute path for the remote mountpoint's root.
|
|
|
|
If no user is given, the credentials of the user issuing the mount
|
|
|
|
command are used.
|
|
|
|
If no path is given, the user's home directory on the remote machine
|
|
|
|
will be used.
|
|
|
|
.Pp
|
2007-04-13 01:04:39 +04:00
|
|
|
The following command line options are available:
|
|
|
|
.Pp
|
2007-04-29 14:02:56 +04:00
|
|
|
.Bl -tag -width xxx
|
2007-04-13 01:04:39 +04:00
|
|
|
.It Fl e
|
|
|
|
Makes the mounted file system nfs exportable.
|
|
|
|
If this option is used, it is very important to understand that
|
|
|
|
.Nm
|
|
|
|
can not provide complete support for nfs due to the limitations in
|
|
|
|
the backend.
|
|
|
|
Files are valid only for the time that
|
|
|
|
.Nm
|
|
|
|
is running and in the event of e.g. a server crash, all client retries
|
|
|
|
to access files will fail.
|
|
|
|
.It Fl o Ar [no]option
|
|
|
|
This flag can be used to give standard mount options and options
|
|
|
|
to puffs.
|
2007-05-10 00:25:20 +04:00
|
|
|
.It Fl O Ar sshopt=value
|
2007-05-09 23:54:39 +04:00
|
|
|
Pass an option to
|
|
|
|
.Xr ssh 1 , for example
|
2007-05-10 00:25:20 +04:00
|
|
|
.Fl O Ar Port=22 .
|
2007-05-09 23:54:39 +04:00
|
|
|
For a list of valid options, see
|
|
|
|
.Xr ssh_config 5 .
|
2007-10-20 23:14:27 +04:00
|
|
|
.It Fl r Ar max_reads
|
|
|
|
Limits maximum outstanding read requests for each node to
|
|
|
|
.Ar max_reads .
|
|
|
|
This can be used to improve interactive performance on low-bandwidth links
|
|
|
|
when also performing bulk data reads.
|
2007-04-13 01:04:39 +04:00
|
|
|
.It Fl s
|
|
|
|
This flag can be used to make the program stay on top.
|
2007-02-18 01:19:20 +03:00
|
|
|
The default is to detach from the terminal and run in the background.
|
2007-11-08 19:40:14 +03:00
|
|
|
.It Fl t Ar timeout
|
|
|
|
By default
|
|
|
|
.Nm
|
|
|
|
caches directory contents and node attributes for 30 seconds before
|
|
|
|
re-fetching from the server to check if anything has changed on
|
|
|
|
the server.
|
|
|
|
This option is used to adjust the timeout period to
|
|
|
|
.Ar timeout
|
|
|
|
seconds.
|
|
|
|
A value 0 means the cache is never valid and \-1 means it is
|
|
|
|
valid indefinitely.
|
2007-11-08 20:49:43 +03:00
|
|
|
It is possible to force a re-read regardless of timeout status by sending
|
|
|
|
.Dv SIGHUP
|
|
|
|
to the
|
|
|
|
.Nm
|
|
|
|
process.
|
2007-11-08 19:40:14 +03:00
|
|
|
.Pp
|
|
|
|
Note: the file system will still free nodes when requested by the
|
|
|
|
kernel and will lose all cached information in doing so.
|
|
|
|
How frequently this happens depends on system activity and the total
|
|
|
|
number of available vnodes in the system (kern.maxvnodes).
|
2007-04-13 01:04:39 +04:00
|
|
|
.El
|
2007-05-10 01:00:27 +04:00
|
|
|
.Sh EXAMPLES
|
|
|
|
The following example illustrates how to mount the directory
|
|
|
|
.Em /usr
|
|
|
|
on server
|
|
|
|
.Em bigiron
|
|
|
|
as user
|
|
|
|
.Em abc
|
|
|
|
on local directory
|
|
|
|
.Em /mnt
|
|
|
|
with ssh transport compression enabled:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
mount_psshfs -O Compression=yes abc@bigiron:/usr /mnt
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
It is possible to use
|
|
|
|
.Xr fstab 5
|
|
|
|
for psshfs mounts, with SSH public key authentication:
|
|
|
|
.Pp
|
2007-11-08 19:40:14 +03:00
|
|
|
.Dl "abc@bigiron:/usr /mnt psshfs rw,noauto,-O=BatchMode=yes,-O=IdentityFile=/root/.ssh/id_rsa,-t=-1"
|
2007-01-07 22:56:26 +03:00
|
|
|
.Sh SEE ALSO
|
2007-05-10 01:00:27 +04:00
|
|
|
.Xr fstab 5 ,
|
2007-01-08 10:26:40 +03:00
|
|
|
.Xr sftp 1 ,
|
2007-01-07 22:56:26 +03:00
|
|
|
.Xr puffs 3 ,
|
|
|
|
.Xr puffs 4 ,
|
2007-01-08 10:26:40 +03:00
|
|
|
.Xr mount 8 ,
|
2007-05-09 23:54:39 +04:00
|
|
|
.Xr ssh_config 5 ,
|
2007-01-07 22:56:26 +03:00
|
|
|
.Xr sshd 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility first appeared in
|
2007-01-08 10:26:40 +03:00
|
|
|
.Nx 5.0 .
|
2007-01-07 22:56:26 +03:00
|
|
|
.Sh CAVEATS
|
2007-01-08 10:26:40 +03:00
|
|
|
Permissions are not handled.
|
|
|
|
Do not expect the file system to behave except for a single user.
|