From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 7 14:47:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1463616A420 for ; Tue, 7 Mar 2006 14:47:03 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92D1443D46 for ; Tue, 7 Mar 2006 14:47:02 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id D71DE2081; Tue, 7 Mar 2006 15:46:56 +0100 (CET) X-Spam-Tests: AWL,BAYES_00,FORGED_RCVD_HELO X-Spam-Learn: ham X-Spam-Score: -2.4/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id C84302080; Tue, 7 Mar 2006 15:46:56 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id B573A33C31; Tue, 7 Mar 2006 15:46:56 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Ashley Moran References: <200603071255.10729.work@ashleymoran.me.uk> Date: Tue, 07 Mar 2006 15:46:56 +0100 In-Reply-To: <200603071255.10729.work@ashleymoran.me.uk> (Ashley Moran's message of "Tue, 7 Mar 2006 12:55:10 +0000") Message-ID: <86ek1eia73.fsf@xps.des.no> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: NetBSD disk backup over network X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 14:47:03 -0000 Ashley Moran writes: > I just saw this slashdotted article: > http://ezine.daemonnews.org/200603/dermouse.html > > Just to satisfy my curiosity, is it the sort of thing that can be > implemented as a GEOM layer? The idea is bloody clever but sounds > like a bit of a hack right now. Set up ggated on the "backup server": # truncate -s16G /backup/foo.img (assuming the size of the disk you want to mirror is 16 GB) # echo "foo RW /backup/foo.img" >/etc/gg.exports where foo is the name or IP address of the client. start ggated: # ggated /etc/gg.exports start ggatec on the client: # ggatec create bar /backup/foo.img where bar is the name or IP address of the server. now you can create a mirror on the client: # gmirror load # gmirror label -b prefer baz /dev/ggate0 # gmirror insert -p 1000 baz /dev/whatever # newfs -U /dev/mirror/baz # mount -t ufs /dev/mirror/baz /mnt (baz can be any name you want to give your mirror) if /dev/whatever on the client dies, you can simply mdconfig /backup/foo.img on the server and mount it to extract data. If you take care not to modify it, you can easily restore the volume on the client: # ggatec create bar /backup/foo.img # gmirror load # gmirror forget baz # gmirror insert -p 1000 baz /dev/whatever gmirror will immediately start resynchronizing the mirror; you can follow its progress with 'gmirror status'. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no