martes, 17 de diciembre de 2013

Solaris 8 en una zona

Primero se revisa añade los paquetes de legacy conteiners:

root@ue250 # cd solarislegacycontainers/
root@ue250 # ls
1.0     1.0.1   README
root@ue250 # cd 1.0.1/
root@ue250 # ls
Legal    Product
root@ue250 # pkgadd -d .
pkgadd: ERROR: no packages were found in </export/home/itc/solarislegacycontainers/1.0.1>
root@ue250 # pwd
/export/home/itc/solarislegacycontainers/1.0.1
root@ue250 # ls -F
Legal/    Product/
root@ue250 # cd Product/
root@ue250 # ls
SUNWs8brandk  SUNWs9brandk
root@ue250 # pkgadd -d .

The following packages are available:
  1  SUNWs8brandk     Solaris 8 Containers: solaris8 brand support RTU
                      (sparc) 11.10.0,REV=2008.09.20.18.50
  2  SUNWs9brandk     Solaris 9 Containers: solaris9 brand support RTU
                      (sparc) 11.10.0,REV=2008.09.20.18.50

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all

Processing package instance <SUNWs8brandk> from </export/home/itc/solarislegacycontainers/1.0.1/Product>

Solaris 8 Containers: solaris8 brand support RTU(sparc) 11.10.0,REV=2008.09.20.18.50
Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Using </> as the package base directory.
## Processing package information.
## Processing system information.
   8 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
  /usr/share/man/man5/solaris8.5

Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.

Installing Solaris 8 Containers: solaris8 brand support RTU as <SUNWs8brandk>

## Installing part 1 of 1.
/usr/lib/brand/solaris8/files/patches/109147-44.zip
/usr/lib/brand/solaris8/files/patches/109221-01.zip
/usr/lib/brand/solaris8/files/patches/111023-03.zip
/usr/lib/brand/solaris8/files/patches/111431-01.zip
/usr/lib/brand/solaris8/files/patches/112050-04.zip
/usr/lib/brand/solaris8/files/patches/112605-04.zip
/usr/lib/brand/solaris8/files/patches/order
/usr/share/man/man5/solaris8.5
[ verifying class <none> ]

Installation of <SUNWs8brandk> was successful.

Processing package instance <SUNWs9brandk> from </export/home/itc/solarislegacycontainers/1.0.1/Product>

Solaris 9 Containers: solaris9 brand support RTU(sparc) 11.10.0,REV=2008.09.20.18.50
Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Using </> as the package base directory.
## Processing package information.
## Processing system information.
   8 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing Solaris 9 Containers: solaris9 brand support RTU as <SUNWs9brandk>

## Installing part 1 of 1.
/usr/lib/brand/solaris9/files/patches/112963-32.zip
/usr/lib/brand/solaris9/files/patches/115986-03.zip
/usr/lib/brand/solaris9/files/patches/order
/usr/share/man/man5/solaris9.5
[ verifying class <none> ]

Installation of <SUNWs9brandk> was successful.
root@ue250 #

Ahora se crean los parametros para la zona:
root@ue250 # zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP   
   0 global           running    /                              native   shared
root@ue250 # zonecfg -z solaris8
solaris8: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:solaris8> create -t SUNWsolaris8
zonecfg:solaris8> set zonepath=/zonas/solaris8
zonecfg:solaris8> set autoboot=true
zonecfg:solaris8> add net
zonecfg:solaris8:net> set physical=ce3
zonecfg:solaris8:net> set address=192.168.200.251
zonecfg:solaris8:net> set defrouter=192.168.200.100
zonecfg:solaris8:net> end
zonecfg:solaris8> verify
zonecfg:solaris8> commit
zonecfg:solaris8> exit
root@ue250 #

Ahora la carpeta del path le damos los permisos requeridos:

root@ue250 # mkdir -p /zonas/solaris8
root@ue250 # chmod -R 700 /zonas/solaris8/
root@ue250 #

Ya con eso se instala desde el backup que esta con formato *.dmp.

root@ue250 # zoneadm -z solaris8 install -p -v -a /export/home/itc/Ultra60Entel/raiz.dmp     
      Log File: /var/tmp/solaris8.install.1503.log
       Product: Solaris 8 Containers 1.0
     Installer: solaris8 brand installer 1.3
          Zone: solaris8
          Path: /zonas/solaris8
        Source: /export/home/itc/Ultra60Entel/raiz.dmp
    Media Type: ufsdump archive
    Installing: This may take several minutes...


Hay que esperar que termine el proceso.





jueves, 28 de noviembre de 2013

zfs grow

root@solaris:/etc/inet#
root@solaris:/etc/inet# zpool status rpool
  pool: rpool
 state: ONLINE
  scan: resilvered 6.19G in 0h11m with 0 errors on Thu Nov 28 11:15:04 2013
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            c8t0d0  ONLINE       0     0     0
            c8t3d0  ONLINE       0     0     0

