1*b3610864Spgoyette.\" $NetBSD: fssconfig.8,v 1.12 2016/07/29 05:20:33 pgoyette Exp $ */ 2fbae381aShannken.\" 3fbae381aShannken.\" 4fbae381aShannken.\" Copyright (c) 2003 The NetBSD Foundation, Inc. 5fbae381aShannken.\" All rights reserved. 6fbae381aShannken.\" 7fbae381aShannken.\" This code is derived from software contributed to The NetBSD Foundation 8fbae381aShannken.\" by Juergen Hannken-Illjes. 9fbae381aShannken.\" 10fbae381aShannken.\" Redistribution and use in source and binary forms, with or without 11fbae381aShannken.\" modification, are permitted provided that the following conditions 12fbae381aShannken.\" are met: 13fbae381aShannken.\" 1. Redistributions of source code must retain the above copyright 14fbae381aShannken.\" notice, this list of conditions and the following disclaimer. 15fbae381aShannken.\" 2. Redistributions in binary form must reproduce the above copyright 16fbae381aShannken.\" notice, this list of conditions and the following disclaimer in the 17fbae381aShannken.\" documentation and/or other materials provided with the distribution. 18fbae381aShannken.\" 19fbae381aShannken.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20fbae381aShannken.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21fbae381aShannken.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22fbae381aShannken.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23fbae381aShannken.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24fbae381aShannken.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25fbae381aShannken.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26fbae381aShannken.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27fbae381aShannken.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28fbae381aShannken.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29fbae381aShannken.\" POSSIBILITY OF SUCH DAMAGE. 30fbae381aShannken.\" 31*b3610864Spgoyette.Dd July 29, 2016 32fbae381aShannken.Dt FSSCONFIG 8 33fbae381aShannken.Os 34fbae381aShannken.Sh NAME 35fbae381aShannken.Nm fssconfig 36fbae381aShannken.Nd configure file system snapshot devices 37fbae381aShannken.Sh SYNOPSIS 38fbae381aShannken.Nm 398c21bc62Shannken.Op Fl cxv 40fbae381aShannken.Ar device 41fbae381aShannken.Ar path 42fbae381aShannken.Ar backup 43fbae381aShannken.Op Ar cluster Op Ar size 44fbae381aShannken.Nm 458c21bc62Shannken.Fl u Op Fl v 46fbae381aShannken.Ar device 47fbae381aShannken.Nm 48fbae381aShannken.Fl l Op Fl v 49fbae381aShannken.Op Ar device 50fbae381aShannken.Sh DESCRIPTION 51fbae381aShannkenThe 52fbae381aShannken.Nm 53fbae381aShannkencommand configures file system snapshot pseudo disk devices. 54fbae381aShannkenIt will associate the file system snapshot disk 55fbae381aShannken.Ar device 56*b3610864Spgoyettewith a snapshot of the file system mounted on 57*b3610864Spgoyette.Ar path , 58*b3610864Spgoyetteallowing 59*b3610864Spgoyette.Ar device 60*b3610864Spgoyetteto be accessed as though it were a disk. 61372dee1aShannken.Pp 62372dee1aShannkenIf 63372dee1aShannken.Ar backup 64372dee1aShannkenresides on the snapshotted file system a persistent snapshot will be created. 65372dee1aShannkenThis snapshot is active until 66372dee1aShannken.Ar backup 67372dee1aShannkenis unlinked. 6830f40cbbShannkenPersistent snapshots save the file system as if it had been unmounted. 6930f40cbbShannkenUnlinked but open files get removed from the snapshot. 70*b3610864SpgoyetteThe time needed to create a persistent snapshot increases with the size of the 7130f40cbbShannkenfile system and decreases with the file system block size. 720c848d03SwizThis snapshot mode is only supported for FFS file systems. 73372dee1aShannken.Pp 74372dee1aShannkenOtherwise data written through the 75fbae381aShannken.Ar path 76fbae381aShannkenwill be saved in 77372dee1aShannken.Ar backup . 78fbae381aShannkenIf 79fbae381aShannken.Ar backup 80fbae381aShannkenis a regular file, it will be created with length 81fbae381aShannken.Ar size . 82067a3b89ShannkenDefault size is the size of 83fbae381aShannken.Ar path . 84fbae381aShannkenData is saved to 85fbae381aShannken.Ar backup 86fbae381aShannkenin units of 87fbae381aShannken.Ar cluster 88fbae381aShannkenbytes. 89*b3610864SpgoyetteThe snapshot is an image of the underlying block device at a moment in time. 9030f40cbbShannkenUnlinked but open files are still present on the snapshot. 91*b3610864SpgoyetteThe time needed to create a snapshot is independent of the size of the 9230f40cbbShannkenfile system or the file system block size. 93fbae381aShannken.Pp 94fbae381aShannkenOptions indicate an action to be performed: 9568c32a13Swiz.Bl -tag -width 3n 96fbae381aShannken.It Fl c 97fbae381aShannkenConfigures the device. 98fbae381aShannkenIf successful, references to 99fbae381aShannken.Ar device 100fbae381aShannkenwill access the contents of 101fbae381aShannken.Ar path 102fbae381aShannkenat the time the snapshot was taken. 103fbae381aShannkenIf 104fbae381aShannken.Ar backup 10568c32a13Swizis a directory, a temporary file will be created in this directory. 106fbae381aShannkenThis file will be unlinked on exit. 107fbae381aShannken.It Fl l 108fbae381aShannkenList the snapshot devices and indicate which ones are in use. 109fbae381aShannkenIf a specific 110fbae381aShannken.Ar device 111fbae381aShannkenis given, then only that will be described. 112fbae381aShannken.It Fl u 113fbae381aShannkenUnconfigures the 114fbae381aShannken.Ar device . 115fbae381aShannken.It Fl v 116fbae381aShannkenBe more verbose listing the snapshot devices. 117fbae381aShannken.It Fl x 118fbae381aShannkenUnlink 119fbae381aShannken.Ar backup 120fbae381aShannkenafter the 121fbae381aShannken.Ar device 122fbae381aShannkenis configured. 123fbae381aShannken.El 124fbae381aShannken.Pp 125fbae381aShannkenIf no action option is given, 126fbae381aShannken.Fl c 127fbae381aShannkenis assumed. 128fbae381aShannken.Sh FILES 129fbae381aShannken.Bl -tag -width /etc/disktab -compact 130fbae381aShannken.It Pa /dev/rfss? 131fbae381aShannken.It Pa /dev/fss? 132fbae381aShannken.El 133fbae381aShannken.Sh EXAMPLES 134fbae381aShannken.Dl fssconfig fss0 /usr /tmp/back 135*b3610864Spgoyette.Dl mount /dev/fss0 /mnt 136fbae381aShannken.Pp 137fbae381aShannkenConfigures the snapshot device 138fbae381aShannken.Pa fss0 139*b3610864Spgoyetteas a snapshot of the 140fbae381aShannken.Pa /usr 141*b3610864Spgoyettefile system, and makes the contents of the snapshot available via 142*b3610864Spgoyette.Pa /mnt . 14368c32a13SwizData written through 144fbae381aShannken.Pa /usr 145fbae381aShannkenwill be backed up in 146fbae381aShannken.Pa /tmp/back . 147fbae381aShannken.Pp 148fbae381aShannken.Dl fssconfig fss1 / /dev/rsd0e 8192 149fbae381aShannken.Pp 150fbae381aShannkenConfigures the snapshot device 151fbae381aShannken.Pa fss1 152*b3610864Spgoyetteas a snapshot of the 153fbae381aShannken.Pa / 15468c32a13Swizfile system. 15568c32a13SwizData written through 156fbae381aShannken.Pa / 157fbae381aShannkenwill be backed up in 158fbae381aShannken.Pa /dev/rsd0e . 159fbae381aShannkenThe backup will take place in units of 8192 bytes. 160fbae381aShannken.Pp 161fbae381aShannken.Dl fssconfig -u fss0 162fbae381aShannken.Pp 163fbae381aShannkenUnconfigures the 164fbae381aShannken.Pa fss0 165fbae381aShannkendevice. 166fbae381aShannken.Sh SEE ALSO 167fbae381aShannken.Xr opendisk 3 , 168fbae381aShannken.Xr fss 4 , 169*b3610864Spgoyette.Xr dump 8 , 170fbae381aShannken.Xr mount 8 , 171fbae381aShannken.Xr umount 8 172fbae381aShannken.Sh HISTORY 173fbae381aShannkenThe 174fbae381aShannken.Nm 175fbae381aShannkencommand appeared in 176fbae381aShannken.Nx 2.0 . 177