From owner-freebsd-questions@FreeBSD.ORG Thu Apr 12 08:26:53 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D97B416A401 for ; Thu, 12 Apr 2007 08:26:53 +0000 (UTC) (envelope-from toomas.aas@raad.tartu.ee) Received: from kuller.raad.tartu.ee (kuller.raad.tartu.ee [194.126.106.100]) by mx1.freebsd.org (Postfix) with ESMTP id 95A7213C455 for ; Thu, 12 Apr 2007 08:26:53 +0000 (UTC) (envelope-from toomas.aas@raad.tartu.ee) Received: from localhost (localhost [127.0.0.1]) by kuller.raad.tartu.ee (Postfix) with ESMTP id 4C0E5B826; Thu, 12 Apr 2007 11:26:52 +0300 (EEST) X-Virus-Scanned: amavisd-new at post.raad.tartu.ee Received: from kuller.raad.tartu.ee ([127.0.0.1]) by localhost (kuller.raad.tartu.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L-ofusEIDzcs; Thu, 12 Apr 2007 11:26:49 +0300 (EEST) Received: from raad.tartu.ee (lv.raad.tartu.ee [194.126.106.110]) by kuller.raad.tartu.ee (Postfix) with ESMTP id 712EFB812; Thu, 12 Apr 2007 11:26:49 +0300 (EEST) Received: from INFO/SpoolDir by raad.tartu.ee (Mercury 1.48); 12 Apr 07 11:26:49 +0300 Received: from SpoolDir by INFO (Mercury 1.48); 12 Apr 07 11:26:38 +0300 Received: from [172.26.1.3] (172.26.1.3) by raad.tartu.ee (Mercury 1.48) with ESMTP; 12 Apr 07 11:26:24 +0300 Message-ID: <461DED2F.9060001@raad.tartu.ee> Date: Thu, 12 Apr 2007 11:26:23 +0300 From: Toomas Aas User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: "illoai@gmail.com" References: <461C81F1.4030208@raad.tartu.ee> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: gmirror device numbers X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2007 08:26:53 -0000 illoai@gmail.com wrote: > On 11/04/07, Toomas Aas wrote: >> It seems that gmirror devices get a different 'device number' on each >> boot >> (each time the gmirror is created). Since the device number is stored in >> GNU tar's snapshot file, it effectively means that after rebooting GNU >> tar >> sees all files as having been changed since previous backup. This causes >> huge incremental backups. >> >> Is there a way to force a gmirror device to have a 'fixed' device number? > > Not to sound too thick, but what do you mean > by "device number"? Is this the Geom name: > or ID: field when you type: > gmirror list First, I may have to take back some of what I said. I've rebooted the server twice in last two days, and the results are different. First time, the server actually lost power accidentally (faulty UPS) and the gmirror volume was rebuilt. The device numbers had changed after that. Second time I rebooted the server myself (gmirror remained healthy), and device numbers remained unchanged. Now to your question. By "device number" I mean the numbers 81, 83, 84 etc as displayed here: # ls -l /dev/mirror/gm0* crw-r----- 1 root operator 0, 81 Apr 11 18:18 /dev/mirror/gm0 crw-r----- 1 root operator 0, 83 Apr 11 18:18 /dev/mirror/gm0s1 crw-r----- 1 root operator 0, 84 Apr 11 18:18 /dev/mirror/gm0s1a crw-r----- 1 root operator 0, 85 Apr 11 18:18 /dev/mirror/gm0s1b crw-r----- 1 root operator 0, 86 Apr 11 18:18 /dev/mirror/gm0s1c crw-r----- 1 root operator 0, 87 Apr 11 18:18 /dev/mirror/gm0s1d crw-r----- 1 root operator 0, 88 Apr 11 18:18 /dev/mirror/gm0s1e crw-r----- 1 root operator 0, 89 Apr 11 18:18 /dev/mirror/gm0s1f crw-r----- 1 root operator 0, 90 Apr 11 18:18 /dev/mirror/gm0s1g crw-r----- 1 root operator 0, 91 Apr 11 18:18 /dev/mirror/gm0s1h When, for example, the / filesystem that resides on /dev/mirror/gm0s1a is backed up with GNU tar 1.15.1 and a snapshot file is created (using --listed-incremental), the snapshot file contains lines such as: 84 4165 ./etc/bluetooth 84 22 ./root/.cpan/sources/authors/id 84 12486 ./media 84 8323 ./boot 84 169 ./root/.cpan/build/Tree-R-0.05/blib/arch 84 4169 ./etc/mtree The first number here is device number. If this number changes, GNU tar considers all files as having been changed next time it is run, and as a result the incremental backup backs up all files. -- Toomas Aas