Thursday, February 20, 2014

Kernel boot

Hi Friends,

I have a query, can we make second kernel of hp ux and Redhat Linux to boot automatically if system cannot boot first kernel by its own twice or thrice. I want to avoid the manual intervention. Can there be any option? 

Love sharing 
Amit chopra 

Saturday, February 15, 2014

Lyrics of Song Kande Utte Meharma, Rahat Fateh Ali Khan Sahab

Hi Friends,

I was looking for lyrics of Kande Utte on google, it gave me only video and audio song. So decided to write the lyrics of the same. Please forgive me for my writing mistakes if I do while writing and it is just for reference. Writing the lyrics as i did not find them over net.

Mujhe Maaf kijiyega agar main galat likh ra hu ya sun ne mein galti kari ho to.


utte utte kande utte,
kande utte utte kande utte khadi,
oh mainu teriyan udeekan kande utte
mainu teriyan udeekan kande utte............. thrice

kande utte meharma ve, main te kado di khadi ....... 4
dil vich shonk milan da, nehri ishq di chadi.
chadi ve, dil vich shonk milan da nehri ishq di chadi...
kande utte meharma ve, haye...
kande utte meharma ve, main te kado di khadi
kande utte utte
kande utte..

mainu teriya udeekan kande utte... 3

teri deed ta chah..
teri deed da chaaah chaah..
teri deed da aj chah, aj vakte nigah nikle mera saah takde takde ....... 2
mere beparwah hun aa vih ja, .....2
thak gai hai nigah takde takde.....
Mainu teriya udeeka kande utte...3

Kande utte meharma ve,

 ishq aaap vih awallah, aede kam vih awahle, ..... 2
Jide pesh pe janda, kakh chad da ni palle... palle ...
Bus bohot buri nehri ishq di,
bohot buri nehri ishq di,
Bohot buri nehri ishq di.......

Agg Da daaru Meet Paani, Ishq da jaaru Keda, .... 2
Agg te saaaade takhte taane, Ishq saade dil mera....

Bohot buri Nehri Ishq di
Bohot buri Nehri Ishq di chadi...
Bohot Buri Bus Bohot buri Nehri....

Dil vich shonk milan da nehri ishq di chadi....
 
Mainu Maut to dara k kadhya muh na to mod,
Main ta nitti hai Namaz, meri neet na tu tod, 
Mainu Maut to dara k kadhya muh na to mod,
Main ta nitti hai Namaz, meri neet na tu tod,

Jind Yaar de hawale, ankh jide nal ladi,
ladi ve,  Jind Yaar de hawale, ankh jide nal ladi,
kande Utte Meharma ve, main te kado di khadi...

utte Utte Kande utte...





Thanks and Love Sharing
Amit Chopra

 


Saturday, February 8, 2014

Creating LVM SNAPSHOT REDHAT LINUX

 Hi Friends,

Today tried to create and learn about LVM Snap shot, yes the same process is going on, Had some questions in my mind, looking for their answers as well.

1. Decided the size of Snap shot LV comparing the size of my root file system.
2. Yes, The root Logical volume or root file system can be backed up or taken as a snap shot. below is the process.
3. The size of my root File system was 8.8 G, so decided to take some more space compared to it for root snapshot.

[root@localhost tmp]#
[root@localhost tmp]# lvcreate -L 100M -s -n tmpfilesystem /tmp
  "/tmp": Invalid path for Logical Volume
  The origin name should include the volume group.
  Run `lvcreate --help' for more information.
[root@localhost tmp]# lvcreate -L 15G -s -n rootlv /dev/mapper/VolGroup-lv_root
  Logical volume "rootlv" created
[root@localhost tmp]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       50G  8.8G   38G  19% /
tmpfs                 935M  228K  935M   1% /dev/shm
/dev/sda1             485M   38M  422M   9% /boot
/dev/mapper/VolGroup-lv_home
                       50G  180M   47G   1% /home
/dev/mmcblk0p1        953M  148M  806M  16% /media/7C82-B9E9
[root@localhost tmp]# mkdir /backupofroot
[root@localhost tmp]# lvs
  LV      VG       Attr      LSize  Pool Origin  Data%  Move Log Cpy%Sync Convert
  lv_home VolGroup -wi-ao--- 50.10g                                             
  lv_root VolGroup owi-aos-- 50.00g                                             
  lv_swap VolGroup -wi-ao---  3.91g                                             
  rootlv  VolGroup swi-a-s-- 15.00g      lv_root   0.00                         
[root@localhost tmp]#
[root@localhost tmp]# mount /dev/mapper/VolGroup-rootlv /backupofroot
[root@localhost tmp]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       50G  8.8G   38G  19% /
tmpfs                 935M  228K  935M   1% /dev/shm
/dev/sda1             485M   38M  422M   9% /boot
/dev/mapper/VolGroup-lv_home
                       50G  180M   47G   1% /home
/dev/mmcblk0p1        953M  148M  806M  16% /media/7C82-B9E9
/dev/mapper/VolGroup-rootlv
                       50G  8.8G   38G  19% /backupofroot
[root@localhost tmp]#


It took only one second to create the snap shot, now question arises :-

1. Can it replace the real root LV?, like if i want to boot the system with this LV then can i ?
2. How we can use this snap shot, What can or could be the scenerio?
3. Is it occupying its own space that is the space Have been allocated to it? or it is showing only a virtual space!
4. because as it is observed above the space is same as the original File System...
Ans :- It showed the same size as real root lv but at back end the 15 GB space, which was mentioned while create the snap shot lv was only used from the VG.

5. it will be better if we create a snapshot of any LV on other VG instead of using the same VG?

[root@localhost tmp]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       50G  8.8G   38G  19% /
tmpfs                 935M  228K  935M   1% /dev/shm
/dev/sda1             485M   38M  422M   9% /boot
/dev/mapper/VolGroup-lv_home
                       50G  180M   47G   1% /home
/dev/mmcblk0p1        953M  148M  806M  16% /media/7C82-B9E9
/dev/mapper/VolGroup-rootlv
                       50G  8.8G   38G  19% /backupofroot
[root@localhost tmp]#
[root@localhost tmp]#
[root@localhost tmp]# umount /backupofroot/
[root@localhost tmp]# lvremove /dev/mapper/VolGroup-rootlv
Do you really want to remove active logical volume rootlv? [y/n]: y
  Logical volume "rootlv" successfully removed
[root@localhost tmp]#
[root@localhost tmp]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  9
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               297.60 GiB
  PE Size               4.00 MiB
  Total PE              76185
  Alloc PE / Size       26625 / 104.00 GiB
  Free  PE / Size       49560 / 193.59 GiB
  VG UUID               RHPHE2-Iq5r-wGPk-pUeV-oVS5-LTtW-Jbw0bQ
  
[root@localhost tmp]#
[root@localhost tmp]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  9
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               297.60 GiB
  PE Size               4.00 MiB
  Total PE              76185
  Alloc PE / Size       26625 / 104.00 GiB
  Free  PE / Size       49560 / 193.59 GiB
  VG UUID               RHPHE2-Iq5r-wGPk-pUeV-oVS5-LTtW-Jbw0bQ
  
[root@localhost tmp]# lvcreate -L 15G -s -n rootlv /dev/mapper/VolGroup-lv_root
  Logical volume "rootlv" created
[root@localhost tmp]# mount /dev/mapper/VolGroup-rootlv /backupofroot
[root@localhost tmp]# vgs
  VG       #PV #LV #SN Attr   VSize   VFree 
  VolGroup   1   4   1 wz--n- 297.60g 178.59g
[root@localhost tmp]# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
              ext4     50G  8.8G   38G  19% /
tmpfs        tmpfs    935M  228K  935M   1% /dev/shm
/dev/sda1     ext4    485M   38M  422M   9% /boot
/dev/mapper/VolGroup-lv_home
              ext4     50G  180M   47G   1% /home
/dev/mmcblk0p1
              vfat    953M  148M  806M  16% /media/7C82-B9E9
/dev/mapper/VolGroup-rootlv
              ext4     50G  8.8G   38G  19% /backupofroot
[root@localhost tmp]#

4.

Please share your thoughts and views and help.

Love Sharing
Amit Chopra

Friday, December 13, 2013

Networker Client Configuration New (8.0.0.1 and NMSAP) on HP UX

Hi Friends,

Client Configuration of Networker and NMSAP module on HP UX or Linux or Solaris server.


1.       For our SAP server (10.2.5.X) series, we don’t need to open any port.
2.       Networker (8.0.0.1) and NMSAP (4.5) latest package.
3.       Install these two (first Networker and then NMSAP). Avoid Storage and Server binary package while installing. User rpm/swinstall -s/ pkgadd.
4.       Once installed, start the networker services /sbin/init.d/networker start
5.       Copy the /opt/networker/nsrsapsv.cfg from any working server to new one where we are configuring.
6.       Change the SID as per the new server’s SID in nsrsapsv.cfg file, Copy the same file to nsrsapsv_barch.cfg file and write brarchive.
7.       vi /nsr/res/servers (write FQDN and hostname of the backup server).
8.       cd /oracle/SID/112_64/dbs/
edit initSID.utl and initSID.sap file.
9.       Need to verify the colored part carefully. Permission too.
# grep -v "^#" initSID.utl
parallelism = 16
pool = DD UNIX
server = ABC
client = XYZ
debug_level = 3
nsr_debug_msg = yes
verbose = yes
retry_count = 3
arch_backint_log = /nsr/applogs/ar_backint.log.raw
backint_log =/nsr/applogs/backint.log.raw
NSR_DEBUG_DIR = /nsr/applogs
ps_exclude_backup_bi_run_nums = 2
ps_exclude_archive_bi_run_nums = 1;2
#
# grep -v "^#" /oracle/SID/112_64/dbs/initSID.sap
backup_mode = all
restore_mode = all
backup_type = online
backup_dev_type = util_file
backup_root_dir = /oracle/SID/sapbackup
stage_root_dir = /oracle/SID/sapbackup
compress = no
compress_cmd = "compress -c $ > $"
uncompress_cmd = "uncompress -c $ > $"
compress_dir = /oracle/SID/sapreorg
archive_function = copy_delete_save
archive_copy_dir = /oracle/SID/sapbackup
archive_stage_dir = /oracle/SID/sapbackup
tape_copy_cmd = cpio
disk_copy_cmd = copy
stage_copy_cmd = rcp
pipe_copy_cmd = rsh
cpio_flags = -ovB
cpio_in_flags = -iuvB
cpio_disk_flags = -pdcu
dd_flags = "obs=64k bs=64k"
dd_in_flags = "ibs=64k bs=64k"
saveset_members = 1
copy_out_cmd = "dd ibs=8k obs=64k of=$"
copy_in_cmd = "dd ibs=64k obs=8k if=$"
rewind = "mt -f $ rew"
rewind_offline = "mt -f $ offl"
tape_pos_cmd = "mt -f $ fsf $"
tape_size = 100G
exec_parallel = 0
tape_address = /dev/rmt/0mn
tape_address_rew = /dev/rmt/0m
volume_archive = (SIDA01, SIDA02, SIDA03, SIDA04, SIDA05,
                  SIDA06, SIDA07, SIDA08, SIDA09, SIDA10,
                  SIDA11, SIDA12, SIDA13, SIDA14, SIDA15,
                  SIDA16, SIDA17, SIDA18, SIDA19, SIDA20,
                  SIDA21, SIDA22, SIDA23, SIDA24, SIDA25,
                  SIDA26, SIDA27, SIDA28, SIDA29, SIDA30)
volume_backup = (SIDB01, SIDB02, SIDB03, SIDB04, SIDB05,
                 SIDB06, SIDB07, SIDB08, SIDB09, SIDB10,
                 SIDB11, SIDB12, SIDB13, SIDB14, SIDB15,
                 SIDB16, SIDB17, SIDB18, SIDB19, SIDB20,
                 SIDB21, SIDB22, SIDB23, SIDB24, SIDB25,
                 SIDB26, SIDB27, SIDB28, SIDB29, SIDB30)
expir_period = 30
tape_use_count = 100
util_par_file = /oracle/SID/112_64/dbs/initGRD.utl
#
# ls -ltr
total 32
-rw-rw-rw-   1 root       sys             47 Dec 12 19:52 servers
drwx------  12 root       sys           8192 Dec 12 19:52 nsrladb
#
# cat servers
XYZ
XYZ.XYZ.XYZ.IN
# pwd
/nsr/res
#
# grep -v "^#" nsrsapsv.cfg
BR_EXEC=brbackup
ORACLE_HOME=/oracle/SID/112_64
NLS_LANG = AMERICAN_AMERICA.US7ASCII
SAP_BIN=/usr/sap/SID/SYS/exe/run
SAPBACKUP=/oracle/SID/sapbackup
ORACLE_SID=SID
ORACLE_BIN=/oracle/SID/112_64/bin
SAPARCH=/oracle/ID/saparch
SAPREORG=/oracle/SID/sapreorg
SAPTRACE=/oracle/SID/saptrace
SAPCHECK=/oracle/SID/sapcheck
PATH=/oracle/SID/112_64/bin:.:/oracle/SID:/usr/sap/SID/SYS/exe/run:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/ipf/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/sas/bin:/opt/graphics/common/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/sec_mgmt/bastille/bin:/opt/caliper/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/perf/bin:/usr/contrib/kwdb/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/sentinel/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/langtools/bin:/opt/wlm/bin:/opt/gwlm/bin:/opt/networker/bin
LD_LIBRARY_PATH=/usr/sap/SID/SYS/exe/run:/oracle/SID/112_64/lib
NSR_JOBD_CONNECTION_TIMEOUT=160
#
-rw-r--r--   1 root       sys           6988 Dec 12 20:01 nsrsapsv.cfg
-rw-r--r--   1 root       sys           6989 Dec 12 20:02 nsrsapsv_brarch.cfg
# pwd
/opt/networker
#
-rwxr-xr-x   1 orasid     dba          28048 Dec 12 20:08 initSID.sap
-rw-r--r--   1 root       sys          13658 Dec 12 20:10 initSID.utl
-rw-r-xr-x   1 orasid     dba           1883 Dec 12 20:14 initSID.ora
# pwd
/oracle/SID112_64/dbs
#
# ndd -get /dev/tcp tcp_keepalive_interval
600000

#
Now we can start the backup of the server through Networker. 

Love Sharing 
Amit Chopra
 


Wednesday, December 11, 2013

Duplicate Mount Point in df output

Hi Friends,

Today we got an oppurtunity to work on different problem, which we have not faced in last 3 years. the output of df -h was showing two enteries of a same mount point. below is an example :-


[root@ ~]# df

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VG00-LogVol00
                     198384608  13753896 174390712   8% /
/dev/sda1               194442     17776    166627  10% /boot
tmpfs                 17425156         0  17425156   0% /dev/shm
xyz:/tools          67291072  57243200   6629632  90% /tools
10.x.x.x:/fs1_user
                     2114715648 648047488 1466668160  31% /users
10.x.x.y:/fs2_DVTools
                     1586036736 236312640 1349724096  15% /dvtools
10.x.x.x:/fs1_user
                     2114715648 648047488 1466668160  31% /users
[root@ ~]#

even when we were trying to un mount the same and then mount it with mount -a or with giving complete path (this was the case of nfs FS). it ws again and again showing two enteries of the same mount point. It was not an issue but it was a new thing. Users were easily and very much able to access the files.

1. we cheched fstab, it was fine and correct.
2. we checked messages /var/log/messages. there were no message for that.
3. we checked /etc/mtab, It was having dual enteries of same Mount points.
4. so then we think of unmounting the file system and enforcing users to release the same with fuser -kuc /users and then again umounting the same FS.
5. The above thing we did four times but still the FS /users were showing file system busy.
6. Sixth time we did it again fuser -kuc /users, suddenly our session got disconnected and on relogin Network was un reachable. Network timed out error came.
7. We at the same time contacted DC team for helping us with DRAC IP or performing

/etc/init.d/sshd status

this was giving stopped, service dead.. but PID exist.

we ask and guid him to restart the SSHD services and then we were able to open connection over putty.

/etc/init.d/sshd start

8. Now on mount -a, the File system mounted with proper output i.e. with single output of File system.

After above steps, things come back to normal.


Un mounting once the same file system will not work. We need to unmounts the same FS twice or thrice or more.
We may need also to use fuser –kuc but, it may also lead to stopping of SSHD server. so network will not be reachable. So we should and have to be ready with DRAC IP or server support from LOCAL IT or if from VM machine or from DRAC.
After starting the SSHD services back. The file system mounted correctly.
No issues were in Packages, FSTAB.
         

 
[root@ ~]# df -hT

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/VG00-LogVol00
              ext3    190G   14G  167G   8% /
/dev/sda1     ext3    190M   18M  163M  10% /boot
tmpfs        tmpfs     17G     0   17G   0% /dev/shm
xzy:/tools   nfs     65G   55G  6.4G  90% /tools
10.x.x.y:/fs2_DVTools
               nfs    1.5T  226G  1.3T  15% /dvtools
10.x.x.x:/fs1_user
               nfs    2.0T  620G  1.4T  31% /users
[root@ ~]# cat /etc/fstab
/dev/VG00/LogVol00      /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VG00/LogVol01      swap                    swap    defaults        0 0
xyz:/tools /tools nfs defaults 1 2
 .....:/fs2_DVTools       /dvtools        nfs     defaults        1 2
....:/fs1_user  /users                  nfs     defaults        1 2
[root@ ~]# cat /etc/mtab
/dev/mapper/VG00-LogVol00 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sda1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
:/tools /tools nfs rw,addr= 0 0
:/fs2_DVTools /dvtools nfs rw,addr= 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
:/fs1_user /users nfs rw,addr= 0 0
[root@~]#


Cheers Happy Sharing
Amit Chopra