Posted in LINUX, OS

Setting udev rules for Oracle ASM on Linux

1) Use lsblk command to know current disk allocated.

2) Use below mentioned command to know disk id.

/sbin/scsi_id -g -u -d /dev/sdr

3)Once you know all the id of associated disk to be used for ASM data storage.

You can put below mentioned line in vi /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name", RESULT=="36000c2966eff055daa2454a0d522523e", NAME="arcRedo", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name", RESULT=="36000c29e693d7a0dfbd895da40a985f1", NAME="at01", OWNER="grid", GROUP="asmadmin", MODE="0660"

4)Once you have set the rule you can now reload udev rules with below mentioned command.After rules are implemented we can test the desired disk.

/sbin/udevadm control --reload-rules


udevadm test /dev/arcRedo

5)Verify by below mentioned command.

[root@TESTING~]# ls -l /dev/arcRedo
brw-rw---- 1 grid asmadmin 8, 32 Aug 19 05:43 /dev/arcRedo
Posted in OS, Solaris

Applying Critical Patch Update of April 2017 on Solaris 11.3.

Applying Oracle Solaris  on Solaris 11.3.

For downloading the Critical Patch Update Use below mentioned link:-

Critical Patch Update

Once necessary Zip file is downloaded copy it to primary Server and install repository:

Patch apply

On primary Server :

root@PRIMARY:/softrepo/repo113full# ./install-repo.ksh -d /softrepo/repo113full -c -v -I
Using p25977008_1100_SOLARIS64 files for sol-11_3_20_5_0-incr-repo download.

Comparing digests of downloaded files...done. Digests match.

Repository can be found in /softrepo/repo113full.
Initiating repository verification.
Building ISO image...done.
ISO image can be found at:
Instructions for using the ISO image can be found at:


Share the full directory of the repository:

share -F nfs /softrepo/repo113full/


Solaris-2:root@TESTING:~# pkg unset-publisher solaris
Updating package cache 1/1
solaris-2:root@TESTING:~# mount -F nfs /mnt_11_3
solaris-2:root@TESTING:~# mount -F hsfs /mnt_11_3/sol-11_3_20_5_0-incr-repo.iso /mnt
solaris-2:root@TESTING:~# pkg set-publisher -g file:///mnt/repo solaris
solaris-2:root@TESTING:~# pkg update -nv
 Packages to update: 2
 Estimated space available: 9.03 GB
Estimated space to be consumed: 63.22 MB
 Create boot environment: No
Create backup boot environment: Yes
 Rebuild boot archive: No

Changed packages:
 consolidation/ddt/ddt-incorporation,5.11:20150916T171410Z ->,0.5.11-
 support/explorer,5.11:20150916T171411Z ->,0.5.11-

solaris-2:root@TESTING:~# pkg update
 Packages to update: 2
 Create boot environment: No
Create backup boot environment: Yes

Completed 2/2 1365/1365 8.3/8.3 0B/s

Removing old actions 11/11
Installing new actions 26/26
Updating modified actions 1346/1346
Updating package state database Done
Updating package cache 2/2
Updating image state Done
Creating fast lookup database Done
Updating package cache 1/1







Posted in LINUX, OS

Changing Hostname in RHEL 7 with hostnamectl command

User used is root user:

1) Change contents of /etc/hosts file

[root@TESTING~]# cat /etc/hosts localhost localhost.localdomain localhost4 localhost4.localdomain4 TESTING

2) Change contents of /etc/hostname file

[root@TESTING ~]# cat /etc/hostname

3) Use below mentioned command to change hostname.

[root@TESTING ~]# hostnamectl set-hostname "TESTING-412" --pretty

4) Confirm the changes by executing status command.

[root@TESTING ~]# hostnamectl status
 Static hostname: TESTING-412
 Icon name: computer-vm
 Chassis: vm
 Machine ID: af96783f62144b77a1c00840f955d0c4
 Boot ID: 9c0d051878e144ff95629f1c41e534af
 Virtualization: vmware
 Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo)
 CPE OS Name: cpe:/o:redhat:enterprise_linux:7.2:GA:server
 Kernel: Linux 3.10.0-327.el7.x86_64
 Architecture: x86-64

5) Restart Server.

[root@TESTING ~]# reboot
 PolicyKit daemon disconnected from the bus.
 We are no longer a registered authentication agent.

6) After few minutes restart the putty session to check the change in hostname.Login with any user and execute hostname command.

login as: admin
 admin@'s password:
 Last login: Tue Nov 29 05:02:35 2016 from
 [admin@TESTING-412 ~]$ hostname
Posted in OS, Solaris

Upgrading from Solaris 11.1 to Solaris 11.3

This page has all the details for upgrading server from Solaris 11.1 to Solaris 11.3.

