Prasad Koyi

001-347-349-KOYI (5694)

Repository Server to get updates over the local network.

Repository Server to get updates over the local network.

Copy repository files:

Create mountpoint to repo

zfs create rpool/export/IPSREPO
zfs set mountpoint=/export/IPSREPO rpool/export/IPSREPO
zfs set -o atime=off rpool/export/IPSREPO
zfs set atime=off rpool/export/IPSREPO
zfs get atime rpool/export/IPSREPO

Download packages and unzip in to /var/pkgrepo.
mkdir -p /var/pkgrepo
unzip -qq sol-11_3-repo_1of5.zip -d /var/pkgrepo
unzip -qq sol-11_3-repo_2of5.zip -d /var/pkgrepo
unzip -qq sol-11_3-repo_3of5.zip -d /var/pkgrepo
unzip -qq sol-11_3-repo_4of5.zip -d /var/pkgrepo
unzip -qq sol-11_3-repo_5of5.zip -d /var/pkgrepo
cd /var/pkgrepo
chmod 755 install-repo.ksh
./install-repo.ksh -d /export/IPSREPO -c

update SRU (Support Repository Updates):

unzip -qq p22168727_1100_SOLARIS64.zip -d /var/pkgrepo/SRU14.6
./install-repo.ksh -d /export/IPSREPO -c

Set Publisher
pkg set-publisher -G '*' -M '*' -g file:///export/IPSREPO solaris

Update repository server, if it is necessary:

pkg list -af entire
pkg update --accept entire
beadm list
shutdown -y -g0 –r

Configure and update the client using HTTP repository server:

pkg set-publisher -O http://<reposerverIP solaris
pkg publisher
pkg list -af entire
pkg update --accept entire
beadm list
shutdown -y -g0 –r

The IP <Reposerver IP>  must be replaced by IP of desired Repository Server.

Leave a comment »

Solaris 11 Proxy

Oracle support repository will use https connection. So you need to proxy accordingly.

root@PRASAD:~# export https_proxy=https://192.168.2.23:8080
root@PRASAD:~# pkg set-publisher -O https://pkg.oracle.com/solaris/support solaris
root@PRASAD:~# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F https://pkg.oracle.com/solaris/support/
root@PRASAD:~#

To make the proxy settings permanently ,just add the above lines in root user’s profile.

Oracle support repository uses secure http .So it requires certificate and keys to access the repository and this repository is exclusively available only for oracle customers who has support contract. You can download the keys and certificate from http://pkg-register.oracle.com/ – > Request Certificate – > Oracle Solaris 11 support. Once you have the certificates, just copy to /var/ssl/. directory and use below command to set publisher.

root@PRASAD:~#pkg set-publisher -k /var/pkg/ssl/pkg.oracle.com.key.pem -c /var/pkg/ssl/pkg.oracle.com.certificate.pem -g https://pkg.oracle.com/solaris/support/ –proxy http://proxy:8080 solaris

root@PRASAD:~#pkg publisher -F tsv

root@PRASAD:~#pkg info -r entire
root@PRASAD:~#

Leave a comment »

rebuild yum

1.remove error repo

2. remove _db* files

3. yum clean all

4. yum rebuilddb


port connection verification:

nc -zv host portrange

nc -vvv host port

 

 

Leave a comment »

Add Linux in to AD (AZURE)

Install packages:

yum -y install samba samba-client samba-common samba-winbind samba-winbind-clients
yum  -y  install realmd
yum  -y  install sssd
yum  -y  install krb5-workstation krb5-libs

service smb start
ps -ef|grep smb
chkconfig smb on

Note: Make sure your DNS and NTP is working:

cat /etc/resolv.conf
cat /etc/ntp.conf

Test REALM:

realm discover host.DOMAIN.COM

Add Linux host in to DOMAIN:

kinit admin@DOMAIN.COM (admin is the AD admin user)
realm join –verbose DOMAIN.COM -U ‘admin@DOMAIN.COM’

Leave a comment »

Password reset in linux

echo password | passwd username –stdin

Leave a comment »

Solaris 10 update (u8 to u11)

down load solaris10_u11_dvd.iso
Go to single user mode:

Mount iso:

#lofiadm -a /var/tmp/solaris10_u11_dvd.iso.iso /dev/lofi/1
#lofiadm
#mount -F hsfs -o ro /dev/lofi/1 /mnt

Remove old packages:
#pkgrm SUNWlucfg SUNWlur SUNWluu

Install latest LU packages:
#/mnt/Solaris_10/Tools/Installers/liveupgrade20 -nodisplay -noconsole
#cd /mnt/Solaris_10/Product
#pkgadd -d . SUNWlucfg SUNWlur SUNWluu

List BE’s available
#lustatus
HOST_zfsBE

Create New BE and upgrade:

#lucreate -c HOST_zfsBE -n HOST_zfsBE_new
#echo “autoreg=disable” > /var/tmp/no-active
#luupgrade -u -n HOST_zfsBE_new -s /mnt -k /var/tmp/no-autoreg
#lustatus
HOST_zfsBE   y y y y
HOST_zfsBE_new  y n n y

go to run level 3 make newBE as active:

#luactivate HOST_zfsBE_new

#lustatus
HOST_zfsBE   y n y y
HOST_zfsBE_new  y y n y
#go to ok prompt list BE’s at OK promt:

# boot -L

Boot with new BE:

boot -z zfsBE_new

if error araises:
#boot -F failsafe

otherwise check lustatus and verify globalzone and non-globalzones.
#lustatus
HOST_zfsBE   y n n y
HOST_zfsBE2  y y y y

Go for COFFEE

Leave a comment »

Oracle RAC

