SVM, mirroring

Really sorry for the long posting. But i would really want to clear all the doubts.

I have 2 disk c0t0d0 & c0t1d0, i wanted to mirror c0t1d0 (mirror) to c0t0d0 (main).

Creating state database replica:
metadb -a -c3 -f c0t0d0s7

------------------------------------------------------------------
Question:

  1. Should i create the state database replica on c0t0d0s7 or c0t1d0s7?
  2. Should i create all the replicas on the same slice?
    ------------------------------------------------------------------

Creating volumes:
metainit -f d11 1 1 c0t0d0s1
metainit -f d12 1 1 c0t1d0s1

Creating one-way mirror:
metainit d10 -m d11

Creating two-way mirror:
metattach d10 d12

------------------------------------------------------------------
Question:

  1. Does the above command means that d11(c0t0d0s1) is two-way mirrored to d12(c0t1d0s1)?
  2. Should i create mirror and volumes on all the 8 slices (s0-s7)?
  3. Is it creating two-way mirror means that when i delete something on the main/mirror volume, the other volume will also do the same?
    ------------------------------------------------------------------

This is my understanding from reading through the webs. If i get it all wrong, please kindly point out my mistake.

Thanks in advance for reading or solving the thread.

  1. Create state database replicas on both disks, 2 on each would be enought.
  2. Yes. But it must be unused slice.
  1. It means that d10 is two-way mirror with submirrors: d11 and d12.
  2. Depends what you want to do. Besides you can't mirror all slices, as 1 slice on each disk need to hold state database replicas, but remaining 7 slices can be mirrored if you require that in your setup.
  3. You can't delete something from mirror, you only see main device (d10) which is going to be mounted in your system, and system will manage all operations on the submirrors. When you do any operation on d10, both submirrors receive same operation. If you would try manipulating submirrors (like mounting d11 and changing it) it would damage your data, but I guess system should be able to recover from that, anyway don't edit submirrors.

You're welcome.

Metadb replicas:

  1. It's vital that you create metadb replicas on *both* slices. Otherwise the loss of a disk could destroy your database.
  2. Having all the copies on one slice is no big problem, so long as you have them on multiple disks

Mirror:
1: That command means that you will have a mirror device called d10, it will write to d11 and d12 syncronisly - don't try to write to the underlying volumes
2: Yep, each mirror covers one slice - don't bother with slice 2 or your metadb slice though
3: Yes, this only ptoects you against disk failure, not deletions or filesystem corruption

---------- Post updated 07-03-09 at 10:42 AM ---------- Previous update was 07-02-09 at 06:03 PM ----------

Heh, snap, looks like we both answered at the same time :slight_smile:
Good news that we've both said much the same thing too :slight_smile:

Thank you so much for the reply.
It sure clear out a lot of doubts i have. :b::b:

Thanks again.