Search This Blog

Saturday, September 24, 2011

When you try to shrink Volume/File system using '-' sign in the command as follows, it results in an error..

When you try to shrink Volume/File system using '-' sign in the command as follows, it results in an error..


#/etc/vx/bin/vxresize -g DG Volume_Name -Size
E.g. #/etc/vx/bin/vxresize -g testdg testvol -2g
#/etc/vx/bin/vxresize -g testdg testvol -2g
vxresize: invalid option -- 2
VxVM vxresize INFO V-5-1-10092 usage: vxresize [-hHvMDxsnbf] [-F fstype] [-g diskgroup] [-t tag] [-o verify|override] volume length [media...]


Since '-2g' starts with '-' character, the standard UNIX getopt will treat it as an option.
Resolution:
In order to tell getopt(3) to terminate the option scanning, you have to specify '--'.


#/etc/vx/bin/vxresize -g DG Volume_Name -- -Size
E.g. #/etc/vx/bin/vxresize -g testdg testvol -- -2g

Monday, August 22, 2011

fsadm: You don't have a license to run this program


Error Message: While extending the file system /tmp on xyz server, I was getting the following error message regarding licenses of Online JFS

xyz:/root#fsadm -b 1088M /tmp
fsadm: /etc/default/fs is used for determining the file system type
fsadm: You don't have a license to run this program

Checking the Valid License Key on the server:
xyz:/root#/usr/sbin/vxlicrep -e

VERITAS License Manager vxlicrep utility version 3.02.006
Copyright (C) 1996-2004 VERITAS Software Corp. All Rights reserved.

Creating a report on all VERITAS products installed on this system

vxlicrep ERROR V-21-3-1003 There are no valid VERITAS License keys installed in the system.

Logged in to another server called abcd:
abcd:/home/root # /usr/sbin/vxlicrep -e

VERITAS License Manager vxlicrep utility version 3.00.007
Copyright (C) VERITAS Software Corp 2002. All Rights reserved.

Creating a report on all VERITAS products installed on this system

 -----------------***********************-----------------

   License Key                         = 401441sfdasdfsaf795229591636651
   Product Name                        = VERITAS Volume Manager
   Lic Key Lib Ver                     = ELM
   Key                                 = Invalid,  Expired
   License Type                        = DEMO
   Demo End Date                       = Sun Jul 15 10:00:00 2007
   Site License                        = YES

Features :=
   VxVM                                = Enabled


 -----------------***********************-----------------

   License Key                         = 010afdsafasdf5889805115946529
   Product Name                        = VERITAS File System
   Lic Key Lib Ver                     = ELM
   License Type                        = PERMANENT
   Site License                        = YES

Features :=
   HP_OnlineJFS                        = Enabled


abcd:/home/root # vxlicense -p vxlicrep

vrts:vxlicense: INFO: Feature name: VxVM [95]
vrts:vxlicense: INFO: Number of licenses: 1 (non-floating)
vrts:vxlicense: INFO: Expiration date: Sun Jul 15 10:00:00 2007 (1499.2 days ago)
vrts:vxlicense: INFO: Release Level: 25
vrts:vxlicense: INFO: Machine Class: All
vrts:vxlicense: INFO: Site ID: 0

vrts:vxlicense: INFO: Feature name: HP_OnlineJFS [50]
vrts:vxlicense: INFO: Number of licenses: 1 (non-floating)
vrts:vxlicense: INFO: Expiration date: No expiration date
vrts:vxlicense: INFO: Release Level: 22
vrts:vxlicense: INFO: Machine Class: All
vrts:vxlicense: INFO: Site ID: 0

Here we can see that there is a valid license in the server abcd with no expiration date:
Installing the Same License key on xyz
xyz:/root#vxlicinst -k 010449565889805115946529

VERITAS License Manager vxlicinst utility version 3.02.006
Copyright (C) 1996-2004 VERITAS Software Corp. All Rights reserved.
License key successfully installed in /etc/vx/licenses/lic/010sfasdf565889805115946529.vxlic

xyz:/root#/usr/sbin/vxlicrep -e

VERITAS License Manager vxlicrep utility version 3.02.006
Copyright (C) 1996-2004 VERITAS Software Corp. All Rights reserved.

Creating a report on all VERITAS products installed on this system

 -----------------***********************-----------------

   License Key                         = 010dfasdfsa5889805115946529
   Product Name                        = VERITAS File System
   Lic Key Lib Ver                     = ELM
   License Type                        = PERMANENT
   Site License                        = YES

 Features :=
   HP_OnlineJFS                        = Enabled

Still we are getting error:
xyz:/root#fsadm -b 1088M /tmp
fsadm: /etc/default/fs is used for determining the file system type
fsadm: You don't have a license to run this program

We need to enable the License:
xyz:/root#/sbin/fs/vxfs/vxenablef -a

After Enabling the License:
xyz:/root#fsadm -b 1088M /tmp
fsadm: /etc/default/fs is used for determining the file system type
vxfs fsadm: /dev/vg00/rlvol4 is currently 1048576 sectors - size will be increased

Tuesday, July 5, 2011

Difference Between Single User Mode & LVM Mainteance Mode


In LVM maintenance mode, the system boots even if the LVM boot disk is unbootable, since it bypasses the BDRA and LABEL file. However, in single-user mode, the boot disk must be bootable. So use maintenance mode if the disk is not bootable.

In single-user mode, vg00 is activated and the root and /stand are mounted. If these cannot be activated and mounted due to a variety of issues, maintenance mode provides you with a solution. It does not activate or mount anything.

Steps to change the hostname on HP-UX:



1.    First run the hostname command to HP-UX server to change the hostname on HP-UX 11i server:

root@hpuxdev:/> hostname hpuxdev11

I am changing hostname on Integrity Itanium rx6600 running HP-UX 11iv2 from hpuxdev to hpuxdev11

2.    Next execute uname command to set the nodename like hostname:

root@hpuxdev:/> uname –S hpuxdev11

Running uname with –S option changes the nodename to required hostname value on HP-UX 11i server
3.    Change network configuration file (netconf) to make the change permanent during reboots. The netconf files exists under /etc/rc.config.d directory on HP-UX servers:
root@hpuxdev:/> cd /etc/rc.config.d/netconf

Open the netconf file using vi editor and search for HOSTNAME variable, replace the old hostname value to new hostname value. It is recommended by HP to keep the value enclosed in double quotes (" ")
root@nedunix6:/etc/rc.config.d> vi netconf
HOSTNAME="hpuxdev"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

After changing the HOSTNAME , the netconf file portion with HOSTNAME directives looks like this :

root@nedunix6:/etc/rc.config.d> vi netconf
HOSTNAME="hpuxdev11"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

5.Restart the network configuration settings on HP-UX server by running following command .Make sure you run these command from the CONSOLE or MP (Management processor) , sometimes we have noticed network timeout for few seconds while restarting network settings :

root@hpuxdev:/> /sbin/init.d/net start

Verify changes hostname on HP-UX:

Finally run following commands to make sure hostname and nodename is changed to newer name:

root@hpuxdev:/> hostname
hpuxdev11
root@hpuxdev:/> nodename
hpuxdev11