Re: gmirror per partition

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Anton Shterenlikht <mexas@...>
Cc: <freebsd-ia64@...>, Wojciech Puchar <wojtek@...>, Marcel Moolenaar <xcllnt@...>, <freebsd-questions@...>, <freebsd-current@...>
Date: Friday, July 3, 2009 - 7:18 am

On Jul 3, 2009, at 12:12 PM, Anton Shterenlikht wrote:


You're almost there... I did this a while ago, can't remember when,  
but I just upgraded the system that had this from FreeBSD 6.3 of  
sometime in 2006 to 7.2.

What I believe I did from this point on was:

Copy everything from the root partition to mirror/root.
Modify /etc/fstab to mount root on mirror/root.
Reboot.

Now the original root partition isn't mounted anymore, so we can do  
operate on it's geom stuff.

gmirror insert root da0p2

That should be it.
If that doesn't work you can always boot off a live file-system CD/DVD  
and perform these actions from there. You won't have man pages in that  
case though, or at least I couldn't find a way to read them off the  
DVD last I tried.

One thing I'd like to warn about at this point:
If you ever upgrade to a kernel with a newer geom metadata version and  
that new kernel crashes, you're left with a system where the new  
kernel can't boot at all while the old kernel can't mount the root  
mirror as it's now of a version it can't handle.
You can however mount a single geom provider of that root file system  
(/dev/da1p2 for example) to try to fix things.
That file-system WILL be dirty, but DON'T run fsck on it or you will  
destroy it's contents. That's what happened to my upgrade above...

Thankfully it was only my root partition with hardly any data on it  
and I did make level 0 dumps before the upgrade, but I needed to  
restore that FS from a fixit shell without man pages. Augh!


Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:909,4a4de909759157325793587!


_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
gmirror gm0 destroyed on shutdown; GPT corrupt, Anton Shterenlikht, (Thu Jun 25, 7:02 am)
Re: gmirror gm0 destroyed on shutdown; GPT corrupt, Marcel Moolenaar, (Thu Jun 25, 12:41 pm)
gmirror per partition. Was: Re: gmirror gm0 destroyed on shu..., Anton Shterenlikht, (Wed Jul 1, 6:56 am)
Re: gmirror per partition. Was: Re: gmirror gm0 destroyed on..., Anton Shterenlikht, (Thu Jul 2, 4:37 am)
Re: gmirror per partition, Anton Shterenlikht, (Fri Jul 3, 6:12 am)
Re: gmirror per partition, Alban Hertroys, (Fri Jul 3, 7:18 am)
SUCCESS: Re: gmirror per partition, Anton Shterenlikht, (Fri Jul 3, 6:25 pm)
Re: gmirror gm0 destroyed on shutdown; GPT corrupt, Anton Shterenlikht, (Mon Jun 29, 5:38 am)