Thursday, 30 June 2016

Creating & extending a file system with HP-UX LVM

Step 1: Scan the disk & make it visible on the server

#insf -e (create device files for any newly added devices)
#ioscan -fnC disk

Step 2: Create a physical volume

#diskinfo /dev/rdisk/disk210 (check disk size)
#pvcreate /dev/disk/disk210

Step 3: Create the volume group

#mkdir /dev/vgignite
#ll /dev/*/group (check for currently create group special device files)
#mknod /dev/vgignite/group c 128 0x010000 (create new group device special file specifying the major & minor numbers as 128 &0x010000 )

The major number signifies the type of device file & minor number will uniquely identify the device.

#vgcreate -V 2.0 -s 64 -S 4t /dev/vgignite /dev/disk/disk210

Step 4: Create a logical volume

#lvcreate -L 256000 -n lv_ignite -s y /dev/vgignite (size is in MB)
#lvdisplay /dev/vgignite/lv_ignite

Step 5: Create & mount the file system

#newfs -F vxfs -o largefiles /dev/vgignite/rlv_ignite
#mount /dev/vgignite/lv_ignite /ignite_depot


To extend the file system:

Step 1: Extend the logical volume:

#lvextned -L 512000 -n lv_ignite /dev/vgignite (size is in MB)

Step 2: Extend the file system:

#fsadm -F vxfs -b 512000M  /ignite_depot

Reset HP Proliant blade server from ILO CLI

Occasionally there may be a need to reboot a hung HP Proliant blades & the ILO GUI may not be available.
In order to reset the system from CLI you can use the following command:

reset /system1 

Given below is a list of possible commands

>reset /system1  (Resets the server)
>reset /system1 hard  (Performs a coldstart reboot of the server)
>reset /system1 soft  (Performs a warmstart reboot of the server)
>show /system1 enabledstate  (Shows the current power state, where enabled is powered on and disabled is powered off.)

In case you wish to reset the ILO itself you can do so via the following command sequence:

>cd /map1
>reset

The above holds good for ILO 2/3.

Monday, 13 June 2016

Fixing vsphere web client start up due flash player issues

Sometimes vpshere web client may not start after an installation.
This can be caused due to a variety of reasons but the cause discussed here is non-start up due to problems with adobe flash player.



This particular case happened due to an outdated version of adobe flash player.

The default install had version 11.3 but for vsphere web client to function correctly we need a version that is 11.5 or greater.

The solution was to install the latest version of adobe flash player.

Installing Vcenter 5.5



In order to centrally manage ESXi hosts we use Vcenter software. It is available in a variety of editions depending on additional features.

The installation pre-requisites can be found on VMwares' website.

In this lab we are installing Vcenter server 5.5 on a Windows server 2012.

To start load the installation media in the CD/DVD drive.



Navigate to the drive & double click on autorun:




This will bring up the installation wizard. From there click install


The wizard will install the following components:

  • Single sign on
  • Web client
  • Vcenter inventory service
  • Vcenter server

Click next to proceed with the installation.




Confirm details & continue.



During the installation we'll see the following message stating that the "script is taking too long". Ignore that message.


On the next prompt enter a license key if one is available. If we do not enter a license key then post install Vsphere will continue to operate in evaluation mode.



In this install we'll use the embedded SQL Server Express 2008 addition to serve as the database component.



Enter the account to be used for running Vcenter services:




The next prompt specifies the port numbers Vsphere will use after it gets installed. Change any port numbers as needed.




In this prompt specify memory to be used by JVM depending on size of deployment:




We'll see the following prompts once installation completes successfully.






Enabling NTP on ESXi

Login to the ESXi host from the Vsphere web client & click on the configuration tab.
Now from the Software menu click on time settings. You will see the following display:



To enable NTP, click on properties tab from the top right corner. The following box appears on screen. Check mark the ‘NTP client enabled’ box to enable NTP & then click on options to add NTP servers:




Under NTP settings click on add & a box will appear where you can enter the address of the NTP server. Enter the address & press ok. Check mark ‘restart NTP’ & click on ‘ok’ under the NTP settings for the changes to take effect.



Changing hostname of an ESXi host


Obtain the Direct Console User Interface (DCUI) prompt. Press F2 to enter the system customization menu. You will be asked to enter the root password after which the following display appears:




Select Configure Management Network option. The present configuration is displayed on the right side of the screen. Press enter to edit the network configuration.

Scroll down to DNS configuration & you can see the details on the right side of the screen.




Press enter to go ahead & edit the configuration:




From there go the hostname option & type the new hostname & press enter:




After that you will land at the configure management network prompt again. Press ESC here. Now you will be prompted with the following message:




Entering yes at the above prompt will restart the management network & this will cause a brief network outage for a couple of seconds.

Installing ESXi 5.5:


For this lab setup I’m using VMware workstation 11. To install ESX on a physical server you can attach the iso to the system via a virtual cd rom drive through the servers’ out of band management interface (console).

Launch VMware workstation & click on create new VM. Browse to the path for the ESXi iso & click next:



Follow the Wizard & click finish once done. When the VM comes up you should see the following prompt on screen:


Press enter to continue. Some service start-ups will commence now & you will see the following output on screen:



After a few minutes the following prompt is displayed. Press enter to start with the installation.



Now you will see a screen asking you to select the disk on which ESXI will be installed.
Select the appropriate disk & press enter:



After this you will be asked to select a keyboard layout & enter root password for the host. Post this you will see the below prompt stating that the disk will be repartitioned. Press f11 to start the installation.



If the installation is successful the following screen is displayed. Press enter to reboot the newly installed ESXi server (as a VM):


Wednesday, 1 June 2016

How to fix zfs mount failure due to space full in Solaris 11


When a zfs file system becomes absolutely full it won't allow you to remove any files.
You will also not be able to set any properties on the file system.

I came across a situation wherein a zone was in installed state & was unable to boot & gave the following error:

root@global:~# zoneadm -z localzone boot
zone 'localzone': cannot set 'zoned' property for zone dataset 'localzone_dpool01'
zone 'localzone':
zoneadm: zone 'localzone': call to zoneadmd failed

The issue was that the pool localzone_dpool01 was full.

root@global:~# zfs list | grep -i localzone_dpool01
localzone_dpool01                         29.3G      0  31K    none
localzone_dpool01/u00                     29.3G      0  29.3G  /u00

Conventional attempts to manually mount the file system belonging to the pool on the global zones also failed.

Finally, the file system could be mounted with the following options:

zfs mount -vO -o mountpoint=/mnt localzone_dpool01/u00

Before mounting the file system with the above command the zone needs to be detached first.

After the file system is mounted & space is cleared attach & boot the zone.
The zone should get booted successfully now.

Using capture groups in grep in Linux

Introduction Let me start by saying that this article isn't about capture groups in grep per se. What we are going to do here with gr...