2008-04-30 17:10:46 +04:00
|
|
|
.\" $NetBSD: fssconfig.8,v 1.7 2008/04/30 13:11:02 martin 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.
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
2005-02-01 16:39:43 +03:00
|
|
|
.Dd January 31, 2005
|
2003-12-10 14:40:11 +03:00
|
|
|
.Dt FSSCONFIG 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm fssconfig
|
|
|
|
.Nd configure file system snapshot devices
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2004-05-25 18:54:55 +04:00
|
|
|
.Op Fl cxv
|
2003-12-10 14:40:11 +03:00
|
|
|
.Ar device
|
|
|
|
.Ar path
|
|
|
|
.Ar backup
|
|
|
|
.Op Ar cluster Op Ar size
|
|
|
|
.Nm
|
2004-05-25 18:54:55 +04:00
|
|
|
.Fl u Op Fl v
|
2003-12-10 14:40:11 +03:00
|
|
|
.Ar device
|
|
|
|
.Nm
|
|
|
|
.Fl l Op Fl v
|
|
|
|
.Op Ar device
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command configures file system snapshot pseudo disk devices.
|
|
|
|
It will associate the file system snapshot disk
|
|
|
|
.Ar device
|
|
|
|
with a snapshot of
|
2003-12-11 20:12:11 +03:00
|
|
|
.Ar path
|
2003-12-10 14:40:11 +03:00
|
|
|
allowing the latter to be accessed as though it were a disk.
|
2005-02-01 01:08:55 +03:00
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Ar backup
|
|
|
|
resides on the snapshotted file system a persistent snapshot will be created.
|
|
|
|
This snapshot is active until
|
|
|
|
.Ar backup
|
|
|
|
is unlinked.
|
|
|
|
This snapshot mode is only supported for ffs files systems.
|
|
|
|
.Pp
|
|
|
|
Otherwise data written through the
|
2003-12-10 14:40:11 +03:00
|
|
|
.Ar path
|
|
|
|
will be saved in
|
2005-02-01 01:08:55 +03:00
|
|
|
.Ar backup .
|
2003-12-10 14:40:11 +03:00
|
|
|
If
|
|
|
|
.Ar backup
|
|
|
|
is a regular file, it will be created with length
|
|
|
|
.Ar size .
|
2004-01-11 22:05:26 +03:00
|
|
|
Default size is the size of
|
2003-12-10 14:40:11 +03:00
|
|
|
.Ar path .
|
|
|
|
Data is saved to
|
|
|
|
.Ar backup
|
|
|
|
in units of
|
|
|
|
.Ar cluster
|
|
|
|
bytes.
|
|
|
|
.Pp
|
|
|
|
Options indicate an action to be performed:
|
2003-12-11 20:12:11 +03:00
|
|
|
.Bl -tag -width 3n
|
2003-12-10 14:40:11 +03:00
|
|
|
.It Fl c
|
|
|
|
Configures the device.
|
|
|
|
If successful, references to
|
|
|
|
.Ar device
|
|
|
|
will access the contents of
|
|
|
|
.Ar path
|
|
|
|
at the time the snapshot was taken.
|
|
|
|
If
|
|
|
|
.Ar backup
|
2003-12-11 20:12:11 +03:00
|
|
|
is a directory, a temporary file will be created in this directory.
|
2003-12-10 14:40:11 +03:00
|
|
|
This file will be unlinked on exit.
|
|
|
|
.It Fl l
|
|
|
|
List the snapshot devices and indicate which ones are in use.
|
|
|
|
If a specific
|
|
|
|
.Ar device
|
|
|
|
is given, then only that will be described.
|
|
|
|
.It Fl u
|
|
|
|
Unconfigures the
|
|
|
|
.Ar device .
|
|
|
|
.It Fl v
|
|
|
|
Be more verbose listing the snapshot devices.
|
|
|
|
.It Fl x
|
|
|
|
Unlink
|
|
|
|
.Ar backup
|
|
|
|
after the
|
|
|
|
.Ar device
|
|
|
|
is configured.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
If no action option is given,
|
|
|
|
.Fl c
|
|
|
|
is assumed.
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /etc/disktab -compact
|
|
|
|
.It Pa /dev/rfss?
|
|
|
|
.It Pa /dev/fss?
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
.Dl fssconfig fss0 /usr /tmp/back
|
|
|
|
.Pp
|
|
|
|
Configures the snapshot device
|
|
|
|
.Pa fss0
|
|
|
|
for a snapshot of the
|
|
|
|
.Pa /usr
|
2003-12-11 20:12:11 +03:00
|
|
|
file system.
|
|
|
|
Data written through
|
2003-12-10 14:40:11 +03:00
|
|
|
.Pa /usr
|
|
|
|
will be backed up in
|
|
|
|
.Pa /tmp/back .
|
|
|
|
.Pp
|
|
|
|
.Dl fssconfig fss1 / /dev/rsd0e 8192
|
|
|
|
.Pp
|
|
|
|
Configures the snapshot device
|
|
|
|
.Pa fss1
|
|
|
|
for a snapshot of the
|
|
|
|
.Pa /
|
2003-12-11 20:12:11 +03:00
|
|
|
file system.
|
|
|
|
Data written through
|
2003-12-10 14:40:11 +03:00
|
|
|
.Pa /
|
|
|
|
will be backed up in
|
|
|
|
.Pa /dev/rsd0e .
|
|
|
|
The backup will take place in units of 8192 bytes.
|
|
|
|
.Pp
|
|
|
|
.Dl fssconfig -u fss0
|
|
|
|
.Pp
|
|
|
|
Unconfigures the
|
|
|
|
.Pa fss0
|
|
|
|
device.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr opendisk 3 ,
|
|
|
|
.Xr fss 4 ,
|
|
|
|
.Xr mount 8 ,
|
|
|
|
.Xr umount 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command appeared in
|
|
|
|
.Nx 2.0 .
|
|
|
|
.Sh BUGS
|
|
|
|
The
|
|
|
|
.Xr fss 4
|
|
|
|
driver is
|
|
|
|
.Em experimental .
|
|
|
|
Be sure you have a backup before you use it.
|