Showing posts with label fsadm. Show all posts
Showing posts with label fsadm. Show all posts

Monday, February 6, 2017

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.