Date: Sat, 5 Feb 2005 13:57:05 -0600 From: Karl Denninger <karl@denninger.net> To: freebsd-geom@freebsd.org Subject: Gmirror - how to do? Message-ID: <20050205135705.A10437@denninger.net>
next in thread | raw e-mail | index | archive | help
Howdy; Another quickie someone may know how to handle. I've got a 2-drive RAID1 mirror I wish to back up. The easy way appears to be to attach a third drive, let it sync, detach it and then you have a backup, right? So I do the following: atacontrol attach 2 (attach new disk on external adapter) gmirror insert boot ad4s1 (insert the backup into the existing mirror) wait (while the disk synchronizes - 3-4 hours) gmirror remove boot ad4s1 (remove third copy from mirror) atacontrol detach 2 (remove device from the system) Now I can go pull the carrier "cleanly". Except for one small problem - when you do this, then try to boot the backup volume it fails, because gmirror has marked the metadata as "do not use" when you removed it, yet the /etc/fstab entries all point to a mirror that isn't there. So... how do you accomplish this? Detach the BUS underlying the drive without warning gmirror first (e.g. "atacontrol detach 2", without the preceding "gmirror remove"), thereby forcing a "dirty" disconnect? I'd rather not, although if I must, that I suppose would work. However, if I do this, then gmirror thinks I have a third volume present, and as a consequence as soon I re-init that channel and geom sees the disk it will immediately begin a rebuild (whether this is bad or not I suppose is a matter of interpretation) The bad part of doing it that way that I can identify is that if the machine is rebooted it will automatically reattach the 'backup' volume and once that starts you're committed to wait for it to finish. That's not too cool. Is there a solution to this dilemma that's clean yet leaves me with a stand-alone bootable backup volume? -- -- Karl Denninger (karl@denninger.net) Internet Consultant & Kids Rights Activist http://www.denninger.net My home on the net - links to everything I do! http://scubaforum.org Your UNCENSORED place to talk about DIVING! http://www.spamcuda.net SPAM FREE mailboxes - FREE FOR A LIMITED TIME! http://genesis3.blogspot.com Musings Of A Sentient Mind
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050205135705.A10437>