Showing posts with label HP-UX. Show all posts
Showing posts with label HP-UX. Show all posts

Monday, May 8, 2017

How to find the console IP address in HP-UX Servers

In this post, I will guide you to how to find the console IP address in HP-UX operating system if we lost or forgotten. So here, I will provide you the simple steps to get back the console IP address of HP-UX system.

For Itanium systems running 11.31 version only we can use smh and the cprop command. These both method works to recover the forgotten password.

cprop is what the smh webpage uses to retrieve the IP address. Run the smh webpage (hostname:hpx)

Home -> System -> Management Processor

It is show you the IP address of console port. Also please find the below "cprop" command usage, how to we run this command.


hpx:/>/opt/propplus/bin/cprop -summary -c “Management Processor”

[Component]: Management Processor
[Table]: Management Processor
——————————————————-
****************************************************
                   [Hash ID]: Management Processor:11a64d1ax41eed6da
                    [Status]: OK
                 [IPAddress]: 192.168.1.23
                       [URL]: https://192.168.1.23
                     [State]: Enabled
****************************************************

For PARISC boxes and Itanium models running 11.23 or earlier, you must use the serial port on the back of the box. The commands will be:

ctrl-a (to get the attention of the console interface)
<login> typically Admin and Admin
CM (to get to the command menu)
LC
MA (to exit the CM menu)
X  (to exit the GSP or MP menu)

You need to connect a serial cable on Serial port of the HP-UX server and connected to own laptop. Once you will get the ssh or telnet session from serial connection, you need to run the above command to get the IP address of HP-UX console.

Sometimes the serial port is not working then in this case you need to login in serial management port of the server and recover the IP address again.

Please revert back if you are encounter any issue related to this post.

How to find the boot disk from HP-UX operating system

In this article , I would explain to you how we find which disk are used to boot the running HP-UX operating system. This is a bit tricky because its depending on the version of HP-UX, and whether it is using LVM or the less common choice.

For LVM disk layouts:

For 11.11 and earlier, use the below command to check which disk is in used.

# echo “boot_string/S” | adb -k /stand/vmunix /dev/kmem
    boot_string:
    boot_string:    disk(0/0/2/0.6.0.0.0.0.0;0)/stand/vmunix

For 11.23, there are different ways for PARISC versus IA64:

PARISC:

# echo “boot_string/S” | adb -o /stand/vmunix /dev/kmem
    boot_string:
    boot_string:    disk(1/0/0/3/0.6.0.0.0.0.0;0)/stand/vmunix

IA64 (Itanium/Integrity):

# echo “bootdev/x” | adb -n /stand/vmunix /dev/kmem
    bootdev:
        0x100001c

Now to find the actual path, you’ll have to match the 0x100001c value to a minor number in the /dev/disk directory. Compare only the last 6 digits of the number (00001c) to find the device file. Then by using lssf, you can decode the hardware path:

    # DSK=$(ll /dev/disk | awk ‘/00001c/{print $NF}’)
    # echo $DSK
    disk11_p2

    # HWPATH=$(lssf /dev/disk/$DSK | awk ‘{print $(NF-1)}’)
    # echo “$DSK path = $HWPATH”
    disk11_p2 path = 64000/0xfa00/0xa

You can also use ioscan -m dsf to map agile device file names to legacy (CTD) style.

For VxVM disk layouts:

# echo “raw_root/X” | adb -o /stand/vmunix /dev/kmem
     raw_root:
     raw_root:       0x3000002

This value is the minor number for the disk that was used to boot the current system. The minor number is found in the /dev/vx/dmp directory.

     # DSK=$(ll /dev/vx/dmp | awk ‘/000002/{print $NF}’)
     # echo $DSK
    c2t1d0s2

     # HWPATH=$(lssf /dev/dsk/$DSK | awk ‘{print $(NF-1)}’)
     # echo “$DSK path = $HWPATH”
     c2t1d0s2 path = 0/1/1/0.1.0

For completeness, I should mention that 11.31 will report the boot disk path in syslog.log (LVM or VxVM) like this:

vmunix: Boot device’s HP-UX HW path is: 0/1/1/0.0×1.0x0

