Skip to main content

Posts

Showing posts from November, 2016

NTP server configuration peer to peer connection.

  This is the NTP peer to peer connection steps: if we have 3 NTP servers all three are interconnect to each other and  they are syncing from the internet, Here are the steps of the connection. [root@test ~]# cat /etc/ntp.conf # For more information about this file, see the man pages # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. restrict 127.0.0.1 restrict -6 ::1 # Hosts on local network are less restricted. #The subnets we want to be sink from the NTP server restrict 10.90.0.0 mask 255.255.255.0 nomodify...

Printer Configuration on Linux.

Printer configuraion on Linux ========================           Printer configuration is very easy in Linux, We need to configure a printer on a linux server and from other servers which are conneted to the printer server can able to give priouts, print jobs, etc. Configuring of the printer HPleserjet/Zebra/cannon Etc. step-1 /etc/hosts Printername IP step-2 cupsaccept printer-name——–for enabling cupsenable printer-name Step-3 configuration of RAW printer: lpadmin -p printername -E -v socket://printername:9100 -m raw To add an HP LeserJet printer that is connected to the parallel port, you would type the following command: lpadmin -p LeserJet -E -v parallel:/dev/lp1 -m Leserjet.ppd Step-4 Verify that the printer is correctly configured. lpstat -p printer-name -l Stop and start Service cupsdisable printer-name——–stop cupsenable printer-name———start Verify the system’s default printer: lpadmin -d Delete t...

VM User Issue In Unix

Note:--Some times you will get  vmuser  related issues in general VM servers. this is due to miss configurations of the file. Below are the steps to fix this issue. ======================================================= he /etc/init directory contains the configuration files. The vmware-tools script is in the /etc/init/vmware-tools.conf file. o work around this issue, you can manually start, stop, or restart VMware Tools with the commands: /etc/vmware-tools/services.sh start /etc/vmware-tools/services.sh stop /etc/vmware-tools/services.sh restart Note: You can also run the commands from the vmware-tools.conf file To verify the status of VMware Tools, use the command: status vmware-tools – Linux: /etc/vmware-tools/tools.conf Put the following into the file: [logging] log = true # Enable tools service logging to vmware.log vmsvc.level = debug vmsvc.handler = vmx # Enable new “vmusr” service logging to vmware.log vmusr.level = error vmu...

Tru 64 Disk Related Command

Tru 64 is a Old Operating system, Now a days only few organizations are using . Below are some important commands which will help you. Disk related commands: # hwmgr -show scsi SCSI DEVICE DEVICE DRIVER NUM DEVICE FIRST HWID: DEVICEID HOSTNAME TYPE SUBTYPE OWNER PATH FILE VALID PATH ————————————————————————- 72: 0 drfinnovde cdrom none 2 1 cdrom0 [2/0/0] 73: 1 drfinnovde disk none 2 1 dsk0 [4/0/0] 76: 2 drfinnovde raid none 0 1 scp0 [4/32/0] 86: 3 drfinnovde disk none 0 1 (null) 87: 4 drfinnovde disk none 0 1 (null) 88: 5 drfinnovde disk none 0 1 (null) 89: 6 drfinnovde disk none 0 1 (null) 90: 7 drfinnovde disk none 0 1 (null) 91: 8 drfinnovde disk none 0 1 (null) 93: 10 drfinnovde disk none 2 1 dsk7 [4/7/0] 94: 11 drfinnovde disk none 2 1 dsk8 [4/1/0] 95: 12 drfinnovde disk none 2 1 dsk9 [4/3/0] 96: 13 drfinnovde disk none 2 1 dsk10 [4/2/0] 112: 14 drfinnovde disk none 2 1 dsk11 [4/4/0] 113: 15 drfinnovde disk none 2 1 dsk12 [4/5/0] 114: 16 drfinnovde di...

Some VIO related Important Commands

