From owner-freebsd-stable@FreeBSD.ORG Tue Jan 16 18:42:29 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EBA8916A47E for ; Tue, 16 Jan 2007 18:42:29 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id BEEE913C45D for ; Tue, 16 Jan 2007 18:42:29 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by mail.ambrisko.com with ESMTP; 16 Jan 2007 10:10:47 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.13.1/8.12.11) with ESMTP id l0GIDwwj052360; Tue, 16 Jan 2007 10:13:58 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.13.1/8.13.1/Submit) id l0GIDv78052359; Tue, 16 Jan 2007 10:13:57 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200701161813.l0GIDv78052359@ambrisko.com> In-Reply-To: <45A68F2E.6040205@scottevil.com> To: Scott Oertel Date: Tue, 16 Jan 2007 10:13:57 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: Willem Jan Withagen , freebsd-stable@freebsd.org, Kris Kennaway Subject: Re: running mksnap_ffs X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 18:42:30 -0000 Scott Oertel writes: | Kris Kennaway wrote: | > On Tue, Jan 02, 2007 at 09:06:24PM +0100, Willem Jan Withagen wrote: | > | >> Hi, | >> | >> I got the following Filesystem: | >> Filesystem Size Used Avail Capacity iused ifree %iused | >> /dev/da0a 1.3T 422G 823G 34% 565952 182833470 0% | >> | >> Running of a 3ware 9550, on a dual core Opteron 242 with 1Gb. | >> The system is used as SMB/NFS server for my other systems here. | >> | >> I would like to make weekly snapshots, but manually running mksnap_ffs | >> freezes access to the disk (I sort of expected that) but the process | >> never terminates. So I let is sit overnight, but looking a gstat did not | >> reveil any activity what so ever... | >> The disk was not released, mksnap_ffs could not be terminated. | >> And things resulted in me rebooting the system. | >> | >> So: | >> - How long should I expect making a snapshot to take: | >> 5, 15, 30min, 1, 2 hour or even more??? | > | > Yes :) Snapshots were not designed for use in this way (they were | > designed to support background fsck and allow faster system recovery | > after power failure), so they don't scale as well as you might like on | > large filesystems. | | If snapshots were designed to support background fsck, then why did they | not make it more scalable? If you can't create a snapshot without the | system locking up, that means fsck won't be able to either, making | background fsck worthless for systems with large storage. FWIW, with this patch I find making snap-shots a lot more reliable: --- sys/ufs/ffs/ffs_snapshot.c.orig Wed Mar 22 09:42:31 2006 +++ sys/ufs/ffs/ffs_snapshot.c Mon Nov 20 14:59:13 2006 @@ -282,6 +282,8 @@ restart: if (error) goto out; bawrite(nbp); + if (cg % 10 == 0) + ffs_syncvnode(vp, MNT_WAIT); } /* * Copy all the cylinder group maps. Although the @@ -303,6 +305,8 @@ restart: goto out; error = cgaccount(cg, vp, nbp, 1); bawrite(nbp); + if (cg % 10 == 0) + ffs_syncvnode(vp, MNT_WAIT); if (error) goto out; } or things can get wedged. We have some other patches as well that might be required. As a hack on a local server we have been using snap shots to do a "hot" back-up of a data base each morning. This is based on 6.x. Doug A.