However, syslog.log is a catch-all for a lot of items and often needs to be truncated when it grows too large. As a result, it can’t be relied on to always contain the current boot disk.

Friday, March 24, 2017

HP-UX Logical Volume Manager (LVM) Commands with an Example

In this post, You can get an idea about HP-UX logical volume manager commands with an example. As you know LVM is basically used for disk management in operating system that allow to manager the physical disks and logical volume.

Please find the below HP-UX LVM commands with an example.

1. Create a new volume group, logical volume and file system:

You can used the below command in HP-UX operating system to create a new volume group, logical volume and file system.

hpx:/>pvcreate /dev/rdsk/c2t1d0

For creating a new volume group first we need to create physical volume as describe in above command.

hpx:/>mkdir /dev/vg01
hpx:/>mknod /dev/vg01/group c 64 0x010000

In above step we will create a directory where we need to create a volume group.

hpx:/>vgcreate /dev/vg01 /dev/dsk/c2t1d0

After successfully creation of volume group we will create a new logical voulme as describe in below command.

hpx:/>lvcreate -L 2048 /dev/vg01

hpx:/>newfs -F vxfs -o largefiles /dev/vg01/vgvol1

Using above command we create a new file system now in next step we will create a directory where we need to mount the newly created file system.

hpx:/>mkdir /backup
hpx:/>mount /dev/vg01/vgvol1 /backup

Once you mount the logical voulme with file system you can run the file system checking command to verify that mounting is succesfully or not.

2. Create a stripped filesystem:

In this, we will create a stripped file system with the help of volume group and logical voulme.

hpx:/>lvcreate -i 2 -I 32 -L 48 -n vgvol1 /dev/vg01

-i number of stripes
-I stripe size of 32KB
-L size of the volume

3. HP-UX display boot information:

You can use the below command to display boot information.

hpx:/>lvlnboot -v /dev/vg00

Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c2t0d0 (0/1/1/0.0.0) -- Boot Disk
        /dev/dsk/c2t1d0 (0/1/1/0.1.0) -- Boot Disk
Boot: lvol1     on:     /dev/dsk/c2t0d0
                        /dev/dsk/c2t1d0
Root: lvol3     on:     /dev/dsk/c2t0d0
                        /dev/dsk/c2t1d0
Swap: lvol2     on:     /dev/dsk/c2t0d0
                        /dev/dsk/c2t1d0
Dump: lvol2     on:     /dev/dsk/c2t0d0, 0

When you run the above command you can find the above output , if you see the boot information you can find you have two disk which is available for boot.

4. HP-UX display all disks system information:

hpx:/> ioscan -funC disk
Class     I  H/W Path        Driver   S/W State   H/W Type     Description
==============================================================
disk      0  0/0/2/0.0.0.0   sdisk    CLAIMED     DEVICE       TEAC    DV-28E-N
                            /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
disk      1  0/1/1/0.0.0     sdisk    CLAIMED     DEVICE       HP 146 GMAX3147NC
                            /dev/dsk/c2t0d0   /dev/rdsk/c2t0d0
disk      2  0/1/1/0.1.0     sdisk    CLAIMED     DEVICE       HP 146 GMAX3147NC
                            /dev/dsk/c2t1d0   /dev/rdsk/c2t1d0

In the above output you can found the all the disk which is available in the system.

5. HP-UX display dump devices:

hpx:/> lvlnboot -v

Normally it is showing the boot information in which you can check the dump devices name.

Thursday, March 16, 2017

Step by Step Configuration of NTP Server on HP-UX Server

In this post, I would like to explain how we configure the NTP (network time protocol) server on HP-UX operating system server. In my recent post you can found the NTP configuration on Solaris and AIX platform. 

As you know NTP ( Network time Protocol) is one of the oldest internet protocol still in use and it allows the synchronization of computer clocks distributing UTC (Coordinated Universal Time) over the network. It is basaiclly used for time synchronization on Unix servers.

Step by Step Configuration of NTP Server on HP-UX:

1. In the first step we will check the configuration files of "xntpd" daemon. By default the configuration file for this daemon is "/etc/rc.config.d/netdaemons".

# vi /etc/rc.config.d/netdaemons