errors: No known data errors
root@solaris:/etc/inet# zpool detach rpool c8t0d0
root@solaris:/etc/inet# df -h -F zfs
Filesystem             Size   Used  Available Capacity  Mounted on
rpool/ROOT/solaris     7.6G   3.8G       1.3G    75%    /
rpool/ROOT/solaris/var
                       7.6G   392M       1.3G    23%    /var
rpool/VARSHARE         7.6G    74K       1.3G     1%    /var/share
mypool                  39G    28G        11G    73%    /datos
rpool/export           7.6G    32K       1.3G     1%    /export
rpool/export/home      7.6G    32K       1.3G     1%    /export/home
rpool/export/home/itc
                       7.6G   768K       1.3G     1%    /export/home/itc
rpool                  7.6G   4.9M       1.3G     1%    /rpool
root@solaris:/etc/inet# zpool set autoexpand=on rpool
root@solaris:/etc/inet# df -h -F zfs
Filesystem             Size   Used  Available Capacity  Mounted on
rpool/ROOT/solaris      39G   3.8G        33G    11%    /
rpool/ROOT/solaris/var
                        39G   392M        33G     2%    /var
rpool/VARSHARE          39G    74K        33G     1%    /var/share
mypool                  39G    28G        11G    73%    /datos
rpool/export            39G    32K        33G     1%    /export
rpool/export/home       39G    32K        33G     1%    /export/home
rpool/export/home/itc
                        39G   768K        33G     1%    /export/home/itc
rpool                   39G   4.9M        33G     1%    /rpool
root@solaris:/etc/inet#

martes, 4 de diciembre de 2012

setenforcing

setenforcing 0 | 1


# parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print
Error: /dev/sdb: unrecognised disk label

(parted) mklabel gpt

(parted) print
Model: Unknown (unknown)
Disk /dev/sdb: 5909GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

jueves, 8 de noviembre de 2012

Conexion hacia el CMM por consola

Sun Blade X6250 Server Module

# ssh -l root blade_6000_cmm
Password:

Sun(TM) Integrated Lights Out Manager

Version 2.0.3.2

Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

-> cd BL3
/CH/BL3

-> show

/CH/BL3
   Targets:
   SP
   SEEPROM

   Properties:
   type = Blade
   fru_part_number = 501-7376-02
   fru_serial_number = 0000000-7001
   fru_name = ASSY,BD,WOLF,X6250
   Commands:
   cd
   show

-> start /CH/BL3/SP/cli
Are you sure you want to start /CH/BL3/SP/cli (y/n)? y
start: Connecting to /CH/BL3/SP/cli as user root
start: Change the "user" property to connect as a different user
root@10.11.2.123's password:

Sun Microsystems Embedded Lights Out Manager
Copyright 2006 Sun Microsystems, Inc. All rights reserved.

Firmware Version: 4.0.51
SMASH Version: v1.0.0

Hostname: SUNSP001B242D495D
IP address: 10.12.9.207
MAC address: 00:1B:24:2D:49:5D

-> show
 /
   Targets:
       SP
       SYS
       CH
   Properties:
   Target Commands:
       show
       cd

-> start /SP/AgentInfo/Console

