ADMINISTRACIÓN DE GRUPOS DE RECURSOS
· Crear un grupo de recursos con failover # clresourcegroup create <group>
· Crear un grupo de recursos escalable # clresourcegroup create -S <group>
· Establecer online todos los grupos de recursos # clresourcegroup online +
· Suprimir un grupo de recursos # clresourcegroup delete <group>
· Suprimir un grupo de recursos y todos sus recursos # clresourcegroup delete -F <group>
· Conmutar el nodo principal actual de un grupo de recursos # clresourcegroup switch -n <nodename> <group>
· Cambiar el estado de un grupo de recursos UNMANAGED # clresourcegroup unmanage <group>
· Suspender la recuperación automática de un grupo de recursos # clresourcegroup suspend <group>
· Reanudar la recuperación automática de un grupo de recursos # clresourcegroup resume <group>
· Cambiar una propiedad de un grupo de recursos # clresourcegroup set -p Failback=true + name=value
· Agregar un nodo a un grupo de recursos # clresourcegroup add-node -n <nodename> <group>
· Quitar un nodo de un grupo de recursos # clresourcegroup remove-node -n <nodename> <group>
Ejemplo:
root@bxxx1 # clresourcegroup list
pr3_ci_rg
pwa_ci_rg
pbw_ci_rg
pge_ci_rg
phr_ci_rg
prm_ci_rg
pxi_ci_rg
pbi_ci_rg
pr3_d1_rg
pr3_d2_rg
pr3_d3_rg
pr3_d4_rg
root@bxxx1 # clresourcegroup show pr3_ci_rg
=== Resource Groups and Resources ===
Resource Group: pr3_ci_rg
RG_description: <NULL>
RG_mode: Failover
RG_state: Managed
Failback: False
Nodelist: bxxx3 bxxx6 bxxx1 bxxx2
--- Resources for Group pr3_ci_rg ---
Resource: pr3_ci_ip
Type: SUNW.LogicalHostname:3
Type_version: 3
Group: pr3_ci_rg
R_description:
Resource_project_name: PR3
Enabled{bxxx3}: True
Enabled{bxxx6}: True
Enabled{bxxx1}: True
Enabled{bxxx2}: True
Monitored{bxxx3}: False
Monitored{bxxx6}: False
Monitored{bxxx1}: False
Monitored{bxxx2}: False
Resource: pr3_ci_fs
Type: SUNW.HAStoragePlus:8
Type_version: 8
Group: pr3_ci_rg
R_description:
Resource_project_name: PR3
Enabled{bxxx3}: True
Enabled{bxxx6}: True
Enabled{bxxx1}: True
Enabled{bxxx2}: True
Monitored{bxxx3}: False
Monitored{bxxx6}: False
Monitored{bxxx1}: False
Monitored{bxxx2}: False
Resource: pr3_ci_sap
Type: SUNW.sap_ci_v2
Type_version: 2.0
Group: pr3_ci_rg
R_description:
Resource_project_name: PR3
Enabled{bxxx3}: True
Enabled{bxxx6}: True
Enabled{bxxx1}: True
Enabled{bxxx2}: True
Monitored{bxxx3}: False
Monitored{bxxx6}: False
Monitored{bxxx1}: False
Monitored{bxxx2}: False
Resource: pr3_ci_nfs
Type: SUNW.nfs:3.2
Type_version: 3.2
Group: pr3_ci_rg
R_description:
Resource_project_name: PR3
Enabled{bxxx3}: True
Enabled{bxxx6}: True
Enabled{bxxx1}: True
Enabled{bxxx2}: True
Monitored{bxxx3}: False
Monitored{bxxx6}: False
Monitored{bxxx1}: False
Monitored{bxxx2}: False
Resource: pr3_ci_ges_ip
Type: SUNW.LogicalHostname:3
Type_version: 3
Group: pr3_ci_rg
R_description:
Resource_project_name: PR3
Enabled{bxxx3}: True
Enabled{bxxx6}: True
Enabled{bxxx1}: True
Enabled{bxxx2}: True
Monitored{bxxx3}: False
Monitored{bxxx6}: False
Monitored{bxxx1}: False
Monitored{bxxx2}: False
· Podemos ver las dependencias entre los diferentes recursos:clresourcegroup show -v <grupo>.
root@bxxx1 # clresourcegroup show -v phr_ci_rg
=== Resource Groups and Resources ===
Resource Group: phr_ci_rg
RG_description: <NULL>
RG_mode: Failover
RG_state: Managed
RG_project_name: PHR
RG_affinities: <NULL>
RG_SLM_type: manual
Auto_start_on_new_cluster: False
Failback: False
Nodelist: bxxx6 bxxx3 bxxx2 bxxx1
Maximum_primaries: 1
Desired_primaries: 1
RG_dependencies: <NULL>
Implicit_network_dependencies: True
Global_resources_used: <All>
Pingpong_interval: 3600
Pathprefix: /sapmnt/PHR/admin_rg
RG_System: False
Suspend_automatic_recovery: True
--- Resources for Group phr_ci_rg ---
Resource: phr_ci_ip
Type: SUNW.LogicalHostname:3
Type_version: 3
Group: phr_ci_rg
R_description:
Resource_project_name: PHR
Enabled{bxxx6}: True
Enabled{bxxx3}: True
Enabled{bxxx2}: True
Enabled{bxxx1}: True
Monitored{bxxx6}: False
Monitored{bxxx3}: False
Monitored{bxxx2}: False
Monitored{bxxx1}: False
Resource_dependencies: <NULL>
Resource_dependencies_weak: <NULL>
Resource_dependencies_restart: <NULL>
Resource_dependencies_offline_restart: <NULL>
Resource: phr_ci_nfs
Type: SUNW.nfs:3.2
Type_version: 3.2
Group: phr_ci_rg
R_description:
Resource_project_name: PHR
Enabled{bxxx6}: True
Enabled{bxxx3}: True
Enabled{bxxx2}: True
Enabled{bxxx1}: True
Monitored{bxxx6}: False
Monitored{bxxx3}: False
Monitored{bxxx2}: False
Monitored{bxxx1}: False
Resource_dependencies: phr_ci_fs
Resource_dependencies_weak: <NULL>
Resource_dependencies_restart: <NULL>
Resource_dependencies_offline_restart: <NULL>
Resource: phr_ci_sap
Type: SUNW.sap_ci_v2
Type_version: 2.0
Group: phr_ci_rg
R_description:
Resource_project_name: PHR
Enabled{bxxx6}: True
Enabled{bxxx3}: True
Enabled{bxxx2}: True
Enabled{bxxx1}: True
Monitored{bxxx6}: False
Monitored{bxxx3}: False
Monitored{bxxx2}: False
Monitored{bxxx1}: False
Resource_dependencies: phr_ci_ip phr_ci_fs
Resource_dependencies_weak: <NULL>
Resource_dependencies_restart: <NULL>
Resource_dependencies_offline_restart: <NULL>
…….
· Para ver el estado del grupo de recurso:
root@bxxx1 # clresourcegroup status phr_ci_rg
=== Cluster Resource Groups ===
Group Name Node Name Suspended Status
---------- --------- --------- ------
phr_ci_rg bxxx6 Yes Online
bxxx3 Yes Offline
bxxx2 Yes Offline
bxxx1 Yes Offline
ADMINISTRACIÓN DE RECURSOS
· Crear un recurso logical hostname # clreslogicalhostname create -g <group> <lh-resource>
· Crear un recurso de haredaddress # clressharedaddress create -g <group> <sa-resource>
· Crear un recurso # clresource create -g group -t <type> <resource>
· Quitar un recurso # clresource delete <resource>
· Deshabilitar un recurso # clresource disable <resource>
· Cambiar una propiedad de recurso de un solo valor # clresource set -t type -p name=value +
· Crear un recurso de HAStorage Plus # clresource create -t HAStoragePlus -g group \ -p FileSystemMountPoints=mount-point-list \ -p Affinityon=true rs-hasp
· Borrar el indicador de error STOP_FAILED de un recurso # clresource clear -f STOP_FAILED <resource>
Diferentes opciones:
create ->Creates the resources that are specified as operands to the command.
delete ->Deletes the resources that are specified as operands to the command.
disable ->Disables resources.
enable ->Enables resources.
export ->Exports the cluster resource configuration.
list ->Displays a list of cluster resources.
list-props ->Displays a list of resource properties.
monitor ->Turns on monitoring for resources.
reset ->Clears error flags that are associated with cluster resources.
set ->Sets resource properties.
show ->Displays resource configuration.
status ->Displays resource status.
unmonitor ->Turns off resource monitoring.
Ejemplos:
root@bxxx1 # clresource list pr3_ci_ip
pr3_ci_ip
root@bxxx1 # clresource list -v pr3_ci_ip
Resource Name Resource Type Resource Group
------------- ------------- --------------
pr3_ci_ip SUNW.LogicalHostname:3 pr3_ci_rg
root@bxxx1 # clresource show pr3_ci_ip
=== Resources ===
Resource: pr3_ci_ip
Type: SUNW.LogicalHostname:3
Type_version: 3
Group: pr3_ci_rg
R_description:
Resource_project_name: PR3
Enabled{bxxx3}: True
Enabled{bxxx6}: True
Enabled{bxxx1}: True
Enabled{bxxx2}: True
Monitored{bxxx3}: False
Monitored{bxxx6}: False
Monitored{bxxx1}: False
Monitored{bxxx2}: False
TAREAS DE ADMINISTRACIÓN Y SUPERVISIÓN
- Agregar un nodo a un clúster. Desde el nodo con acceso que se va a agregar: # clnode add -c clustername -n <nodename> -e endpoint1, endpoint2 \ -e endpoint3, endpoint4
- Quitar un nodo del clúster. Desde el nodo con acceso y que no se encuentra en el clúste: # clnode remov
- Conmutar todos los grupos de recursos y dispositivos fuera de un nodo # clnode evacuate <nodename>
- Mostrar el estado de todos los componentes del clúster # cluster status
- Mostrar la configuración del clúster completa # cluster show
- Mostrar la información de versión de Sun Cluster # clnode show-rev -v
CIERRE Y ARRANQUE DE UN CLÚSTER
- Apagar todo el clúster. Desde un nodo # cluster shutdown
- Apagar un solo nodo # clnode evacuate # shutdown
No hay comentarios:
Publicar un comentario