Repository Download for Solaris 11.3.

Find existing Solaris and Oracle patch status details @

For downloading the Solaris Repository Files Use below mentioned link:-


Once download completed, copy zip files to the patch repository machine i.e.

  • Login as root and create the directory  /softrepo/repo113full/
  • Copy the iso file to the target directory “repo113full”.

Note: You can use WinSCP for transferring patch.



Patch apply


On Primary server i.e.(

Install the Repository by using below mentioned steps :


#cd /softrepo/repo113full
#./install-repo.ksh -d /softrepo/repo113full -c -v -I


Share the full directory of the repository:


#share -F nfs /softrepo/repo113full/


On the target LDOM i.e.(


Create a mount directory and mount the directory of repository:


#mkdir mnt_11_3
#mount -F nfs /mnt_11_3
#mount -F hsfs /mnt_11_3/sol-11_3-repo.iso /mnt


Set the publisher:


#pkg set-publisher -g file:///mnt/repo solaris
#pkg publisher


Check compatibility with the current system patch version:


#pkg update -nv


Update the packages:


#pkg update --accept


Reboot the machine:


#init 6


After reboot you can confirm if Upgrade is successful by running below mentioned command:–

root@Testing:~# uname -v

Posted in LINUX, OS

Creating an ext4 File System on RHEL .

In this we will create mount point with name /ora00
a) Use lsblk command to find out which disk was added to Server

[root@TESTING ~]$ lsblk
 fd0 2:0 1 4K 0 disk
 sda 8:0 0 30G 0 disk
 ├─sda1 8:1 0 500M 0 part /boot
 └─sda2 8:2 0 29.5G 0 part
 ├─rhel-root 253:0 0 27.5G 0 lvm /
 └─rhel-swap 253:1 0 2G 0 lvm [SWAP]
 sdb 8:16 0 10G 0 disk
 sr0 11:0 1 1024M 0 rom

As you can see in above output disk sdb was added of size 10G.


b) Now you have to make directory ora00 for which we will use ora00 command.

[root@TESTING ~]# mkdir /ora00


c) Once directory is created we will create physical volume by command pvcreate.

[root@TESTING ~]# pvcreate /dev/sdb
 Physical volume "/dev/sdb" successfully created

d) Now we will create volume group:

Volume groups are nothing but a pool of storage that consists of one or more physical volumes.
Once physical volume is created we can create volume group from that physical volume

[root@TESTING ~]# vgcreate vg_ora00  /dev/sdb
 Volume group "vg_ora00" successfully created


e) Now we will create Logical volume of size 9.7 GB from that Volume group:

[root@TESTING ~]# lvcreate -L 9.7G -n lv_ora00  vg_ora00
 Rounding up size to full physical extent 9.70 GiB
 Logical volume "lv_ora00" created.


f) Now we will create ext4 filesystem on that logical volume:

[root@TESTING ~]# mkfs.ext4 /dev/vg_ora00/lv_ora00
 mke2fs 1.42.9 (28-Dec-2013)
 Filesystem label=
 OS type: Linux
 Block size=4096 (log=2)
 Fragment size=4096 (log=2)
 Stride=0 blocks, Stripe width=0 blocks
 636480 inodes, 2543616 blocks
 127180 blocks (5.00%) reserved for the super user
 First data block=0
 Maximum filesystem blocks=2151677952
 78 block groups
 32768 blocks per group, 32768 fragments per group
 8160 inodes per group
 Superblock backups stored on blocks:
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done
 Writing inode tables: done
 Creating journal (32768 blocks): done
 Writing superblocks and filesystem accounting information: done


g) Once that is done we can have to mount /ora00 directory.

[root@TESTING ~]# mount /dev/vg_ora00/lv_ora00 /ora00

Now you can confirm above directory with below mentioned command:--

[root@TESTING ~]$ df -h
 Filesystem Size Used Avail Use% Mounted on
 /dev/mapper/rhel-root 28G 3.3G 25G 13% /
 devtmpfs 1.9G 0 1.9G 0% /dev
 tmpfs 1.9G 84K 1.9G 1% /dev/shm
 tmpfs 1.9G 8.9M 1.9G 1% /run
 tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
 /dev/mapper/vg_ora00-lv_ora00 9.5G 37M 8.9G 1% /ora00


h) For making those change permanent you have to add this entry in fstab file :-

[root@TESTING ~]$ cat /etc/fstab

 # /etc/fstab
 /dev/mapper/rhel-root / xfs defaults 0 0
 UUID=92aebe3b-0927-4ad6-9992-752de4cf2f5f /boot xfs defaults 0 0
 /dev/mapper/rhel-swap swap swap defaults 0 0
 /dev/mapper/vg_ora00-lv_ora00 /ora00 ext4 defaults 1 2