This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Friday, November 3, 2017

SOLVED : pam_ldap: error trying to bind as user

Friday, November 03, 2017
If you are getting error below after giving the correct password

Nov  2 03:56:42 testserver sshd[30173]: pam_ldap: error trying to bind as user "uid=testuser,ou=People,dc=test,dc=testdomain,dc=com" (Invalid credentials)

Nov  2 03:56:43 testserver sshd[30173]: Failed password for testuser from 10.17.0.3 port 51306 ssh2

Reason: Password is not syncing properly to all client server during the scheduled window

Solution : Restart the slapd service on LDAP server & it will sync to all server.

#/etc/init.d/slapd restart

Hope it helps.

Thursday, November 2, 2017

How to create New Volume Group in RHEL Cluster?

Thursday, November 02, 2017 0

Follow the below steps to create Volume Group in RHEL Cluster

1. Add the disk to the server.

2. Pvcreate the new partitions

3. Create the VG’s


vgcreate -c n -s 32M HAVG_<vg_name> /dev/mapper/mpath#p#

-s : Sets the physical extent size on physical volumes of this volume group
-c : If clustered locking is enabled, this defaults to y indicating that this Volume Group is shared with other nodes in the cluster

Creating a new Logical volume to a HA Volume group


To create a LV to a newly created volume group you have to add the hostname tag to the VG. This will permit one server in the cluster to have access to the volume group at a given time.

1. vgchange --addtag <hostname>.testdomain.com HAVG_<vg_name>
2. lvcreate –L ##M –n lv-<lvname> HAVG_<vg_name>
3. mke2fs –j /dev/HAVG_<vg_name>/lv-<lvname>


Create mountpoints on all nodes in the cluster. Do not add to /etc/fstab

1. mkdir <mount_point>
2. mount /dev/HAVG_<vg_name>/lv-<lvname> <mount_point>
3. Change permissions on mountpoint.

Wednesday, November 1, 2017

How to get the Old Hardware VM Version list with Powercli command?

Wednesday, November 01, 2017 0
Execute the  below command with the cluster name and required hardware version that all.

Get-Cluster "Cluster Name" | Get-VM | Get-View | Where {$_.Config.Version -ne "vmx-09"} |  Select Name

Hope it is useful.

How to Add and Remove Object Tags in Logical Volume Manager (Linux Server)?

Wednesday, November 01, 2017 0

Add or Delete tags, below steps will be used.

To add or delete tags from physical volumes, use the --addtag or --deltag option of the
 pvchange command.                                                                          
To add or delete tags from volume groups, use the --addtag or --deltag option of the 
vgchange or vgcreate commands.
To add or delete tags from logical volumes, use the --addtag or --deltag option of the 
lvchange or lvcreate commands.    

As of the Red Hat Enterprise Linux 6.1 release, you can specify multiple --addtag and --deltag arguments within asingle pvchange, vgchange, or lvchange command. For example, the following command deletes the tags T9 and T10 and adds the tags T13 and T14 to the volume group VGTEST

vgchange --deltag T9 --deltag T10 --addtag T13 --addtag T14 VGTEST

How do I exclude Kernel or other packages from getting updated in RHEL while updating system via yum?

Wednesday, November 01, 2017 0

Excluding  Kernel or other packages from getting updated in RHEL while updating system via yum

The up2date command in Red Hat Enterprise Linux 4 excludes kernel updates by default. The yum in Red Hat Enterprise Linux 5  includes kernel updates by default.

 To skip installing or updating kernel or other packages while using the yum update utility in Red Hat Enterprise Linux 5 and 6 use following options:

 Temporary solution via Command line:

 # yum update --exclude=PACKAGENAME

For example, to exclude all kernel related packages:

# yum update --exclude=kernel*

To make permanent changes, edit the /etc/yum.conf file and following entries to it:

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exclude=kernel* redhat-release*                           <====

NOTE: If there are multiple package to be excluded then separate them using a single space or comma. Also, do not add multiple 


exclude= lines in the configuration file because yum only considers the last exclude entry.

To exclude 32 bit packages edit /etc/yum.conf file.

exclude=*.i?86 *.i686

Extracting the log file after an ESX or ESXi host fails with a purple screen error

Wednesday, November 01, 2017 0
To resolve this issue, extract the log file from a vmkernel-zdump file using a command line utility on the ESX or ESXi host. This utility differs for different versions of ESX or ESXi.
  • For ESX 3.x use the vmkdump utility:

    # vmkdump -l vmkernel-zdump-filename
  • For ESXi 3.5, ESXi/ESX 4.x and ESXi 5.x, use the esxcfg-dumppart utility:

    # esxcfg-dumppart -L vmkernel-zdump-filename
