Create and Extend Logical Volume on HP-UX

HP-UX tutorial on a Linux website? why not…

To take a break, I decided to post a tutorial here on Creating and Extending LV on HP-UX. It’s better for me to post it here so it will serve my guide once I get my hands again on HP-UX servers. This is the one I used when my colleague asked me  to check if I can find a way to increase the Filesystem  of these servers.  Here it is:

To create the LV on HP-UX server

1.verify first if JFS is online (if online, no need to mount/unmount so no downtime)
# swlist -l product | grep -i online
OnlineJFS01           4.1.008        Online features of the VxFS File System

2. verify if there’s avail space
PE Size (Mbytes)            32
Total PE                    8692
Alloc PE                    4618
Free PE                     4074

FreePE X PE Size = 4074  X 32 = 130GB

3. To create let say a 2GB
#lvcreate -L 2048 -n lv_back /dev/vg00
Logical volume “/dev/vg00/lv_back” has been successfully created with
character device “/dev/vg00/rlv_back”.
Logical volume “/dev/vg00/lv_back” has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

4. create filesystem,
# newfs -F vxfs /dev/vg00/rlv_back
version 6 layout
2097152 sectors, 2097152 blocks of size 1024, log size 16384 blocks
largefiles supported

5.create dir and mountpoint
#mkdir /backup
#mount /dev/vg00/lv_back /backup

6.check the new LV

To enable mirroring

1. verify status
# vgdisplay -v | grep PV

2. check LV
#lvdisplay -v /dev/vg00/lv_back

00125 /dev/dsk/c2t1d0s2       02242 current
00126 /dev/dsk/c2t1d0s2       02243 current

only writing to c2t1d0s2

compare to others,

2. check LV
#lvdisplay -v /dev/vg00/lv_vol03
LE    PV1                     PE1   Status 1 PV2                     PE2   Status 2
00000 /dev/dsk/c2t1d0s2       00312 current  /dev/dsk/c2t0d0s2       00312 current

writing on both c2t1d0s2 and c2t0d0s2

3. to mirror

# lvextend -m 1 /dev/vg00/lv_back /dev/dsk/c2t0d0s2
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ….

Extend LV on HP-UX server
Since HP-UX server JFS is online, then we use this procedure

1. example, to extend 2G to 20GB
#lvextend -L 20480 /dev/vg00/lv_back
# fsadm -F vxfs -b 20480M /backup


If server has no online JFS, procedure as follows:
root@darwin-ux [/]
# umount /backup
root@darwin-ux [/]
# lvextend -L 20480 /dev/vg00/lv_back
Logical volume “/dev/vg00/lv_back” has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root@darwin-ux [/]
# extendfs -F vxfs /dev/vg00/rlv_back
root@darwin-ux [/]
# mount /dev/vg00/lv_back /backup
root@darwin-ux [/]
# bdf /backup
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lv_back  4194304   18118 3915182    0% /backup
root@darwin-ux [/]

Finally, put on /etc/fstab , so it will auto mount even after reboot

/dev/vg00/lv_back /backup vxfs delaylog 0 2


Enjoy 🙂

About the author


View all posts


  • I am new to HP-UX still could extend file system.

    excellent article.

  • No problem pushpa. Thanks for dropping by. 🙂

  • Not usefull you should tell from starting from PV to LV, suppose we dont have JFS then.

  • its really good.
    i have a small dought ca i change the parameter PE Size (Mbytes) 32

    if it is possible how to change this.
    thanks in advance.

  • It’s going to be ending of mine day, but before finish I
    am reading this impressive piece of writing to increase my experience.

  • Dapps Application Development Native IOS, Android
    Dapps is proud to present a wide range of services including
    design, development and characterization of UX for
    business applications, institutions and individuals who wish to ride the
    wave of success in the mobile world!
    Our company specializes in developing game applications, developing conference applications
    , developing social applications, developing mobile applications, developing applications for
    organizations and institutions.
    Dapps accompanies all stages of app development from characterization,
    development to upload to development, or Android development to Google Play. is a young company that lives, breathes and develops in today’s mobile world.
    The company’s stuff will design, development and characterization services for mobile applications, focusing on the two dominant platforms of the cellular
    market today; ISO and Android. We at Dapps embrace the idea that if you are going to provide the
    best service, you must create the right infrastructure
    for innovation, creativity and solutions that enable adaptation to the ever-evolving technological world.

    Above all, we create. We admit that our approach to work is a little different and unique
    and we are not ashamed to say that we are here to realize dreams.
    Our passion for the high-tech world, creativity and free enterprise
    is reflected in our work. We regard every application idea
    as a dream in its infancy, which demands our full attention, investment and cultivation, to help it take its
    first steps and ultimately to run far and wide.

Leave a Reply