Vamos a usar el disco c1t0d0 como disco primario y el c1t1d0 como disco de mirror
[SKOL] /etc/init.d # format
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@1c,600000/scsi@2/sd@0,0
1. c1t1d0
/pci@1c,600000/scsi@2/sd@1,0
Specify disk (enter its number): ^D
El disco c1t0d0, tiene 3 particiones usadas, el slice 0 para el fs /, el slice 1 para el swap y el slice 3 para el fs /u00.
Se necesita como minimo 2 State Database REplicas por disco. que es donde DiskSuite va a almacenar los datos de
configuracion e informacion de Disksuite.
Por eso voy a usar el slice 4 y 5 del disco, con 15 mb para cada slice. Para esta tarea uso el comando format.
Posteriormente, voy a copiar toda la informacion contenida en el disco c1t0d0 (slices,tamanio,etc) en el disco que se
usara como mirror, en este caso el c1t1d0
prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
Chequeo que lo haya hecho con el comando format.
Luego de eso, creo los state databse replicas, de la siguiente manera
[SKOL] / # metadb -a -f -c 2 /dev/dsk/c1t0d0s4 /dev/dsk/c1t1d0s4
[SKOL] / # metadb -a -f -c 2 /dev/dsk/c1t0d0s5 /dev/dsk/c1t1d0s5
donde -a significa adding
-f significa force, porque es la primera vez que se esta creando las bases.
-c 2 ( con espacio entre la c y el 2), significa que crea 2 databases en cada slices.
[SKOL] / # metainit -f d10 1 1 c1t0d0s0
d10: Concat/Stripe is setup
[SKOL] / # metainit -f d20 1 1 c1t1d0s0
d20: Concat/Stripe is setup
[SKOL] / # metainit d30 -m d10
d30: Mirror is setup
[SKOL] / # cd /etc
[SKOL] /etc # cp vfstab vfstab.antesdeponer.DiskSuite
[SKOL] /etc # more vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
swap - /tmp tmpfs - yes -
[SKOL] /etc # metaroot d30
[SKOL] /etc # cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no -
swap - /tmp tmpfs - yes -
[SKOL] /etc # metainit -f d11 1 1 c1t0d0s1
d11: Concat/Stripe is setup
[SKOL] /etc # metainit -f d21 1 1 c1t1d0s1
d21: Concat/Stripe is setup
[SKOL] /etc # metainit d31 -m d11
d31: Mirror is setup
[SKOL] /etc # metainit -f d12 1 1 c1t0d0s3
d12: Concat/Stripe is setup
[SKOL] /etc # metainit -f d22 1 1 c1t1d0s3
d22: Concat/Stripe is setup
[SKOL] /etc # metainit d32 -m d12
d32: Mirror is setup
[SKOL] /etc # metainit hsp001
hsp001: Hotspare pool is setup
[SKOL] /etc #
Agrego en el vfstab todos los fs que quedaron con disk suite como por ejemplo el slice 3 q2ue es el u00
/dev/md/dsk/d32 5271150 9 5218430 1% /u00
[SKOL] / # lockfs -fa
[SKOL] / # init 6
[SKOL] / # metattach d30 d20
d30: submirror d20 is attached
[SKOL] / # metattach d31 d21
d31: submirror d21 is attached
[SKOL] / # metattach d32 d22
d32: submirror d22 is attached
[SKOL] / #
[SKOL] / # metastat
d30: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Resyncing
Resync in progress: 0 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 18876480 blocks
d10: Submirror of d30
State: Okay
Size: 18876480 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s0 0 No Okay
d20: Submirror of d30
State: Resyncing
Size: 18876480 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s0 0 No Okay
d31: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d21
State: Resyncing
Resync in progress: 0 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 25175424 blocks
d11: Submirror of d31
State: Okay
Size: 25175424 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s1 0 No Okay
d21: Submirror of d31
State: Resyncing
Size: 25175424 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s1 0 No Okay
d32: Mirror
Submirror 0: d12
State: Okay
Submirror 1: d22
State: Resyncing
Resync in progress: 0 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 10705152 blocks
d12: Submirror of d32
State: Okay
Size: 10705152 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s3 0 No Okay
d22: Submirror of d32
State: Resyncing
Size: 10705152 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s3 0 No Okay
hsp001: is empty
[SKOL] / #
[SKOL] / # installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0
[SKOL] / #
[SKOL] / # eeprom "boot-device=disk0 disk1"
[SKOL] / # eeprom use-nvramrc?=false
justamente lo que necesitaba, muchas gracias Diego,
ResponderEliminaratte: Topin
Me alegro que te sirva, bienvenido al blog
Eliminar