2004-01-13 23:42:43 +03:00
|
|
|
.\" $NetBSD: fss.4,v 1.5 2004/01/13 20:42:43 wiz Exp $ */
|
2003-12-10 14:40:11 +03:00
|
|
|
.\"
|
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
.\" by Juergen Hannken-Illjes.
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
|
|
|
|
.\"
|
2004-01-11 22:05:26 +03:00
|
|
|
.Dd January 10, 2004
|
2003-12-10 14:40:11 +03:00
|
|
|
.Dt FSS 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
2004-01-13 23:42:43 +03:00
|
|
|
.Nm fss ,
|
|
|
|
.Nm fssbs
|
2003-12-10 14:40:11 +03:00
|
|
|
.Nd file system snapshot device
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd "pseudo-device fss 4"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver provides a read-only interface to the snapshot of a currently
|
|
|
|
mounted file system.
|
|
|
|
Reading from a
|
|
|
|
.Nm
|
|
|
|
device gives the view of the file system when the snapshot was taken.
|
|
|
|
It can be configured via
|
|
|
|
.Xr ioctl 2 .
|
|
|
|
.Sh IOCTLS
|
|
|
|
The
|
|
|
|
.Xr ioctl 2
|
|
|
|
command codes below are defined in
|
|
|
|
.Aq Pa sys/dev/fssvar.h .
|
|
|
|
.Pp
|
2003-12-11 20:00:16 +03:00
|
|
|
The (third) argument to
|
2003-12-10 14:40:11 +03:00
|
|
|
.Xr ioctl 2
|
|
|
|
should be a pointer to the type indicated.
|
2003-12-11 20:00:16 +03:00
|
|
|
.Bl -tag -width XFSSIOCSETXstructXfss_setX -offset indent
|
|
|
|
.It Dv FSSIOCSET(struct fss_set)
|
2003-12-10 14:40:11 +03:00
|
|
|
Configures a
|
|
|
|
.Nm
|
|
|
|
device.
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
struct fss_set {
|
|
|
|
char *fss_mount;
|
|
|
|
char *fss_bstore;
|
|
|
|
blksize_t fss_csize;
|
|
|
|
};
|
|
|
|
.Ed
|
2003-12-11 20:00:16 +03:00
|
|
|
.Pp
|
2003-12-10 14:40:11 +03:00
|
|
|
The struct element
|
|
|
|
.Va fss_mount
|
|
|
|
is the mount point of the file system.
|
|
|
|
The struct element
|
|
|
|
.Va fss_bstore
|
|
|
|
is either a regular file or a raw disk device where data overwritten on
|
|
|
|
the file system will be saved.
|
|
|
|
The struct element
|
|
|
|
.Va fss_csize
|
|
|
|
is the preferred size of this data.
|
2003-12-11 20:00:16 +03:00
|
|
|
.It Dv FSSIOCGET(struct fss_get)
|
2003-12-10 14:40:11 +03:00
|
|
|
Gets the status of a
|
|
|
|
.Nm
|
|
|
|
device.
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
struct fss_get {
|
|
|
|
char fsg_mount[MNAMELEN];
|
|
|
|
struct timeval fsg_time;
|
|
|
|
blksize_t fsg_csize;
|
|
|
|
blkcnt_t fsg_mount_size;
|
|
|
|
blkcnt_t fsg_bs_size;
|
|
|
|
};
|
|
|
|
.Ed
|
|
|
|
The struct element
|
|
|
|
.Va fsg_mount
|
|
|
|
is the mount point of the file system.
|
|
|
|
The struct element
|
|
|
|
.Va fsg_time
|
|
|
|
is the time this snapshot was taken.
|
|
|
|
The struct element
|
|
|
|
.Va fsg_csize
|
|
|
|
is the current size of data clusters.
|
|
|
|
The struct element
|
|
|
|
.Va fsg_mount_size
|
|
|
|
is the number of clusters of the file system.
|
|
|
|
The struct element
|
|
|
|
.Va fsg_bs_size
|
|
|
|
is the number of clusters written to the backing store.
|
|
|
|
.It Dv FSSIOCCLR
|
|
|
|
Unconfigures a
|
2003-12-11 20:00:16 +03:00
|
|
|
.Nm
|
2003-12-10 14:40:11 +03:00
|
|
|
device.
|
|
|
|
.El
|
2004-01-11 22:05:26 +03:00
|
|
|
.Sh KERNEL THREADS
|
|
|
|
For each active snapshot device there is a kernel thread
|
|
|
|
that handles the backing store.
|
|
|
|
This thread is named
|
|
|
|
.Va fssbsN
|
|
|
|
where
|
|
|
|
.Va N
|
|
|
|
is the device minor number.
|
2003-12-10 14:40:11 +03:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /dev/rfss? -compact
|
|
|
|
.It Pa /dev/rfss?
|
|
|
|
.It Pa /dev/fss?
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2003-12-21 00:38:54 +03:00
|
|
|
.Xr fssconfig 8 ,
|
2003-12-10 14:40:11 +03:00
|
|
|
.Xr mount 8 ,
|
|
|
|
.Xr umount 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command appeared in
|
|
|
|
.Nx 2.0 .
|
|
|
|
.Sh BUGS
|
|
|
|
This driver is
|
|
|
|
.Em experimental .
|
|
|
|
Be sure you have a backup before you use it.
|