mount file system storage on linux using cifs

mount -t cifs -o username<username>,password=<password>,domain=<domain_name> //fqdn.com:/directory /<local_mount_point>

Advertisements

Full column width in PowerCLI

In order to view the full column output in PowerCLI we need to format table appropriately e.x.

PS C:\> Get-VM  | Format-Table -AutoSize -Wrap

Format-Table
Formats the output as a table.

-AutoSize [<SwitchParameter>]
Adjusts the column size and number of columns based on the width of the data. By default, the column size and number are determined by the view.

-Wrap [<SwitchParameter>]
Displays text that exceeds the column width on the next line. By default, text that exceeds the column width is truncated.

Expand Logical Volume in Red Hat VMware

After adding a separate disk run to verify if the space was added:

  1. fdisk -l
  2. create a new partition fdisk /dev/sdb
    1. p – to print current partition table
    2. n – to create a new partition
    3. p – for primary
    4. 1 – depending on the output of the partition table output
    5. press return two times to accept the defaults (first and last sector)
    6. t – to change the system’s partition ID
    7. 8e – to change to Linux LVM
    8. w – to write the changes
  3. restart VM
  4. fdisk -l – to verify that partition was successfully created
  5. convert a partition to physical volume
    $ pvcreate /dev/sdb1
    Physical volume “/dev/sdb1” successfully created
  6. Extend current volume group
    vgextend rhel /dev/sdb1
    Volume group “rhel” successfully extended
  7. Run vgdisplay to verify if free space was added
    vgdisplay rhel | grep “Free”
    Free  PE / Size       4095 / 16.00 GiB
  8. extend logical volume with free space
    lvextend -l +100%FREE /dev/rhel/root
    Extending logical volume root to 66.00 GiB
    Logical volume root successfully resized
  9. Expand ext3 file system online inside of Logical Volume
    xfs_growfs /dev/rhel/root – Red Hat 7
    ext2online /dev/rhel/root
    resize2fs /dev/rhel/root

No Valid Subscription message from Proxmox server

You do not have a valid subscription for this server. Please visit www.proxmox.com to get a list of available options.

  1. One way of removing the message is to purchase a subscription.
  2. Modify subscrption configuration file
    1. SSH to proxmox server
    2. Create a backup of the existing subscription checkup file
      # cp /usr/share/pve-manager/ext4/pvemanagerlib.js /usr/shar e/pve-manager/ext4/pvemanagerlib.js.orig
    3. Edit pvemanagerlib.js file
      # vim /usr/share/pve-manager/ext4/pvemanagerlib.js
    4. In “checked_command” function search for if (data.status !== ‘Active’) { and change to if(false) {
    5. Save and exit the file
    6. Clear your browsing data and log back in to the proxmox server the message will not pop-up anymore.

SQL2547N while restoring database on DB2 10.5

While restoring database from DB2 9.7 to DB2 10.5 I encountered the following error:

PROBLEM

SQL2547N
The database was not restored because the backup image is from a previous release and requires rollforward recovery.

TAKEN ACTION:

I ran the DB2 check backup command db2ckbkp -h <backup_file_name>.001

And resulted with:
[1] Buffers processed: #################

Image Verification Complete – successful.

SOLUTION:

To resolve the problem a new OFFLINE backup is needed, power down your db instance and take a new backup.

Setup Proxy in SUSE/VCSA

To setup proxy manually in VCSA 5.5 login as root and look into the following file:

/etc/sysconfig/proxy

PROXY_ENABLED=”yes”

HTTP_PROXY=”http://<IP address or FQDN>:<port_number>”

HTTPS_PROXY=”http://<IP address or FQDN>:<port_number>”

FTP_PROXY=”http://<IP address or FQDN>:<port_number>”

NO_PROXY=”localhost, 127.0.0.1″

 

If you need to authenticate via proxy

Create a file in your home directory,

/root/.curlrc with permissions 644

and contain the following:

# Proxy credentials

proxy-user = “<username>:<password>”

source the file to apply the changes

source /root/.curlrc

 

openssl verify error 20 at 0 depth lookup:unable to get local issuer certificate

When testing my certificate against intermediate and root certificate I received the following error: error 20 at 0 depth lookup:unable to get local issuer certificate. The issue is probably related to the chain of the certificate so we need to create reliable chain.

  1. My certificate needs to be merged with intermediate certificate into one file:
    $ cat intermediate.pem cert.pem > combined.pem
  2. Then we can test it using openssl verify command:
    $ openssl verify -CAfile rootcert.pem combined.pem

Constant RDP disconnects from Windows 2012 on VMware

Running Windows Server 2012 virtual machine on VMware ESXi hypervisor and receive constant disconnects through RDP.

Checked the logs and found out e1qexpress which indicates incompatibility of virtualNIC
Power down the machine, remove existing network interface and add a new one based on VMXNET3.
Bring the machine up and Windows should automatically apply the changes.