From owner-freebsd-doc@FreeBSD.ORG Thu Jun 19 09:00:34 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0E0237B407 for ; Thu, 19 Jun 2003 09:00:34 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1063043FBD for ; Thu, 19 Jun 2003 09:00:32 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h5JG0VUp088131 for ; Thu, 19 Jun 2003 09:00:31 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h5JG0VfP088130; Thu, 19 Jun 2003 09:00:31 -0700 (PDT) Resent-Date: Thu, 19 Jun 2003 09:00:31 -0700 (PDT) Resent-Message-Id: <200306191600.h5JG0VfP088130@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lukas Ertl Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35C4537B401 for ; Thu, 19 Jun 2003 08:51:04 -0700 (PDT) Received: from mailbox.univie.ac.at (mailbox.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAA6143F93 for ; Thu, 19 Jun 2003 08:51:02 -0700 (PDT) (envelope-from le@univie.ac.at) Received: from korben.in.tern (adslle.cc.univie.ac.at [131.130.102.11]) by mailbox.univie.ac.at (8.12.2/8.12.2) with ESMTP id h5JFooM7194616 for ; Thu, 19 Jun 2003 17:50:54 +0200 Received: from korben.in.tern (korben.in.tern [127.0.0.1]) by korben.in.tern (8.12.9/8.12.9) with ESMTP id h5JFoks5081509 for ; Thu, 19 Jun 2003 17:50:47 +0200 (CEST) (envelope-from le@korben.in.tern) Received: (from le@localhost) by korben.in.tern (8.12.9/8.12.9/Submit) id h5JFoklE081508; Thu, 19 Jun 2003 17:50:46 +0200 (CEST) (envelope-from le) Message-Id: <200306191550.h5JFoklE081508@korben.in.tern> Date: Thu, 19 Jun 2003 17:50:46 +0200 (CEST) From: Lukas Ertl To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/53501: [PATCH] Handbook: update snapshots section of disks chapter X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Lukas Ertl List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2003 16:00:35 -0000 >Number: 53501 >Category: docs >Synopsis: [PATCH] Handbook: update snapshots section of disks chapter >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 19 09:00:31 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Lukas Ertl >Release: FreeBSD 5.1-CURRENT i386 >Organization: Vienna University Computer Center >Environment: System: FreeBSD korben 5.1-CURRENT FreeBSD 5.1-CURRENT #14: Wed Jun 18 20:24:25 CEST 2003 le@korben:/usr/obj/usr/src/sys/KORBEN i386 >Description: >How-To-Repeat: >Fix: This patch removes some redundancies and adds a remark of mksnap_ffs(8). --- disks.diff begins here --- Index: disks/chapter.sgml =================================================================== RCS file: /usr/local/bsdcvs/doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml,v retrieving revision 1.177 diff -u -r1.177 chapter.sgml --- disks/chapter.sgml 15 Jun 2003 09:53:45 -0000 1.177 +++ disks/chapter.sgml 19 Jun 2003 15:46:24 -0000 @@ -2524,38 +2524,45 @@ Soft Updates: File system snapshots. Snapshots allow a user to create images of specified file - systems, and treat them as a file. - Snapshot files must be created in the file system that the - action is performed on, and a user may create no more than 20 - snapshots per file system. Active snapshots are recorded - in the superblock so they are persistent across unmount and - remount operations along with system reboots. When a snapshot - is no longer required, it can be removed with the standard &man.rm.1; - command. Snapshots may be removed in any order, - however all the used space may not be acquired because another snapshot will + systems, and treat them as a file. Snapshot files must be + created in the file system that the action is performed on, + and a user may create no more than 20 snapshots per file + system. Active snapshots are recorded in the superblock so + they are persistent across unmount and remount operations + along with system reboots. When a snapshot is no longer + required, it can be removed with standard &man.rm.1;. + Snapshots may be removed in any order, however all the used + space may not be acquired because another snapshot will possibly claim some of the released blocks. - During initial creation, the flag (see the &man.chflags.1; manual page) - is set to ensure that even root cannot write to the snapshot. - The &man.unlink.1; command makes an exception for snapshot files - since it allows them to be removed - with the flag set, so it is not necessary to - clear the flag before removing a snapshot file. + During initial creation, the flag + (see &man.chflags.1;) is set to ensure that even + root cannot write to the snapshot. + &man.unlink.1; makes an exception for snapshot files since it + allows them to be removed with the flag + set, so it is not necessary to clear the + flag before removing a snapshot file. - Snapshots are created with the &man.mount.8; command. To place + Snapshots are created with &man.mount.8;. To place a snapshot of /var in the file /var/snapshot/snap use the following command: &prompt.root; mount -u -o snapshot /var/snapshot/snap /var - Once a snapshot has been created, they have several + Alternatively, you can use &man.mksnap.ffs.8; to create + the snapshot: + +&prompt.root; mksnap_ffs /var /var/snapshot/snap + + Once a snapshot has been created, it has several uses: - Some administrators will use a snapshot file for backup purposes, - because the snapshot can be transfered to CDs or tape. + Some administrators will use a snapshot file for + backup purposes, because the snapshot can be transfered to + CDs or tape. @@ -2576,8 +2583,8 @@ - &man.mount.8; the snapshot as a frozen image of the file system. - To &man.mount.8; the snapshot + Mount the snapshot as a frozen image of the file + system. To mount the snapshot /var/snapshot/snap run: &prompt.root; mdconfig -a -t vnode -f /var/snapshot/snap -u 4 @@ -2586,20 +2593,21 @@ - You can now walk the hierarchy of your frozen /var - file system mounted at /mnt. Everything will - be in the same state it was during the snapshot creation time. - The only exception is that any earlier snapshots will appear - as zero length files. When the use of a snapshot has delimited, - it can be unmounted with: + You can now walk the hierarchy of your frozen + /var file system mounted at + /mnt. Everything will be in the same + state it was during the snapshot creation time. The only + exception is that any earlier snapshots will appear as zero + length files. When the use of a snapshot has delimited, it + can be unmounted with: &prompt.root; umount /mnt &prompt.root; mdconfig -d -u 4 - For more information about and - file system snapshots, including technical papers, you can visit - Marshall Kirk McKusick's website at - http://www.mckusick.com. + For more information about + and file system snapshots, including technical papers, you can + visit Marshall Kirk McKusick's website at http://www.mckusick.com. --- disks.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: