123HELPDESK

IT professionals voor ondernemers

Mirror / unmirror Solaris Volume manager PDF Afdrukken

Unmirror a harddisk on Saolaris Volume manager

Tasks:
  1. Unmirror the volumes so that one system is split into two systems.
  2. Re-create the mirrors for the first system as they existed before.

Scenario:
# metastat -p  
d6 -m d16 d26 1
d16 1 1 c5t0d0s6
d26 1 1 c5t4d0s6
d5 -m d15 d25 1
d15 1 1 c5t0d0s5
d25 1 1 c5t4d0s5
d4 -m d14 d24 1
d14 1 1 c5t0d0s4
d24 1 1 c5t4d0s4
d3 -m d13 d23 1
d13 1 1 c5t0d0s3
d23 1 1 c5t4d0s3
d0 -m d10 d20 1
d10 1 1 c5t0d0s0
d20 1 1 c5t4d0s0
d1 -m d11 d21 1
d11 1 1 c5t0d0s1
d21 1 1 c5t4d0s1

 

Step 1. Unmirror the volumes so that one system is split into two systems.

# metaclear -r d6
# metaclear -r d5
# metaclear -r d4
# metaclear -r d3
# metaclear -r d0
# metaclear -r d1
Create and delete replicas of the metadevice state database
# metadb

Delete the swap slice:
Deletes all replicas on the specified slice:
# metadb -d c5t4d0s7
# metadb -d c5t0d0s7
or force delete:
# metadb -f -d c5t0d0s7
# metadb

Step 2. Re-create the mirrors for the first system as they existed before.


Create the swap slice, specify the number of replicas -c 3 (default is 1):
 

# metadb -a -c 3 c5t0d0s7
# metadb
# metadb -a -c 3 c5t4d0s7
# metadb 


Configure metadevice:
 

# metainit -f d16 1 1 c5t0d0s6
# metainit -f d26 1 1 c5t4d0s6
# metainit -f d15 1 1 c5t0d0s5
# metainit -f d25 1 1 c5t4d0s5
# metainit -f d14 1 1 c5t0d0s4
# metainit -f d24 1 1 c5t4d0s4
# metainit -f d13 1 1 c5t0d0s3
# metainit -f d23 1 1 c5t4d0s3
# metainit -f d10 1 1 c5t0d0s0
# metainit -f d20 1 1 c5t4d0s0
# metainit -f d11 1 1 c5t0d0s1
# metainit -f d21 1 1 c5t4d0s1


The following command creates a one-on-one concatenation for
the  root  slice.  Such a command is the first step you take
when setting up a mirror for the root slice (and  any  other
slice  that  cannot be unmounted).
 

# metainit d6 -m d16
# metainit d5 -m d15
# metainit d4 -m d14
# metainit d3 -m d13
# metainit d0 -m d10
# metainit d1 -m d11


setup system files for root (/) metadevice
 

# /usr/sbin/metaroot /dev/md/dsk/d0


Check the following files:

/etc/system:

* Begin MDD root info (do not edit)
rootdev:/pseudo/md@0:0,0,blk
* End MDD root info (do not edit)


/etc/vfstab:
 

#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/md/dsk/d0  /dev/md/rdsk/d0 /       ufs     1       no      -
/dev/md/dsk/d1  -               -       swap    -       no      -
/dev/md/dsk/d3  /dev/md/rdsk/d3 /usr    ufs     1       no      -
/dev/md/dsk/d4  /dev/md/rdsk/d4 /var    ufs     1       no      -
/dev/md/dsk/d5  /dev/md/rdsk/d5 /opt    ufs     2       yes     -
/dev/md/dsk/d6  /dev/md/rdsk/d6 /data   ufs     2       yes     -

Restart your system and create the mirror:

# metattach d1 d21
# metattach d0 d20
# metattach d3 d23
# metattach d4 d24
# metattach d5 d25
# metattach d6 d26
# metastat -p


 
< Vorige   Volgende >