Tuesday, January 22, 2013

Set java_home in windows

Use below command to set JAVA_HOME in windows

set JAVA_HOME="C:\Program Files\Java\jdk1.7.0_11"

Also we can set it under System Properties-Environment Variables as below

 

image

Monday, January 21, 2013

CommVault Exchange Mailbox level backup

Pre-requisites

Install Outlook(MAPI Client) on Exchange Server

Create the Mail Box enabled user with full Exchange permission

Install the Exchange Mail Box IDA

image

You need to give the mail box enabled user created with full Exchange permission details  to create a profile

image

Discover the mail box from the Commcell Console

image

Thursday, January 17, 2013

Clariion- host under ~management Storage Group

Today I have noticed that 2 of my SAN paths are missing in the host, I logged in to my Clariion, checked the Host Connectivity status and found 2 of my initiators are under ~management storage group.

image

I went to Engineering mode by pressing Ctrl,Shft, and F12 and entering the password messner

Then Selected Hosts Tab from the propertied of my Storage Group, there Advanced menu was visible

image

On Advanced menu  I noticed 2 initiators was unchecked. I checked all of them and clicked on OK.

image

After this all of my 4 paths were back to active.

Monday, January 14, 2013

Solaris 11 SSH direct root login access

This will be helpful for those wants to have direct root login locally and via SSH

Comment out the “CONSOLE=/dev/console” line in /etc/default/login.

image

Modify PermitRootLogin to yes in /etc/ssh/sshd_config

image

Remove “:type=role” from the root entry in /etc/user_attr

Remove highlighted part

image

image

Wednesday, January 9, 2013

MySQL Basic Hardening

Below are the basic hardening steps

1.Get rid of the test database, which is accessible to everyone.

mysql> drop database test;

2. Remove anonymous users

mysql> use mysql;

mysql> delete from db;

mysql> delete from user where not (host="localhost" and user="root");

mysql> flush privileges;

image

3. Change root Password

By default root password in empty

mysql> SET PASSWORD FOR root@localhost=PASSWORD(' New_Password');

image

4. Stop and Stat MySQL

image

Tuesday, January 8, 2013

Import clone or snapshot of LVM volume on same Redhat Linux Host

Some times we need to import the clone or snapshot of SAN volume to the same host, in our case we have Production and Development DB instances on same server, we take the clone of Production DB Volume in the SAN Array and import it for Development instance running on same host.

We need to properly change the UUIDs of the associated volume group and physical volume of snapshot or cloned VG so that they can mount at same time on a host.

Follow below steps.

1. Present the snapshot or clone to your system

2. Scan the system to detect new volume

3. run multipath –ll and note the newly detected device (If you have enabled multipath)

4. run # vgimportclone.sh -n <vg_name> /dev/mapper/mpathx

Ex: vgimportclone.sh -n new_vg /dev/mpath/mpath7p1

5. Activate VG and mount file system as below:

# vgchange –ay new_vg

# mount /dev/mapper/new_vg-vol  /New-DB-path

Identify the SAN disk in Windows 2008

I was so confused when I had to remove a correct SAN disk(3PAR Storage) from Windows 2008 Server where I had 3 SAN LUNs presented to that server.

I have identified the correct drive letter using the LUN ID in following way.

Run diskpart.exe from command line

DISKPART> list disk

DISKPART> select disk <disk number>

DISKPART> detail disk

image 

I am not sure whether there a better way to identify the san disk.

Friday, January 4, 2013

Linux detecting SAN LUN without reboot

Detecting SAN LUN without rebooting the server in Linux


Rescan the bus by echoing the /sys filesystem (only for Linux 2.6 kernels)
For Linux 2.6 kernels only, a rescan can be triggered through the /sys interface without having to unload the host adapter driver or reboot the system. The following command will scan all channels, targets, and LUNs on host H.


echo "- - -" > /sys/class/scsi_host/host_H/scan
Example:
                echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/hos2/scan
echo "- - -" > /sys/class/scsi_host/hos4/scan
echo "- - -" > /sys/class/scsi_host/hos4/scan