######################################
# xntp configuration.  See xntpd(1m) #
######################################
#
#  Time synchronization daemon
#
# NTPDATE_SERVER: name of trusted timeserver to synchronize with at boot
# (default is rootserver for diskess clients)
# XNTPD:        Set to 1 to start xntpd (0 to not run xntpd)
# XNTPD_ARGS:  command line arguments for xntpd
#
# Also, see the /etc/ntp.conf and /etc/ntp.keys file for additional
# configuration.
#
export NTPDATE_SERVER=
export XNTPD=0
export XNTPD_ARGS=

This is default configuration entry of this file so for xntpd daemon we need to change the variable which is defined.

export NTPDATE_SERVER='ntp.in.pool.org'
export XNTPD=1
export XNTPD_ARGS=

Note: You must change the NTPDATE server name.

2. For ntp config please set the correct timezone is setup in /etc/TIMEZONE file.

hpx:/> cat /etc/TIMEZONE
TZ=IST-5:30
export TZ

You can edit the file in vi editor and change the time zone as per your location.

3. Now, we need to make some changes in NTP configuration files. 

hpx29:/> cat /etc/ntp.conf
#Configuration NTP des serveurs
server ntp.in.org.com
server ntpin.in.org.com

You need to replace ntp server name accordingly. In my post I will use dummy server name.

4. After setting the NTP server name we need to restart the NTP service on HP-UX operating system and verify the ntp configuration.

hpx:/> /sbin/init.d/xntpd restart

hpx:/> ntpq -p

If it is showing you correct ntp server information now. You can match these information with the NTP server name which we use in above step.

Thursday, March 2, 2017

System dump for HP-UX v11.x

In this post, I will cover one of the most entertaining and important topic  how we take system dump for HP-UX v11.x version operating system.

let's starting with V11.00, the following things have changed with respect to system dumps.

1. A dump does not necessarily contain all the memory pages.

2. Save core was replaced by 2 different commands:
  • Save crash for boot time dump image management.
  • Crashutil for port boot dump analysis.
3. Dump area can now be configured both in the kernel, or in the /etc/fstab file. Also, those dump areas don't need to be in the vg00 volume group.

Now we understand what is the role of Dump size.

Dump size:

Default dump size is quite small (not the full memory), but it should be ok for most usage. It can be modified if required using the crashconf utility.

Note: In crashconf , all sizes are in physical pages (4Kb on PA-RISC).

Now we will go for configuration part which is describe below.

Configuration:

Dump area/logical volumes must be created contiguous and with bad blocks relocation disabled. Use the following lvcreate options if creating manually (or use SAM ).

hpx:/># lvcreate -r n -C y ...

Configuring in the kernel:-

lvlnboot can be used to configure dump areas in the vg00 volume group, as long as you have a dump lvol line in the /stand/system file.

Run time configuration:-

Add lines in /etc/fstab with the following format:

device  /  dump  defaults 0 0

Using swap space as dump area:

