/var/net/sys/admin/blog
| More

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
#bdf
#vgdisplay
e.g.
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
#bdf

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

2.verify
#bdf

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

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

 

Enjoy 🙂

Share

6 Responses to “Create and Extend Logical Volume on HP-UX”

  1. pushpa

    on January 27 2012

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

    excellent article.

  2. admin

    on February 10 2012

    No problem pushpa. Thanks for dropping by. 🙂

  3. Create and Extend Logical Volume on HP-UX | Free Linux Tutorials « My Blog

    on June 3 2012

    […] Create and Extend Logical Volume on HP-UX | Free Linux Tutorials. Share this:TwitterFacebookLike this:LikeBe the first to like this post. […]

  4. Linux Topics – Tutorials « Zeeshan Ahmad Bhatti

    on December 29 2012

    […] Create and Extend Logical Volume on HP-UX […]

  5. Jitender

    on August 17 2015

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

  6. teja

    on September 28 2016

    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.

Comment RSS · TrackBack URI

Leave a comment

Name: (Required)

E-mail: (Required)

Website:

Comment:

 

About FLT

This site is dedicated to everyone who likes to learn and explore the beautiful world of Linux. If you have comments and suggestions, please feel free to email at freelinuxtutorials@gmail.com. I am happy to serve and share things esp. that is free and enjoyable as Linux.