VIO is the very important concept in AIX. VIO are the hyper-visor for the Lpars. Below are some us full commands for your reference: ==================================  fget_config -Av |grep -wE “hdisk4|hdisk8|hdisk32” (To get Lun information) ioslevel (to check the vio version) #lsvg -p rootvg #ipl_varyon -i (Will list disk name, boot device, pvid and volume grp. Where we found “yes” that will boot disk i,e boot image is install that disk. Other will be no.) #boosboot -ad /dev/hdisk4 lsvg -pv rootvg (to check the disk in rootvg) lsdev -dev hdisk4 (To check whether it is from san or local) lsdev -dev hdisk4 -vpd (Lun information with details) ie1393d@lipghmc08:~> lssyscfg -r lpar -m RSPZES10 -F name:state (It will show the vio client under vio from hmc console. output will similar to below) RSPKAMASQ11:Running RSPKAFTP11:Running RSPKAPP11:Running RSPKDSFD21:Not activate VIOCRSC10:Not activate test:~> chsysstate -r lpar -m RSPZESC10 -n VIOCESC10 -...

Root VG mirroring In AIX

If you do not mirror the root volume group, you have a single point of failure. Always mirror rootvg! I have seen too many unnecessary system rebuilds because rootvg was not mirrored. Mirroring rootvg is a straightforward process and consists of the following steps, in which we are going to mirror rootvg to a new disk called hdisk1: 1. Add hdisk1 to the rootvg for mirroring: # extendvg rootvg hdisk1 2. Use this command if all the rootvg logical volumes were created properly: # mirrorvg rootvg 3. Or (if a problem was encountered) manually mirror rootvg and do not mirror the dump device (lv00 in example): # lsvg # lsvg -l rootvg # lsvg rootvg 4. Mirror each logical volume: # for N in $(lsvg -l rootvg | grep syncd | awk ‘{print $1}’ | grep -v lv00) > do > echo $N > mklvcopy $N 2 > done 5. Sync the volume group: # syncvg -v rootvg # lsvg -l rootvg 6. Configure the boot devices: # ipl_varyon -i PVNAME BOOT DEVICE PVID VOLUME GROUP ID hdisk0 NO 00001047375ac230 00001...

Ifenslave Uses in Linux

ifenslave – Attach and detach slave network devices to a bonding device. Description ifenslave is a tool to attach and detach slave network devices to a bonding device. A bonding device will act like a normal Ethernet network device to the kernel, but will send out the packets via the slave devices using a simple round-robin scheduler. This allows for simple load-balancing, identical to “channel bonding” or “trunking” techniques used in switches. The kernel must have support for bonding devices for ifenslave to be useful. Options -a, –all-interfaces Show information about all interfaces. -c, –change-active Change active slave. -d, –detach Removes slave interfaces from the bonding device. -f Force actions to be taken if one of the specified interfaces appears not to belong to an Ethernet device. -h Display a help message and exit. -u Show usage information and exit. -v, –verbose Print warning and debug messages. -V, –version Show version information and exit. I...

Solaris Lun Related commands

cfgadm -al -o show_FCP_dev |grep fc-fabric —->Verify FC channel‘s are connected and configured. root@test:/> cfgadm -al -o show_FCP_dev |grep fc-fabric c2 fc-fabric connected configured unknown c3 fc-fabric connected configured unknown c4 fc-fabric connected configured unknown c5 fc-fabric connected configured unknown c7 fc-fabric connected configured unknown c9 fc-fabric connected configured unknown fcinfo hba-port |grep Port ————> WWN no solaris root@test:/> fcinfo hba-port |grep Port HBA Port WWN: 10000090fa1b5d9a HBA Port WWN: 10000090fa1b5d9b HBA Port WWN: 10000000c9f3a9aa HBA Port WWN: 10000000c9f3a9ab HBA Port WWN: 10000090fa1b5acc HBA Port WWN: 10000090fa1b5acd HBA Port WWN: 10000000c9f39fac HBA Port WWN: 10000000c9f39fad luxadm -e port |grep CONNECTED —————–>List the connected HBA. /devices/pci@0,600000/pci@0/pci@9/SUNW,emlxs@0/fp@0,0:devctl NOT CONNECTED /devices/pci@0,600000/pci@0/pci@9/SUNW,emlxs@0,1/fp@0,0:devctl CONNECTED /devices/pci@2,600000/S...

