Bienvenidos

Todos estos pasos descriptos fueron probados en ambientes productivos

viernes, 19 de junio de 2015

Solaris 11 - ZFS Mirror boot

Crear un mirror del disco de booteo con zfs
Partiendo de la base que tengo estos dos discos internos y el Sistema Operativo esta alojado en el disco c1t0d0

     c1t0d0
          /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0
     c1t1d0
          /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@1,0

root# zpool status rpool
  pool: rpool
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c1t0d0s0  ONLINE       0     0     0

errors: No known data errors
root#
Copio la vtoc del disco primario ( c1t0d0 ) al disco secundario ( c1t1d0 )

root# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard:  New volume table of contents now in place.
root#

Agrego el disco c1t1d0s0 al pool de disco rpool 

root# zpool attach -f rpool c1t0d0s0 c1t1d0s0
Make sure to wait until resilver is done before rebooting.
root#

root@psunp006:/repo# zpool status rpool
  pool: rpool
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function in a degraded state.
action: Wait for the resilver to complete.
        Run 'zpool status -v' to see device specific details.
  scan: resilver in progress since Thu Jun 18 09:16:09 2015
    22.6G scanned
    5.02G resilvered at 106M/s, 20.58% done, 0h2m to go
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         DEGRADED     0     0     0
          mirror-0    DEGRADED     0     0     0
            c1t0d0s0  ONLINE       0     0     0
            c1t1d0s0  DEGRADED     0     0     0  (resilvering)

errors: No known data errors
root#

Chequeo como va la sincronizacion de los discos
root# zpool status -v rpool
  pool: rpool
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Thu Jun 18 09:16:09 2015
    22.6G scanned
    20.3G resilvered at 94.8M/s, 89.04% done, 0h0m to go
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         DEGRADED     0     0     0
          mirror-0    DEGRADED     0     0     0
            c1t0d0s0  ONLINE       0     0     0
            c1t1d0s0  DEGRADED     0     0     0  (resilvering)

device details:

        c1t1d0s0    DEGRADED      scrub/resilver needed
        status: ZFS detected errors on this device.
                The device is missing some data that is recoverable.
           see: http://support.oracle.com/msg/ZFS-8000-QJ for recovery


errors: No known data errors

root#

Ahora si, ya esta espejado 

root# zpool status -v rpool
  pool: rpool
 state: ONLINE
  scan: resilvered 22.6G in 0h5m with 0 errors on Thu Jun 18 09:21:48 2015
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror-0    ONLINE       0     0     0
            c1t0d0s0  ONLINE       0     0     0
            c1t1d0s0  ONLINE       0     0     0

errors: No known data errors
root#

Ahora a copiarle el sector de booteo al disco que agregue como mirror

root# installboot -F zfs -f /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t1d0s0
root#

Si lo ejecuto sin la opcion -f , me da un error como el siguiente

root# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t1d0s0
WARNING: target device /dev/rdsk/c1t1d0s0 has a versioned bootblock but no versioning information was provided.
bootblock version installed on /dev/rdsk/c1t1d0s0 is more recent or identical
Use -f to override or install without the -u option

No hay comentarios:

Publicar un comentario en la entrada