break solaris mirror

Hi All,

How do I break the solaris 8 mirror? And how do I make sure I will point the first hd mirror on reboot.

If the first break mirror won't boot. How do I make the copy mirror to boot?

Thanks in advance,
itik

i think you are working on a production environment?! please take trainings on solaris on how to do such things!

just for learning you need to read about the commands:

in solaris

  • metastat
  • metadetach
  • metattach
  • fortmat

in obp

  • nvalias
  • printenv
  • boot

don't do "try and error" on a production environment!

Here is my procedure...it is a little bit clunky, but it works.

You should have the openboot variable "boot-device" set to something like
"disk0 disk1". You control which side you are booting from by explicitly
mentioning in the boot command at the ok prompt. Assuming that
disk0 c1t0d0
disk1 c1t1d0
is my root fs mirror...

Boot to single user mode from the installation CD.
ok boot -s cdrom

fsck root to ensure that everthing is ok and that you have the layout right
# fsck /dev/rdsk/c1t0d0

Then mount it
# mount /dev/dsk/c1t0d0 /a

Now, the only time that I use this procedure is when the root filesystem has been damaged to the point of not booting. So this is where I would fix it. But I am only fixing one side of the mirror. This is why I must now break the mirror. So assuming that I fixed the problem....

Edit /a/etc/system and remove the line that contains
rootdev

Edit /a/etc/vfstab and change
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs ...
to
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs ...

Then
cd /
umount /a
and get back to ok prompt (I just hit a break, but you may not be using a serial connection)

Boot into single user mode from the disk you just edited...
ok boot -s disk0

# metaclear -f -r d0
# init 0
ok boot disk0

And you should come up on one side of the mirror.

I have used this and it works for me. But it is a dangerous procedure. I
also doubt that my procedure is optimal. So proceed at your own risk. And again, I do this only on unbootable systems (or a test system to reherse).

There may be other slices still mirrored and I leave them that way. Once the box comes up, I then remirror root with the standard procedure.