Wednesday, September 18, 2019

MySQL Cluster Management

Managing Mysql Cluster


Monitor the Cluster

ndb_mgm
Cluster Status

ndb_mgm> show

Data Node status
ndb_mgm> all status

Cluster Memory Usage
ndb_mgm> all report memory


How to Restart a MySQL Cluster without downtime

Start Management Cluster to reload configuration

ndb_mgmd --reload -f /var/lib/mysql-cluster/config.ini


Restart the management cluster
shell> kill $(pidof ndb_mgmd)


Starting the management cluster
shell> ndb_mgmd --config-file=var/lib/mysql-cluster/config.ini


#To restart ndb_mgmd overwritting cache files, the following options can be used on commandline (./ndb_mgmd)
--initial
--skip-config-cache

#or removing cache files with:
shell>rm -rf /var/lib/mysql-cluster/


#Data/Storage Node
The data or storage node, which is implements as ndbd or ndbmtf, handles data storage ans retrieval for specific subset of the cluster's data.

#Purpose of datanodes
to process and retrienve information, being the storage for the whole cluster



#Managing Data Node
Stop data node
ndb_mgm> STOP
ndb_mgm> 3  STOP

#Starting Data Node
ndb_mgm> 3  START


Managing SQL Nodes
#Stop SQL Node
shell>service mysql stop

#Start SQL Node
shell>service mysql start

Wednesday, May 1, 2019

Essay on my experience in Hokkaido Japan

My experiences in northern Japan, Hokkaido the breadbasket of Japan.

The qualities of Japanese people that I really admire are the following: They are very creative and innovative, they made use of technology and mechanization to make farmers and farming efficient. I really admire their discipline and their commitment to work.  I also observe how they care for the environment and the observance of cleanliness. All the people are very polite and very formal, punctuality must always observe.

In terms of ICT, University research are really focused on the improvement and solving the current problems of the Industry, In the case of Tokachi which is the breadbasket of Japan research and studies are targeted for the farmers and farms.

The sense of cooperation among farmers is very admirable which I would like to emulate and hopefully, i will be able to set up one in our local place in Northern Luzon, Philippines.

The foods are very rich in taste and they are always fresh. Most of the people really value their health because you can see on the food that they consume, they always have fresh vegetable, fresh ingredients, and healthy diets.

I would like to thank JICA, JICA staff and the Japan Government for giving me this opportunity to experience life in Japan, learn their best practice and see their technology first hand.

Wednesday, February 27, 2019

Excel tips

Some excel tricks on date computation.

Start Date 2004/01/04
End Date 2019/02/28

Compute: Day(s)    = datedif(startdate, enddate, "D")
        Month(s)  = datedif(startdate, enddate, "M")
        Year(s)   = datedif(startdate, enddate, "Y")


Excel Input:
Date now = ctrl + ;
Time now = ctrl + :


Monday, September 3, 2018

Simple SAN Switch Brocade How to


0. Show switch status
>switchshow
1. Show version
>version

2. Show current configuration
>cfgshow

Defined configuration:
 cfg: VMWARE51b
ESX_Hosts_EMC; ESX_Hosts_HDS; ESX_Hosts_01; ESX_Hosts_02;
ESX_Hosts_03; ESX_Hosts_04; ESX_Hosts_05; ESX_Hosts_01_EMC;
ESX_Hosts_02_EMC; ESX_Hosts_03_EMC; ESX_Hosts_04_EMC;
ESX_Hosts_05_EMC; ESX_Hosts_UCS
 zone: ESX_Hosts_01
ESX_01; HDS_NIN_Port_1D; Hitachi_0B; Hitachi_1B
 zone: ESX_Hosts_01_EMC
ESX_01; EMC_A1; EMC_B1
 zone: ESX_Hosts_EMC
xx:xx:xx:xx:xx:xx:xx:xx
.
.

zone: ESX_Hosts_UCS
xx:xx:xx:xx:xx:xx:xx:xx
.

3. Show configured zone
>zoneshow

4. Create alias
>alicreate “ESX_Hosts_04”, “xx:xx:xx:xx:xx:xx:xx:xx″

To verify run command, alishow “ESX_Hosts_04” and so on.

5. Create Zone
>zonecreate “zone1”, “HostPort1; StoragePort1”

To verify run command, zoneshow “zone1” and so on.


6. Create configuration

> cfgcreate "VMWARE51b", "zone1;zone2"

7.Save configuration
>cfgsave

8.Enable configuration
> cfgenable "VMWARE51b"

Wednesday, August 22, 2018

Convert .ISO to File/USB Drive on Mac using dd

Using dd

NAME
     dd -- convert and copy a file

SYNOPSIS
     dd [operands ...]

DESCRIPTION
     The dd utility copies the standard input to the standard output.  Input
     data is read and written in 512-byte blocks.  If input reads are short,
     input from multiple reads are aggregated to form the output block.  When
     finished, dd displays the number of complete and partial input and output

     blocks and truncated input records to the standard error output.


Plug-in your USB stick and find what "/dev/diskN" it is mapped to by opening Terminal (where "N" stands for "disk0", "disk1", "disk2" etc). To do so, please execute:

# diskutil list
or
#df

Unmount USB Stick
Unmount the USB stick

# diskutil unmountDisk /dev/diskN
Where /dev/diskN is the one you have found in previous step as per our example it would be "/dev/disk2".

Write ISO to USB or
Write the content of the ISO file:

# sudo dd if=/path/to/downloaded.iso of=/dev/rdiskN bs=1m
/dev/rdiskN is the same disk you have found previously, with an r in front. r is for raw disk, as writing to /dev/rdisk2 is much faster than writing to /dev/disk2. You will be prompted for the administrator's password.

Wednesday, August 15, 2018

Change Windows Server Product Key on command line

1.  Clear the current key

Open Powershell with admin rights then enter:

slmgr -upk (this removes the current Product Key)


2.  Add the new(Correct Key)

Add The New (or Correct Key)
Now that the key is cleared you can either stay in Powershell and enter the new key with the following:

slmgr -ipk XXXX-XXXX-XXXX-XXXX (with the X's of course being the Key )

or

Go the the activation GUI and you will now be able to enter a Key