Saturday, November 8, 2014

How to modify interconnect device/settings in 11gR2 Clusterware

Let's imagine the following situation.
You have two interconnect interfaces. Suddenly, all of them have become unaccessible, your rac immediately stopped. How to rule it out ?
Build up new interconnect, using new cards, of course.
But you will not be able to run clusterware services like HAIP and other becouse your new interconnect device name does not consistent with interconnect device names in OLR (Oracle Local Registry on each node) and OCR.
Actions ?

1. Rename you interconnect device by operating system means (modify udev net-persistent-device-names file, for example, and run udevadm trigger command on each node), and rerun your clusterware afterwards.

OR

2. Modify OLR content on each node

$ cd $CRS_HOME/gpnp/$(hostname)/profiles/peer

Here will be signed profile.xml, modifications only allowed with gpnptool ($CRS_HOME/bin) utility.

query profile.2 in some manner like that:
$ gpnptool getpval -p=profile.2 -net
$ gpnptool getpval -p=profile.2 -net2:net_ip
$ gpnptool getpval -p=profile.2 -net2:net_ada

unsign profile.xml to new profile.2 :
$ gpnptool unsign -p=profile.xml -o=profile.2

rename interconnect adapter name in profile.2 :

$ gpnptool edit -p=profile.2 -net2:net_ada=new_if_name -o=profile.2 -ovr

set if needed new IP subnet for interconnect :
$ gpnptool edit -p=profile.2 -net2:net_ip=subnet.0 -o=profile.2 -ovr

sign profile.2 :
$ gpnptool sign -p=profile.2 -o=profile.2.xml.signed -w=/$CRS_HOME/gpnp/$(hostname)/wallets/peer

make a rotation :
$ mv profile.xml profile.xml.orig

$ cp profile.2.xml.signed profile.xml

run clusterware :
# /etc/init.d/ohasd start

After successful running, with help of oifcfg, delete old interconnect data from OCR by
$ oifcfg delif -global old_if_name.

Repeat above steps related to profile.xml on each node

Tuesday, September 23, 2014

Updating FabricOS using scp - The server is inaccessible or firmware path is invalid.

If you're getting something like this during updating brocade san switch firmware:
 
Failed to access scp://oracle:**********@hostname//vol200/temp/hp_hba/brocade/fos_721b/v7.2.1b/release.plist
The server is inaccessible or firmware path is invalid. Please make sure the server name/IP address and the firmware path are valid, the protocol and authentication are supported. It is also possible that the RSA host key could have been changed and please contact the System Administrator for adding the correct host key.

than you have two options :

1. Use ftp server to download firmware (I tried with vsftpd, but having trouble with binary/ascii mode having completely disabling ascii in the config I've left it).

2. Modify sshd_config, because firmwaredownload over scp/sftp require plain ssh password authentication

PasswordAuthentication yes

Reboot ssh server and have a lot of fun.
P.S.  Avoid ssh passwords with spaces for firmwaredownload.

Monday, September 8, 2014

How to free up space, "used" by deleted file which is held by running application

1. Just kill your application

2. If you can't kill the application, you can :

a) figure out the pid of the app;
b) figure out deteled filename (lsof | grep deleted | grep pid)
c) run

# : > /proc/$app_pid/fd/$decrpiptor_corresponding_to_deleted_file


Wednesday, August 13, 2014

How to unmount stale nfs share

If you suddenly have got stale and unable to read nfs mount point becouse of changed IP of the nfs server or something else, you should use following to unmount nfs share and after that remount it.

1.

# umount -lf /nfs_share

2. or

# umount.nfs /nfs_share -l -f

It should work

Friday, May 16, 2014

How to create equally row sized disks in HP SS 3PAR

Just use the command createcpg with flag -rs (row size), and after creating virtual volumes, associated with that cpg, you will see equal logical disk sizes and equal row size of each logical disk as well.

For example:

cli% createcpg -rs 10 -sdgs 126g -p -devtype FC -t r5 -ha cage test

cli% showld -d

Id Name                  CPG                  RAID Own      SizeMB RSizeMB RowSz StepKB SetSz Refcnt Avail CAvail -----CreationTime------ ---CreationPattern----

70 b.usr.0               test                    5 0/1/3/2   64512   86016     7    128     4      0 cage  cage   2014-05-16 16:29:06 FET -p -devtype FC       
71 b.usr.1               test                    5 1/0/2/3   64512   86016     7    128     4      0 cage  cage   2014-05-16 16:29:06 FET -p -devtype FC       
72 b.usr.2               test                    5 2/3/1/0   64512   86016     7    128     4      0 cage  cage   2014-05-16 16:29:06 FET -p -devtype FC       
73 b.usr.3               test                    5 3/2/0/1   64512   86016     7    128     4      0 cage  cage   2014-05-16 16:29:06 FET -p -devtype FC 

Also, don't forget to calculate and implement CPG's Growth Increment accorging to your hardware and logical configuration.

Monday, April 14, 2014

Linux fdisk - new partitions with first sector 2048 instead of 63

I have some quantity of ocfs2 partitions on the storage area. They were created several years before with first sector of partition as 63. Once I needed to resize ocfs2 file system by increasing size of the volume on the SAN, deleting ocfs2 partition, creating new larger at the same place and resizing ocfs2 file system. But I noticed  I couldn't create new partition using fdisk with start on 63 sector but on 2048 instead.

Such behaviour can be explained by versions of fdisk. Older fdisk used dos disk label by defaul, newer doesn't. So, using

# fdisk -c=dos /dev/name_of_device

has solved the issue.

Wednesday, March 26, 2014

Dual boot of Windows and Linux. How to repair Windows loader after GRUB ?

If you've accidently destroyed/overwritten Master Boot Record of your hard disk installing Linux along with existing Windows, don't worry. Just log in as root to Linux and go to the boot partition. Here you can find file backup.mbr. That's backup of your MBR before GRUB overwrites it. Do the following:

1. Create new mbr copy (just in any case)

# dd if=/dev/ of=/boot/new_mbr_copy bs=1 count=512

2. Restore original MBR

# dd if=/boot/backup.mbr of=/dev/

Now you're able to boot Windows only, not Linux. In order to boot Linux, just install as an option EasyBCD boot loader, configure it and remember: in the future one should confugure Linux boot loader to be installed to it's boot partition only.

That's all

Monday, March 17, 2014

BLKRRPART: Device or resource busy - Linux error or similar message

Kernel can't permit you to explore newly added partitions without complete reboot of server. There are several ways to resolve it:

1.

partprobe [device]

2.

echo 1 > /sys/block//device/rescan

3.

hdparm -z \

4. etc.

After that you're able to create filesystem or use newly added partitons as you wish.