Ashley Moran <[EMAIL PROTECTED]> 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 - [EMAIL PROTECTED]
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to