From owner-freebsd-geom@FreeBSD.ORG Sun Jan 28 21:53:56 2007 Return-Path: X-Original-To: freebsd-geom@FreeBSD.ORG Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54F9116A506 for ; Sun, 28 Jan 2007 21:53:56 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: from web30305.mail.mud.yahoo.com (web30305.mail.mud.yahoo.com [209.191.69.67]) by mx1.freebsd.org (Postfix) with SMTP id 2762713C478 for ; Sun, 28 Jan 2007 21:53:56 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: (qmail 25209 invoked by uid 60001); 28 Jan 2007 21:53:55 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WSC4/QQDKyDI5cg/avg8viWvG8MLydRYSiIGHuV+haSUkMRbmZBx5RS0AOqet2OncZn88EZZqwulz9kl5vCeiO5YDlszgRCaJz1LUQ+xnVLZVbg+vozl3XYpiipJOmOEbbOGWyfim/lWsyIQVyNW7IyrnQOynE9ymkWtdEw4Kxw= ; Message-ID: <20070128215355.25207.qmail@web30305.mail.mud.yahoo.com> X-YMail-OSG: qSM3MwQVM1k_B_axK4bkiwwbpAuNOdo6n7mXnrHvdf6Bub4ZdZ5DfK25jbYbF3vBLGDSNJrxkA_oS.lxHaXamy_oVGvbepAcJRMLb9OAVioQdEc08mY- Received: from [213.54.174.136] by web30305.mail.mud.yahoo.com via HTTP; Sun, 28 Jan 2007 13:53:55 PST Date: Sun, 28 Jan 2007 13:53:55 -0800 (PST) From: "R. B. Riddick" To: Hansa , freebsd geom In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: RE: How do I gmirror slices? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jan 2007 21:53:56 -0000 before u go on further, I would like to advise u to do a backup ur data... u should try to understand first, what the commands do (try "man cpio" for example)... Then u should do some exercises in a sub directory (like /tmp/blubber) until u feel like u understood it sufficiently... --- Hansa wrote: > > > # /dev/ad4s1: > > > 8 partitions: > > > # size offset fstype [fsize bsize bps/cpg] > > > a: 4192256 0 4.2BSD 0 0 0 > > > b: 4192256 4192256 swap > > > c: 12578832 0 unused 0 0 # "raw" part, > don't edit > > > d: 4194320 8384512 4.2BSD 0 0 0 > > > > > Here we see, that d ends on the last sector of slice 1 (s1). > > So u need to shrink partition d by one sector. > > Since UFS might use that sector, u need an all new file system > > for partition > > d... > How do you determine that it's on the last sector? > 4194320+8384512 = 12578832 ==> d ends on the last sector > > Maybe u want to it like this: > > 1. fdisk ur new disk first > Should I create the the new disk (ad6) slice size exactly as on ad4? > I dont know... If u want to change the file system sizes: Now is the right moment... But if u change it, u have to change it on ad4, too... > Hmm.. I'm already stuck at 1. Since I've never done this before, can you > help me on my way by specifying the correct commands? Here's what I've come > up with so far: > 1. Using fdisk in /stand/sysinstall presuming same slice size as ad4. > OK > 2. # gmirror label -v -b round-robin gm0 /dev/ad6s1 > # gmirror label -v -b round-robin gm0 /dev/ad6s2 > looks good > 3. # dd if=/dev/ad4s3d of=/mnt/netwshare/ad4s3d.backup > looks not good, because: (aa) dd uses a default block size of 512 bytes, so that it does many requests... Better would be bs=1m or so... (bb) u should use "cd /oldhome ; find . | cpio -o > /mnt/netwshare/old-home.cpio" and later "cd /newhome ; cpio -i --preserve-modification-time . < /mnt/netwshare/old-home.cpio" > 4. Have not dug into that yet. > OK - can wait... > 5. I guess you mean copying ad4s1a, ad4s1b, ad4s1d and ad4s2d to te > gmirror-ed. Can I use dd for that? > first u should go to single user mode and mount those old file systems read-only: (aa) single-user (CAVE: 100% service interruption): "kill 1" (bb) mount -r / (cc) mount -r /dev/ad4s1d (dd) mount -r /dev/ad4s2d (ee) u dont need to copy the swap partition... (ff) newfs /dev/mirror/root (gg) mount /dev/mirror/root /mnt (hh) cd / ; find . | egrep -v "^\./(usr|var|mnt)/" | cpio -p --perserve-modification-time /mnt (ii) for /usr and /var(?) similar... > 6. dd or tar the backup on the stripe > i would use cpio > 7. Eh.. > gmirror insert root ad4s1a ... > 8. ... > ;-) -Arne ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091