How to find Cluster Interconnect IP address from Oracle Database

UNIX:The easiest way to find the cluster interconnect is to view the “/etc/hosts” file.
1)Following are the ways to find the cluster interconnect through Oracle database: (Query X$DBI)

The following query provides the interconnect IP address registered with Oracle database:
SQL> select IP_DBI from x$DBI where PUB_DBI = ‘N’;
IP_DBI
—————-
192.168.10.11

2) This query should be run on all instances to find the private interconnect IP address used on their respective nodes.

Query GV$CLUSTER_INTERCONNECTS view
Querying GV$CLUSTER_INTERCONNECTS view lists the interconnect used by all the participating instances of the RAC database.
SQL> select INST_ID, IP_ADDRESS from GV$CLUSTER_INTERCONNECTS;

INST_ID IP_ADDRESS
———- —————-
1 192.168.10.11
2 192.168.10.12
3) ASM and Database log

We can find out the cluster interconnect used by viewing the log file of both ASM instance and the database instance.
When the ASM instance is started it registers the private interconnect used. Following is the excerpt from the ASM alert log on node 1:

Cluster communication is configured to use the following interface(s) for this instance
192.168.10.11

Similarly, the database instance also registers the private interconnect with its instance and following message is recorded in the alert log:

Cluster communication is configured to use the following interface(s) for this instance
192.168.10.11

4) CLUSTER_INTERCONNECT initialization parameter
This parameter provides Oracle with information on the availability of additional cluster interconnects. It overrides the default interconnect settings at the OS level with a preferred one.
You can view the current value of this parameter by issuing the following in SQL*Plus, connected as SYS user:
SQL> show parameter cluster_interconect

Leave a comment »

New mount point creation using VVM

prasad#vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdg01 rootdg online
c1t1d0s2 auto:sliced rootdg02 rootdg online nohotuse
c1t2d0s2 auto:none – – online invalid
c1t3d0s2 auto:none – – online invalid
c1t4d0s2 auto:none – – online invalid
c1t5d0s2 auto:none – – online invalid

prasad#/etc/vx/bin/vxdisksetup -i c1t4d0 format=sliced
prasad#vxdg init catalog catalog01=c1t4d0 cds=off
prasad#vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdg01 rootdg online
c1t1d0s2 auto:sliced rootdg02 rootdg online nohotuse
c1t2d0s2 auto:none – – online invalid
c1t3d0s2 auto:none – – online invalid
c1t4d0s2 auto:sliced catalog01 catalog online
c1t5d0s2 auto:none – – online invalid

prasad#/etc/vx/bin/vxdisksetup -i c1t5d0 format=sliced
prasad#vxdg -g catalog adddisk catalog02=c1t5d0
prasad#/etc/vx/bin/vxdisksetup -i c1t3d0 format=sliced
prasad#vxdg -g catalog adddisk catalog03=c1t3d0
prasad#vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdg01 rootdg online
c1t1d0s2 auto:sliced rootdg02 rootdg online nohotuse
c1t2d0s2 auto:none – – online invalid
c1t3d0s2 auto:sliced catalog03 catalog online
c1t4d0s2 auto:sliced catalog01 catalog online
c1t5d0s2 auto:sliced catalog02 catalog online

prasad#vxassist -g catalog make catavol 400G catalog01 catalog02 catalog03
prasad#mkfs -F ufs /dev/vx/rdsk/catalog/catavol 400g

prasad#mount -F ufs /dev/vx/rdsk/catalog/catavol /data_vol
rsync command:

/usr/local/bin/rsync -ltrvgop prasad1:/data/* /data_vol

Leave a comment »

script to find write error tapes NBU

ssh <media server>  /var/tmp/pp_tape_error.sh > /tmp/tap_errr.txt

(cat /tmp/tap_errr.txt|awk ‘{print $6,$1}’|while read aa bb
do
anna=`/usr/openv/netbackup/bin/admincmd/nbemmcmd -listmedia -mediaid $bb|awk ‘/Media Status:/ {print $1,” “,$2,” “,$3}’`
bnnb=`/usr/openv/netbackup/bin/admincmd/nbemmcmd -listmedia -mediaid $bb|awk ‘/Kilobytes:/ {print $1,” “,$2}’`
/usr/bin/echo ” $anna \t $bnnb ”
done) > /tmp/tap_errr_dat.txt

/usr/bin/paste -d’ ‘ /tmp/tap_errr.txt /tmp/tap_errr_dat.txt > /tmp/tp_errr_dat11.out
cat /tmp/tp_errr_dat11.out

Leave a comment »

TSM TAPE process

TSM DB:extend

tsm>select  copy1_name,alloc_space_mb from dbvolumes

tsm>define dbvolume <path of files>  formatsize=in MB (1024 for 1GB)

tsm>extend   db

—————

Tape in the library
to
Not Mountable (after you eject them)
to
Courier (after you give them to the courier)
to
Vault (when it arrives at the offsite vault)
to
Vault Retrieve (it goes to this state automatically when no valid data on tape, needs to be retrieved to be reused)
to
Courier Retrieve (the courier is bringing it back)
to
Onsite Retrieve (its onsite)
to
You checkin the vols (?)

if tapes returned from off site and not able to turn as scratch.

checkin as private  and use move drm on each media

select volume_name,stgpool_name,pct_utilized,status,access,location from volumes where access=’OFFSITE’ and location=’COURIER’

checkin

q req
reply <id>

move drmedia <media>  wherestate=courierretrieve tostate=onsiteretrieve

* Find OFFsite tapes:

query drm * wherest=mountable

* Eject OFFsite tapes:

move drm * wherestate=mountable tostate=vault remove=bulk

Leave a comment »