From owner-freebsd-questions@FreeBSD.ORG Sat Dec 6 23:03:15 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9063A106564A for ; Sat, 6 Dec 2008 23:03:15 +0000 (UTC) (envelope-from doug@polands.org) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.124]) by mx1.freebsd.org (Postfix) with ESMTP id 5146B8FC14 for ; Sat, 6 Dec 2008 23:03:15 +0000 (UTC) (envelope-from doug@polands.org) Received: from haran.polands.org ([75.87.219.217]) by hrndva-omta04.mail.rr.com with ESMTP id <20081206223234.DCFN18207.hrndva-omta04.mail.rr.com@haran.polands.org> for ; Sat, 6 Dec 2008 22:32:34 +0000 Received: from jericho.polands.org (jericho.polands.org [172.16.1.33]) by haran.polands.org (8.14.2/8.14.2) with ESMTP id mB6MWXnX095660 for ; Sat, 6 Dec 2008 16:32:33 -0600 (CST) (envelope-from doug@polands.org) Message-ID: <493AFD81.6020705@polands.org> Date: Sat, 06 Dec 2008 16:32:33 -0600 From: Doug Poland User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Backup complete gmirror/gstripe/gjournal drives, how-to? 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: Sat, 06 Dec 2008 23:03:15 -0000 Hello, I've got a 7.1-PRERELEASE i386 box with 4 SATA drives configured in a RAID-10 using gmirror, gstripe, and gjournal. Normally, I use dump and rsync for periodic backups on this machine, but I suspect that the gmirror/gstripe/gjournal information is not being backed up. If my assumption is correct, how can I perform a "one-time" backup such that I could do a bare-metal restore? The essence of the question being I want to preserve not only the data, but also the gmirror/gstripe/gjournal meta-data as well. The only thought that comes to mind is to boot with a 7.1 live filesystem CD-ROM and "dd" each drive, piping the results to my backup machine. e.g., host# dd if=/dev/ad4 bs=2m | gzip | nc backuphost 12345 host# dd if=/dev/ad6 bs=2m | gzip | nc backuphost 12346 host# dd if=/dev/ad10 bs=2m | gzip | nc backuphost 12347 host# dd if=/dev/ad12 bs=2m | gzip | nc backuphost 12348 Any thoughts, suggestions, caveats? -- Regards, Doug P.S. Here are the geom and fdisk details, if that helps... host# gmirror list Geom name: root State: COMPLETE Components: 4 Balance: load Slice: 4096 Flags: NONE GenID: 0 SyncID: 5 ID: 127818465 Providers: 1. Name: mirror/root Mediasize: 1068802048 (1.0G) Sectorsize: 512 Mode: r1w1e2 Consumers: 1. Name: ad4s1 Mediasize: 1069254144 (1.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: NONE GenID: 0 SyncID: 5 ID: 3738169247 2. Name: ad6s1 Mediasize: 1069254144 (1.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: NONE GenID: 0 SyncID: 5 ID: 3845503692 3. Name: ad10s1 Mediasize: 1069254144 (1.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: NONE GenID: 0 SyncID: 5 ID: 4161988509 4. Name: ad12s1 Mediasize: 1069254144 (1.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: NONE GenID: 0 SyncID: 5 ID: 2277790192 Geom name: duplex0 State: COMPLETE Components: 2 Balance: load Slice: 4096 Flags: NONE GenID: 1 SyncID: 2 ID: 2584379190 Providers: 1. Name: mirror/duplex0 Mediasize: 154676389888 (144G) Sectorsize: 512 Mode: r1w1e2 Consumers: 1. Name: ad4s3 Mediasize: 154676390400 (144G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: DIRTY GenID: 1 SyncID: 2 ID: 1342354069 2. Name: ad10s3 Mediasize: 154676390400 (144G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: DIRTY GenID: 1 SyncID: 2 ID: 985541614 Geom name: duplex1 State: COMPLETE Components: 2 Balance: load Slice: 4096 Flags: NONE GenID: 1 SyncID: 3 ID: 1552757394 Providers: 1. Name: mirror/duplex1 Mediasize: 154676389888 (144G) Sectorsize: 512 Mode: r1w1e2 Consumers: 1. Name: ad6s3 Mediasize: 154676390400 (144G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: DIRTY GenID: 1 SyncID: 3 ID: 429168325 2. Name: ad12s3 Mediasize: 154676390400 (144G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: DIRTY GenID: 1 SyncID: 3 ID: 1587593952 host# gstripe list Geom name: raid10 State: UP Status: Total=2, Online=2 Type: AUTOMATIC Stripesize: 262144 ID: 4114245491 Providers: 1. Name: stripe/raid10 Mediasize: 309352464384 (288G) Sectorsize: 512 Mode: r1w1e1 Consumers: 1. Name: mirror/duplex0 Mediasize: 154676389888 (144G) Sectorsize: 512 Mode: r1w1e2 Number: 0 2. Name: mirror/duplex1 Mediasize: 154676389888 (144G) Sectorsize: 512 Mode: r1w1e2 Number: 1 host# gjournal list Geom name: gjournal 2147944994 ID: 2147944994 Providers: 1. Name: stripe/raid10.journal Mediasize: 308278722048 (287G) Sectorsize: 512 Mode: r1w1e1 Consumers: 1. Name: stripe/raid10 Mediasize: 309352464384 (288G) Sectorsize: 512 Mode: r1w1e1 Jend: 309352463872 Jstart: 308278722048 Role: Data,Journal host# fdisk ad{4,6,10,12} ******* Working on device /dev/ad4 ******* parameters extracted from in-core disklabel are: cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 2088387 (1019 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 129/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 2088450, size 8385930 (4094 Meg), flag 0 beg: cyl 130/ head 0/ sector 1; end: cyl 651/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 10474380, size 302102325 (147510 Meg), flag 0 beg: cyl 652/ head 0/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 4 is: