Date: Sun, 28 Jan 2007 13:53:55 -0800 (PST) From: "R. B. Riddick" <arne_woerner@yahoo.com> To: Hansa <mythtv@logic-q.nl>, freebsd geom <freebsd-geom@FreeBSD.ORG> Subject: RE: How do I gmirror slices? Message-ID: <20070128215355.25207.qmail@web30305.mail.mud.yahoo.com> In-Reply-To: <LHEFLGAENILPPDJIHADOCEIKCFAA.mythtv@logic-q.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <mythtv@logic-q.nl> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070128215355.25207.qmail>