ASM Disk Addition(Linux)

1. Introduction ASM Disk is used by Oracle Database server. However, Unix team need to scan the new disk allocated to the server by Storage team and Label the new luns if required. Once the new disk/lun is visible in the server we will provide the details to Database Team so that they can add the disk into their Database. Implementation: Step 1: Scan the new Luns. Check how many Scsi hosts are available # ls –l /sys/class/scsi_host/ # echo “- – -” > /sys/class/scsi_host/host1/scan # echo “- – -” > /sys/class/scsi_host/host2/scan # echo “- – -” > /sys/class/scsi_host/host3/scan # echo “- – -” > /sys/class/scsi_host/host4/scan For fibre channel you have to scan like below. # echo “1” >/sys/class/fc_host/host0/issue_lip # echo “1” >/sys/class/fc_host/host1/issue_lip Step 2: Verify the new Lun with the LDEV number provided by Storage side. # multipath –ll | grep –I # /opt/osit/linux/bin/xpinfo -il | grep -i Step 3: Provide the new lun det...

Multipath Script for RHEL5/6

========================================= #!/bin/bash # # Script is created by bibhuti2sol@gmail.com # Send me mail in case of any modification of improvements I should do # TMP_DIR=”.tempdir” TMP_FILE=”.hostfile” TMP_FILE1=”.hostfile1″ rm -rf $TMP_DIR $TMP_FILE $TMP_FILE1 > /dev/null mkdir $TMP_DIR clear for i in `ls /sys/class/fc_host/` do echo -e “Adapter \t:$i” echo -e “HBA Model\t:`cat /sys/class/scsi_host/$i/model_name` `cat /sys/class/scsi_host/$i/model_desc`” echo -e “WWPN\t\t:`cat /sys/class/fc_host/$i/node_name |cut -d ‘x’ -f2`” echo -e “Port Status\t:`cat /sys/class/fc_host/$i/port_state`” echo -e “Speed\t\t:`cat /sys/class/fc_host/$i/speed`” echo -e “Driver\t\t:`cat /sys/class/scsi_host/$i/fw_version`” echo -e “Firmware\t:`cat /sys/class/scsi_host/$i/driver_version`” echo -e “\n” done echo -e “Checking multipath device redundancy..\n” for k in `multipath -ll -v1` do multipath -ll $k >> $TMP_DIR/$k done for i in `ls /sys/class/fc_host/` do for j in `systool -v...

Reboot Pre-Checks Script UNIX

#!/usr/bin/sh LINUX_CMDS () { EMAIL=bibhuti2sol@gmail.com TODAY=`date +%d%b%Y` ECHO_CMD=”/bin/echo -e” } CHECK_UID () { USERID=`id -u` if [ $USERID -eq 0 ] then continue; else $ECHO_CMD “\n\t Please Run this script as root !! \n\n” exit; fi } OS_DETAILS () { $ECHO_CMD “\n\t UNAME Output” >> $CHECK_LIST $ECHO_CMD ” =================================================” >> $CHECK_LIST uname -a >> $CHECK_LIST 2>&1 $ECHO_CMD “\n\t OS Release” >> $CHECK_LIST $ECHO_CMD ” =================================================” >> $CHECK_LIST cat /etc/*release >> $CHECK_LIST 2>&1 } NFS_DETAILS () { $ECHO_CMD “\n\n\tGiven below is NFS mounts” >> $CHECK_LIST $ECHO_CMD ” ==========================================\n” >> $CHECK_LIST /usr/sbin/showmount -a >> $CHECK_LIST 2>&1 $ECHO_CMD “\n\n\tGiven below is NFS exports” >> $CHECK_LIST $ECHO_CMD ” ==========================================\n” >> $CHECK_LIST /u...