To extract the log file from a vmkernel-zdump file:
  1. Find the vmkernel-zdump file in the /root/ or /var/core/ directory:

    # ls /root/vmkernel* /var/core/vmkernel*
    /var/core/vmkernel-zdump-073108.09.16.1
  2. Use the vmkdump or esxcfg-dumppart utility to extract the log. For example:

    # vmkdump -l /var/core/vmkernel-zdump-073108.09.16.1
    created file vmkernel-log.1


    # esxcfg-dumppart -L /var/core/vmkernel-zdump-073108.09.16.1
    created file vmkernel-log.1
  3. The vmkernel-log.1 file is plain text, though may start with null characters. Focus on the end of the log, which is similar to:

    VMware ESX Server [Releasebuild-98103]
    PCPU 1 locked up. Failed to ack TLB invalidate.
    frame=0x3a37d98 ip=0x625e94 cr2=0x0 cr3=0x40c66000 cr4=0x16c
    es=0xffffffff ds=0xffffffff fs=0xffffffff gs=0xffffffff
    eax=0xffffffff ebx=0xffffffff ecx=0xffffffff edx=0xffffffff

    ...
  4. For troubleshooting the cause of the purple diagnostic screen, see Vmware articles.
Note: The file name created for the log in this example is vmkernel-log.1. If another file with the same name already exists, the new file is created with the number suffix incremented.

How to collect Diagnostic information for VMware Data Protection?

Wednesday, November 01, 2017 0


Purpose
VMware Technical Support routinely requests diagnostic information from you when a support request is handled. This diagnostic information contains product specific logs and configuration files from the host on which the product is run. The information is gathered using a specific script or tool for each product.

This article provides procedures for obtaining diagnostic information for VMware Data Protection (VDP)..
Resolution
To gather the VDP 5.1 logs:
  1. Open a supported browser and type:

    https://IP_addressVDP_Appliance:8543/vdp-configure/
  2. Log in with the VDP user name and password.
  3. Click the Status tab.
  4. In the Log Collector section, click Collect logs. A Save as dialogue appears that allows you to download the log bundle to the file system of the machine in which your web browser is running. The default location is the current download directory of your browser.
Note: By default the log bundle is named as LogBundle.zip, but ensure to give a unique name.
To gather the VDP 5.5.x logs:
  1. Open a web browser and type:

    https://IP_address_VDP_Appliance:8543/vdp-configure/
  2. Log in with the VDP user name and password.
  3. Click the Status tab.
  4. Depending on the type of log information you want to collect, download one of these files:
    • Log bundle:
      • Click Collect all logs to download a zip file that contains all logs from VDP services. A Save as dialog appears that allows you to download the log bundle to the file system of the machine in which your web browser is running. The default location is the current download directory of your browser.

        Note: By default, the log bundle is named as
        LogBundle.zip, but ensure to give a unique name.
    • Client logs:
      • Click Collect client logs to download an aggregated text file that contains all client failure logs.
To gather the VDP 5.8 logs:
  1. Open a web browser and type:

    https://IP_address_VDP_Appliance:8543/vdp-configure/
  2. Log in with the VDP user name and password.
  3. Click the Log collector tab.
  4. Depending on the type of log information you want to collect, download one of these files:
    • Log bundle:
      • Click All VDP Appliance logs to download a zip file that contains all logs from VDP services. A Save as dialog appears that allows you to download the log bundle to the file system of the machine in which your web browser is running. The default location is the current download directory of your browser.

        Note: By default, the log bundle is named
        LogBundle.zip, but ensure to give a unique name.
    • Client logs:
      • Click Collect client logs to download an aggregated text file that contains all client failure logs.
    • External proxy logs:
      • Click Collect external proxy logs to download an aggregated .zip file that contains all external proxy logs.

To gather the VDP 6.0 logs:
  1. Open a web browser and type:

    https://IP_address_VDP_Appliance:8543/vdp-configure/
  2. Log in with the VDP username and password.
  3. Click the Log Collector tab.
  4. Select one or more checkboxes to download log files:
    • To download all log files to a zip file, select All VDP Appliance Logs and click Download to save all log files from VDP services to a .zip file.
      The Select location for download dialog box appears.By default, the log bundle is named
      LogBundle.zip. Rename the file to a unique name.
    • To download all logs under a specific heading, select a checkbox next to a heading, and then click Download:
      • Core VDP Service
      • Management Service
      • File System Service
      • File Level Restore Service
      • Replication
      • Image Backup and Restore
    • To download log files listed under multiple headings, select the checkbox next to one of more log files, and then click Download.
    • In the Client Logs group box, click Download to download an aggregated text file which contains all client failure logs.
    • In the Configurations group box, click Download to download only VDP configuration file information.