From des@des.no Tue Mar 7 17:52:26 2006 Date: Tue, 07 Mar 2006 15:46:56 +0100 From: "Dag-Erling [iso-8859-1] Sm?rgrav" To: Ashley Moran Cc: freebsd-hackers@freebsd.org Subject: Re: NetBSD disk backup over network [ The following text is in the "iso-8859-1" character set. ] [ Your display is set for the "KOI8-R" character set. ] [ Some special characters may be displayed incorrectly. ] 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 -- Dag-Erling Sm?rgrav - des@des.no _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"