HP SMART ARRAY CLI COMMANDS

Show configuration : /opt/hp/hpssacli/bin/hpssacli ctrl all show config Controller status /opt/hp/hpssacli/bin/hpssacli ctrl all show status Show detailed controller information for all controllers /opt/hp/hpssacli/bin/hpssacli ctrl all show detail Show detailed controller information for controller in slot 0 /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 show detail Rescan for New Devices /opt/hp/hpssacli/bin/hpssacli rescan Physical disk status /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd all show status Show detailed physical disk information /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd all show detail Logical disk status /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld all show status View Detailed Logical Drive Status /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 show Create New RAID 0 Logical Drive /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ld drives=1I:1:2 raid=0 Create New RAID 1 Logical Drive /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ld dri...

Failed Disk Status on HP-proliant servers

#hpacucli controller all show config———->to See the failed disk in HP proliant server Smart Array P410i in Slot 0 (Embedded) (sn: 500143802590F6C0) logicaldrive 1 (558.9 GB, RAID 1, Interim Recovery Mode) array A (SAS, Unused Space: 0 MB) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 600 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 600 GB, Failed) SEP (Vendor ID PMCSIERA, Model SRC 8x6G) 250 (WWID: 500143802590F6CF) [root@TEST:/root]# hpacucli ctrl slot=0 show Smart Array P410i in Slot 0 (Embedded) Bus Interface: PCI Slot: 0 Serial Number: 500143802590F6C0 Cache Serial Number: PBCDH0CRH1Z6R3 RAID 6 (ADG) Status: Disabled Controller Status: OK Hardware Revision: C Firmware Version: 6.60 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Ca...

HP proliant SERVER hardware commands

to check the failed disk, adapter, any physical component on hp prolient server use the below important command. # hpacucli controller all show config———-to See the failed disk in HP proliant server  Smart Array P410i in Slot 0 (Embedded) (sn: 500143802590F6C0) logicaldrive 1 (558.9 GB, RAID 1, Interim Recovery Mode) array A (SAS, Unused Space: 0 MB) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 600 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 600 GB, Failed)====>indicating the faild drive SEP (Vendor ID PMCSIERA, Model SRC 8x6G) 250 (WWID: 500143802590F6CF) [root@TEST:/root]# hpacucli ctrl slot=0 show Smart Array P410i in Slot 0 (Embedded) Bus Interface: PCI Slot: 0 Serial Number: 500143802590F6C0 Cache Serial Number: PBCDH0CRH1Z6R3 RAID 6 (ADG) Status: Disabled Controller Status: OK Hardware Revision: C Firmware Version: 6.60 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 3 secs Surface Scan Mode: Idle Queue Depth: Autom...

Monthly Mksys OS backup AIX

Step-1 Estimate Backup: ================================================================= df -tk `lsvgfs rootvg` | awk ‘{total+=$3}\ END {printf “Estimated mksysb size: %d bytes, %.2f GB\n”, total*1024, total/1024/1024}’ It will give you the estimated time of backup, Step-2 Backup Command: backupios -file /home/padmin/28August2013_TESTVIOI_mksysb ===============> VIO Backup Command mksysb -e -i -X /mksysb/10Nov2013_server-1_mksysb============================>AIX server Backup command Step-3 ================= Pre -checks: => check NFS FS size(Backup file) and root vg FS sizes . Note : if any FS Full Zip old logs => To check performance of the server => To check root VG FS => To check /etc/exclude ========================== Step-4 ================================ server-1 mksysb -e -i -X /mksysb/02March2014_server-1_mksysb server-2 mksysb -e -i -X /mksysb/02March2014_sever-2_mksysb Post checkups: ==> check the process running o...