Swap spaces can still be used as dump areas. In that case, both usage should be explicitly declared:

  • use lvlnboot twice ( - +-s +- and - +-v +- options) 
  • or put 2 lines in /etc/fstab (one for swap and one for dump type
When the system disk is mirrored, the swap LV is actually mirrored, whereas the same device used for dumping will only write to one disk.


Dump areas usage order:-

Dump areas are used in reverse order of their declaration, so it's important to declare last the dump areas not used for swap if you have some (this speeds up reboot, since swap can be activated before saving the dump image). 

Also, if your run time configuration does not include any dump area in the vg00 volume group, the kernel will first automatically use the primary swap space as dump device. This might slow down the reboot since the dump must be completely saved before reactivating this primary swap. To avoid that
  • declare non-swap dump partitions in /etc/fstab 
  • add a dump none line in /stand/system to explicitly use run-time configuration only 
Please comment on the post if you have any query regarding the system dump on HP-UX operating system.

Monday, February 20, 2017

How to Reset Root Password in HP-UX Operating System

In this article, We will learn how to recover or reset the root password in HP-UX operating system.

If you lost the root password on system running on HP-UX operating system, Please follow the below procedure step by step.

1. In the first step, please power on the HP-UX machine and boot the server into single user mode.

To boot the server in single user mode their is several way. Please find the simple way as described below.

Selecting a system to boot. To stop selection process, press and hold the ESCAPE key

Auto boot from primary boot path enabled. To override, press any key within 10 seconds.

Type boot pri isl at the prompt:
boot pri

At the ISL> prompt:, type
hpux -is /stand/vmunix

OR

hpux -is

Here, In above example, the -i option is used to make the system come up in run-level s, for single user mode of operation.

2. In second step while system booting into single user mode you need to interrrupt while booting the server. Once you interrupt the server you will get the HP-UX prompt so you can boot it in single user mode.

hpx:/>boot -is

3. In this step , you need to mount the "/usr" file system on HP-UX operating system server.

hpx:/>mount /usr

4. If it is trusted system on HP-UX operating platform then you need to run the below command on trusted system.

hpx:/>/usr/lbin/tsconvert -r


5. Now, in this step we will reset the root password. For this process we have two method to reset the root password on HP-UX operating system.

Method 1:

hpx:/>passwd root
using above command we can normally reset the root password and set the new password.

Method 2:

hpx:/> vi /etc/passwd

null the password field for root user, so root password will be reset.

6. If root user is locked then unlock using below command.

hpx:/>/usr/lbin/modprpw -k root

7. Once server is up in runlevel 3 again u need to convert as trusted systems.

hpx:/>/usr/lbin/tsconvert

So using above method you can reset the root password on HP-UX operating system server. Please comment on the post if you are facing any issue related to this post.

How to check Operating Systems Version is 64-bit or 32-Bit

Hello Friends,

In this post, you can see how we will check the operating system is 32 bit or 64 bit. Normally when we download any software on Unix platform they have dependency regarding the operating system version. So after following my this post you can easily get the information about the operating system version information.
When you work on Unix operating system then you must know the version of operating system. Because without getting exact version of OS, you can not install the packages on the Linux system.

Here, I mentioned the command and their output using these commands you can easily found the version of operating system. It is 32 bit or 64 bit.

Linux Operating System:

#uname –a
Linux vibhor 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

#uname  -m
x86_64

If the output has "x86_64",the environment is 64 bit.

Solaris Operating System:

#isainfo options

-v         Prints detailed information about the other options
-b         Prints the number of bits in the address space of the native instruction set.
-n         Prints the name of the native instruction set used by portable applications supported by the current version of the OS.
-k         Prints the name of the instruction set or sets that are used by the OS kernel components such as device drivers and STREAMS modules.

[vibhor]# isainfo -v

64-bit sparcv9 applications
        ima fmaf vis2 vis popc
32-bit sparc applications
        ima fmaf vis2 vis popc v8plus div32 mul32

[vibhor]# isainfo -b
64

[vibhor]#isainfo
sparcv9 sparc

The output for the above command should be sparcv9 sparc for a 64-bit operating System.

AIX Operating System:

vibhor:/> getconf -a | grep KERN
KERNEL_BITMODE:                         64

vibhor:/> bootinfo -y
64

The output of the above command should be 64 for a 64-bit hardware. The command must be executed as root.

Note: on AIX, the -y option will specify if the hardware is 32- or 64-bit mode while bootinfo -k will specify if the kernel is 32- or 64-bit (this command must be run as root).

HP-UX Operating system:
         
 hpx:/> getconf KERNEL_BITS
 64
         
The output of the above command should be 64 for a 64-bit operating system.

Wednesday, February 15, 2017

Step by Step NFS Server and Client Configuration in HP-UX

In this post, I will explain step by step method of NFS server and client configuration on HP-UX operating system. Network File System is a distriubted file system which allows a client computer to access a file system that shared on another computer’s or server's.

NFS server is configured on the server locally on attached physically disk. On my HP-UX server i will configured the NFS server and for client you can use same HP-UX operating machine or other linux machine.

We can used the below NFS server IP and client IP on my own HP-UX machine and Linux machine.

NFS Server : 10.135.0.27 and share folder /backup
NFS Client : 10.135.0.2 and mount point /home/backup

Steps involved to configure the NFS Server:

1. First we will make sure both NFS server(10.135.0.27) and client(10.135.0.2) are accessible. After that we will make an entry in /etc/hosts or Configure it in DNS to resolve the IP if you use server name instead of IP address. But in our case we will use IP address instead of name.

hpx:/>vi /etc/hosts

10.135.0.27 hpxnfsserver
10.135.0.2 hpxnfsclient

The /etc/hosts entry would we same on both server and client machine so it can be accessible to each other.


2. In second step we will identify the folder to be export from server to the client. On my HP-UX server machine, I am going to export the folder /backup.

3. Now we will change the shared folder permission, normally we don't provide the read/write access to shared folder but in my case for testing purpose i will provide the (777) permission so that NFS client user can read/write the data on shared folder.

hpx:/>#chmod 777 /backup

4. In this step we change the NFS_SERVER=1 to enable your server to act as a NFS Server in the configuration file /etc/rc.config.d/nfsconf

hpx:/>vi /etc/rc.config.d/nfsconf
Change the NFS_SERVER parameter as follow.
NFS_SERVER=1
PCNFS_SERVER=0
START_NFSLOGD=0
START_MOUNTD=1
MOUNTD_OPTIONS=""
Save and exit the file.

5. In final step we will add an entry of our shared folder in the export file /etc/dfs/dfstab with proper permission.

#vi /etc/dfs/dfstab
/usr/sbin/share -F nfs -o rw -d “Test directory” /backup

Save and exit the file.

If you see the above line "/backup is shared folder and we will provide the "rw" read/write access to this folder.

6. Now please restart the nfs service on NFS server and make it permanent so after reboot of HP-UX server the shared folder is not umount.

hpx:/>/sbin/init.d/nfs.server stop
hpx:/>/sbin/init.d/nfs.server start

7. Using below command we can check the NFS folder is shared or not and also we can ensure which client can access this machine.

hpx:/>/usr/sbin/exportfs -av

shareall -F nfs

Steps involved to access the NFS shared folder to the NFS clients:

1. Now for NFS client configuration i will login on my Linux machine.In my case i will use my Centos machine as a client, You can select your NFS client machine as per your requirement.

2. On client machine, please select the mount point to where we have to mount the NFS shared folder /backup which we exported from NFS Server 10.135.0.27. On my Linux machine, I will mount it on /home/backup.

3. In this step we will verify the list of shares available on client machine. Please use the below "showmount" command to check which NFS shared folder is accessible.

hpx:/>showmount -e 10.135.0.27
export list for 10.135.0.27
/backup

If we get the output, server side export configuration doesnt have any problem between nfs server and client.

3. In next step we will mount the nfs share locally on our desintation mount point folder.

hpx:/>mount 10.135.0.27:/backup /home/backup

4. In final step, you can check the NFS mount folder using "bdf" command. It is show you the mount folder where all existing data is store. For testing purpose you can create any file on /home/backup.

Hope, you will like my this post, it is cover all the installation and configuration part step by step. Please let me know if you encouter any issue during NFS configuration on HP-UX machine.

Monday, February 6, 2017

LVM and file system basics in HP-UX

Hello Friends,

In my previous post, you can find the simple way to extend or increase the file system size in HP-UX operating system. So now we need to understand also how these file system is created with LVM. So in my new post, i would try to explain you how we will create LVM and file system in HP-UX operating system.

In this post, I will give you an example for HP-UX 11i v2/v3 version operating system. As my current machine keeping same version OS. You can find the LVM creation for Linux in my other post on my blog.

As you know LVM stands for logical volume management system which are used for file creation. Please find the step by step method to create the LVM in HP-UX operating system as describe below.

1. First we will create the physical volume using free disk space. After that we will create the volume group. to create the physical volume we will use "pvcreate" command.
-------------------------------------------------------------------------------------------------------------
hpx:/>pvcreate -f /dev/rdisk/disk1
Physical volume "/dev/rdisk/disk1" has been successfully created.
-------------------------------------------------------------------------------------------------------------
Using "pvcreate" command new physical volume group'/dev/rdisk/disk1 has been created.

2. In second step, we will create the new volume group with the help of physical volume. but before running the creation command we need to create a VG directory in /dev location.Once we will create the directory we will change the ownership and permission of the folder respectively.
-------------------------------------------------------------------------------------------------------------
hpx:/>mkdir -p /dev/vg00    Note: (you can replace volume group name accordingly) 
hpx:/>chown -R root:root /dev/vg00
hpx:/>chmod -R 755 /dev/vg00
-------------------------------------------------------------------------------------------------------------
3. Now we will create a special group device file.In HP-UX each volume group must have a group device special file under its sub directory in /dev. This group DSF is created with the "mknod " command, like any other DSFs the group file must have a major and a minor number.

One of the most important thing while creating the LVM on the HP-UX is major & minor number. For LVM 1.0 volume groups the major number must be 64 and for the LVM 2.0 one must be 128.

For minor number, the first two digits will uniquely identify the volume group and the remaining digits must be 0000.

In our case we’re creating a 1.0 volume group on HP-UX operating system.

hpx:/>cd /dev/vg00
hpx:/dev/vg00>mknod group c 64 0x010000

Now change the ownership to root:sys and the permissions to 640.

hpx:/>chown root:sys group
hpx:/>chmod 640 group

4. Now create the volume group using below command.

hpx:/>vgcreate -s 16 vg00 /dev/disk/disk1
Volume group "/dev/vg00" has been successfully created.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

In above command , we will create new volume group "vg00" with 4 MB size.

5.  Now your new volume group in HP-UX operating system has been created successfully. You can check the volume group and physical group by using below command.
-------------------------------------------------------------------------------------------------------------
hpx:/> vgdisplay -v vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access         read/write     
VG Status                    available                 
Max LV                       255    
Cur LV                        0      
Open LV                     0      
Max PV                      16     
Cur PV                        2      
Act PV                        2      
Max PE per PV           6000         
VGDA                        2   
PE Size (Mbytes)       16              
Total PE                     26    
Alloc PE                    0       
Free PE                      26    
Total PVG                  0        
Total Spare PVs         0              
Total Spare PVs in use      0 

 --- Physical volumes ---
 PV Name                   /dev/disk/disk1
 PV Status                   available                
 Total PE                    13       
 Free PE                     13       
 Autoswitch                On
-------------------------------------------------------------------------------------------------------------
In above output you can see the VG Name & PV Name which we created during LVM creation. Now using these Volume group "vg00" we can able to create file system on HP-UX file system.

6. Now in final step we will create the logical volume group in HP-UX using VG.

hpx:/> lvcreate -n vg00_test -L 256 vg00

Logical volume "/dev/vg00/vg00_test_S2" has been successfully created with
character device "/dev/vg00/rvg00_test_S2".
Logical volume "/dev/vg00/vg00_test_S2" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

If our example the logical volume group name is "vg00_test". If you see the syntax of above command "-n" option is used for new logical volume name and "-L" option is used for specifying the file system size in MB.

hpx:/> lvdisplay  /dev/vg00/vg00_test

Using this command you can check newly created logical volume group on HP-UX operating system.

7. For file system creation in HP-UX, we will use below method step by step.

hpx:/>newfs -F vxfs -o largefiles /dev/vg00/vg00_test
version 7 layout 393216 sectors, 393216 blocks of size 1024, log size 1024 blocks large files supported

In above syntax, we will create a new file system, now we will create the mount point where we mount this file system
-------------------------------------------------------------------------------------------------------------
hpx:/>mkdir /test
hpx:/>mount /dev/vg00/vg00_test /test.
-------------------------------------------------------------------------------------------------------------
Using above method /test file system has been created successfully and if you want to check the current size of file system you can use "bdf  /dev/vg00/vg00_test" command.

Hope, this post is useful for you. If you have any questions related this post please comment on it. I will try to provide the simple and step by step solution to you.

How to increase/extend file system size in HP-UX 11i

Hello Friends,

In this post, I will describe how to extend or increase the file system size on HP-UX 11i operating system. Before extending the file system size we need to understand first file system type, which type of file system currently used in HP-UX operating environment.

For example, in my HP-UX operating system, I want to increase the root partition size, so for this first I need to check which file system type is it. So for checking this we will used "fstyp" command.

-------------------------------------------------------------------------------------------------------------------
hpx:/> fstyp /dev/vg00/lvol3
vxfs
-------------------------------------------------------------------------------------------------------------------

In above command output, my logical volume for root /dev/vg00/lvol3 is mounted on '/". So for root file system the type os "vxfs".

The extendfs command should be used to extend JFS (VxFS) file systems that are not mounted. The Ceritas online JFS extends a file system in using the fsadm command.So basically we can extend file system through two command.

1. Increase/Extend file system size using "fsadm".
2. Increase/Extend file system size using "extendfs".

Increase/Extend file system size using "fsadm":-

1. Before extend the file system size we need to verify that online JFS license is installed on the system.

For HP-UX 11i v1 operating system:
-------------------------------------------------------------------------------------------------------------------
hpx:/> vxlicense -t HP_OnlineJFS
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

For HP-UX 11i  v2|v3 operating system:
-------------------------------------------------------------------------------------------------------------------
hpx:/> vxlicrep | grep Online
HP_OnlineJFS                        = Enabled
-------------------------------------------------------------------------------------------------------------------
In above command output you can verify that onlineJFS license is installed on the system. Both the command we can use HP-UX version wise.

2. To extend the file system size , we will check the current size of file system. In this post as you know we will extend the "root" file system size, so for check the current size status we used "bdf" command. Please find the "bdf" command output as listed below.
-------------------------------------------------------------------------------------------------------------------
hpx:/> bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1835008  17942 1703507   1% /
-------------------------------------------------------------------------------------------------------------------
To check the current voulme group size for this file system please run the below command.

hpx:/> vgdisplay -v vg00
LV Name                     /dev/vg00/lvol3
LV Status                     available/syncd
LV Size (Mbytes)        1792
Current LE                  224
Allocated PE               224
Used PV                      1

Now, we will extend the file system size using the below command.
-------------------------------------------------------------------------------------------------------------------
hpx:/>lvextend -l 300 /dev/vg00/lvol3
Logical volume "/dev/vg00/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
-------------------------------------------------------------------------------------------------------------------
Volume group is now extend, you can see the new volume group status using the below command.

hpx:/> vgdisplay -v vg00
LV Name                     /dev/vg00/lvol3
LV Status                     available/syncd
LV Size (Mbytes)        2400
Current LE                  300
Allocated PE               300
Used PV                      1

hpx:/>fsadm -F vxfs -b 2400M /
UX:vxfs fsadm: INFO: V-3-25942: /dev/vg00/lvol3 size increased from 1835008 sectors to 2457600 sectors.

3. Now you file system "root" size has been extend , to need to check new extended size please run the below command.
-------------------------------------------------------------------------------------------------------------------
hpx:/> bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    24576008  18095 2287043   1% / 
-------------------------------------------------------------------------------------------------------------------
If you see in above bdf command output the available size for "root" partition size is extend.


Increase/Extend file system size using "extendfs":-

1. To extend the file system size , we will check the current size of file system. In this post as you know we will extend the "root" file system size, so for check the current size status we used "bdf" command. Please find the "bdf" command output as listed below.
-------------------------------------------------------------------------------------------------------------------
hpx:/> bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1835008  17942 1703507   1% /
-------------------------------------------------------------------------------------------------------------------
To check the current voulme group size for this file system please run the below command.

hpx:/> vgdisplay -v vg00
LV Name                     /dev/vg00/lvol3
LV Status                     available/syncd
LV Size (Mbytes)        1792
Current LE                  224
Allocated PE               224
Used PV                      1

Now, we will extend the file system size using the below command. The procedure is same as previous one.

2. For extending the file system size using "extendfs" we need to umount the "root" file system then extend the size and re-again mount it. 

hpx:/>lvextend -l 300 /dev/vg00/lvol3
Logical volume "/dev/vg00/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
-------------------------------------------------------------------------------------------------------------------
hpx:/>umount /
hpx:/>extendfs /dev/vg00/lvol3
hpx:/>mount /
-------------------------------------------------------------------------------------------------------------------
Once you mount the "root" file system again then check the newly size of file system, for this we will use same command bdf.
-------------------------------------------------------------------------------------------------------------------
hpx:/> bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    24576008  18095 2287043   1% / 
-------------------------------------------------------------------------------------------------------------------

So, now we are able to extend or increase the file system size using two way on HP-UX operating system. Hope, you like my post, please let me know if you facing issue during the extend file system size on HP-UX operating system.