console activate successful
press ESC+( to terminate session...

x6250a console login:

martes, 6 de noviembre de 2012

Reparar boot archive corrupto en sparc con SVM

Es comun que despues de un apagado brusco del equipo se tenga corrupto el boot-archive, existe el procedimiento para subir el equipo en modo failsafe y desde ahi efectuar la reparacion manual, pero que pasa si esta con SVM.

A continuacion estan los pasos resumidos para esta tarea:

1.- Desde el prompt del ok
ok boot -F failsafe
2.- Montar una de las vias en modo read only para copiar el archivo de configuracion del SVM hacia el sistema en modo failsafe
mount -o ro /dev/dsk/cxtxdxs0 /a
3.- Copiar lo siguiente
cp /a/kernel/drv/md.conf /kernel/drv
4.- Ejecutar el comando para que lea el archivo copiado
update_drv -f md
5.- Ahora si todo ha ido bien se puede lanzar el comando metastat para verificar el resultado de los anteriores pasos.
6.- Ya con esto se tiene plenamente identificado donde esta el metadevice que corresponde al directorio / por ejemplo si fuera d10
metasync d10
7.- Se espera que el status se el ok es decir que las dos vias esten sincronizadas
8.- Se monta el metadevice en /a
mount /dev/md/dsk/d10 /a
9.- Ahora se actualiza el boot archive con el comando bootadm con las opciones de verbosidad y -R para que todo lo haga en forma recursiva
bootadm update-archive -v -R /a
10.- Es necesario desmontar el directorio /a
11.- Finalmente hay que darle un reboot ordenado con init 6



viernes, 28 de septiembre de 2012

Montar iso o DVD sobre un LDOM



Ahora toca instalar el SO sobre el ldom aqui estan los pasos breves para montar un iso sobre el dominio.

root@t5120 # ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     2G       0.2%  21h 17m
ldg0             active     -n----  5000    8     512M     0.1%  15h 40m
ldg1             active     -t----  5001    8     512M      12%  21h 15m
ldg2             active     -t----  5002    8     512M      12%  21h 15m
root@t5120 #


Primero bajo el dominio en el cual quiero montar el SO que es el ldg1

root@t5120 # ldm stop ldg1
LDom ldg1 stopped
root@t5120 # ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     2G       0.3%  21h 17m
ldg0             active     -n----  5000    8     512M     0.1%  15h 41m
ldg1             bound      ------  5001    8     512M          
ldg2             active     -t----  5002    8     512M      12%  21h 15m
root@t5120 #

Ahora de desenlaza el dominio con el comando

root@t5120 # ldm unbind ldg1
root@t5120 # ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     2G       2.0%  21h 19m
ldg0             active     -n----  5000    8     512M     0.1%  15h 42m
ldg2             active     -t----  5002    8     512M      12%  21h 17m
ldg1             inactive   ------          8     512M          
root@t5120 #

Ahora si se puede añadir el iso desde el dominio primario

root@t5120 # ldm add-vdsdev /export/home/itc/install/V27764-01.iso iso_vol@primary-vds0
root@t5120 # ldm add-vdisk vdisk_iso iso_vol@primary-vds0 ldg1
root@t5120 # 

root@t5120 # ldm bind ldg1
root@t5120 # ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     2G       2.2%  21h 35m
ldg1             bound      ------  5000    8     512M          
ldg2             active     -t----  5002    8     512M      12%  21h 32m
ldg0             inactive   ------          8     512M          
root@t5120 #

root@t5120 # ldm start ldg1
LDom ldg1 started
root@t5120 # ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     2G       0.2%  21h 35m
ldg1             active     -t----  5000    8     512M     4.6%  2s
ldg2             active     -t----  5002    8     512M      12%  21h 33m
ldg0             inactive   ------          8     512M          
root@t5120 #

Nos conectamos al dominio y se verifica el est

{0} ok banner

SPARC Enterprise T5120, No Keyboard
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.0.b, 512 MB memory available, Serial #83525636.
Ethernet address 0:14:4f:fa:80:4, Host ID: 84fa8004.



{0} ok devalias
vdisk_iso                /virtual-devices@100/channel-devices@200/disk@1
vdisk0                   /virtual-devices@100/channel-devices@200/disk@0
vnet0                    /virtual-devices@100/channel-devices@200/network@0
net                      /virtual-devices@100/channel-devices@200/network@0
disk                     /virtual-devices@100/channel-devices@200/disk@0
virtual-console          /virtual-devices/console@1
name                     aliases
{0} ok


En esta instancia ya se puede levantar desde el iso virtual

{0} ok boot cdrom 
Boot device: /virtual-devices@100/channel-devices@200/disk@0  File and args: cdrom
Bad magic number in disk label
ERROR: /virtual-devices@100/channel-devices@200/disk@0: Can't open disk label package

ERROR: boot-read fail


Can't open boot device

{0} ok boot vdisk_iso
Boot device: /virtual-devices@100/channel-devices@200/disk@1  File and args:
SunOS Release 5.10 Version Generic_147440-01 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Configuring devices.
Using RPC Bootparams for network configuration information.
Attempting to configure interface vnet0...



Para remover hay que seguir el siguiente orden.

1 Parar el dominio

2 Desenlazar el dominio

3 Remover el disco con el comando
 ldm remove-vdisk [-f] disk-name ldom
root@t5120 # ldm remove-vdisk vdisk_iso  ldg0

4 Remover el device entregado al dominio con:
ldm remove-vdsdev [-f] volume-name@service-n
root@t5120 # ldm remove-vdsdev iso_vol@primary-vds0    
root@t5120 # 

Thats all!!

jueves, 27 de septiembre de 2012

Montar USB sobre solaris 10


Con los memory stick de hasta 4 gigas nunca se tuvieron problemas y eso que siempre se utilizaron de distintos fabricantes el procedimiento clasico era el siguente:

Aplicar el comando volcheck en forma directa sobre Solaris 10, con solaris 9 habia que hacer el adicional de bajar y subir el demonio volmgt y siempre fue suficiente.


root@t5120 # volcheck
root@t5120 # /etc/init.d/volmgt stop
root@t5120 # /etc/init.d/volmgt start
volume management starting.
root@t5120 #


Ahora ya tengo un memory stick de 8gigas en teoria de acuerdo al fabricante con soporte USB3.0 y casi todos los servidores de momento tienen solo USB2.0.

Pequeño gran problema ya el procedimiento ahora no avanza para adelante ya que el resultado es que directamente no se puede acceder al dispositivo.

Al final es como todo solo se tiene que dar la vuelta y encontrar solucion y se presenta un procediento que funciona.

Paso 1 devfsadm -C
Paso 2 mount -F pcfs /dev/dsk/cXt0d0s0:c /mnt


Voila!! todo montado y accesible con esto ya accedemos a la data.