Operating System - HP-UX
1752422 Members
5718 Online
108788 Solutions
New Discussion юеВ

Re: extend LVM without onlineJFS

 
SOLVED
Go to solution
amdtaufik
Occasional Advisor

extend LVM without onlineJFS

Hi i'm new with LVM & HP-UX,

Appreciate your help to correct me if I'm wrong, below are the steps that i'll be taking to extend the LVM of /usr/sap mount point.

# swlist -l product | grep -i vxfs
JFS B.11.23 The Base VxFS File System
PHCO_31643 1.0 Japanese VXFS manpages
PHCO_31692 1.0 Japanese VXFS manpages
PHCO_32391 1.0 vxfsstat(1m) patch
PHCO_33598 1.0 fsck(1M) patch for vxfs
PHKL_32430 1.0 libdebug patch to support VxFS4.1 debugging
PHKL_33990 1.0 VxFS 3.5 : Quota metadata corruption
PHKL_34408 1.0 VxFS directory handling
PHKL_35123 1.0 VxFS 3.5 mount: Quota;logiosize
PHKL_35239 1.0 VxFS 3.5 panic or hang; getdirentries(2)
PHKL_35243 1.0 VxFS 3.5 VFS destacking support;DIO hang;bdf


# swlist -l product | grep -i online


It seems like i don't have any OnlineJFS installed



# bdf /usr/sap
Filesystem kbytes used avail %used Mounted on
/dev/vg01/usrsap 10485760 10391538 88352 99% /usr/sap

# lvdisplay /dev/vg01/usrsap
--- Logical volumes ---
LV Name /dev/vg01/usrsap
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 640
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

# vgdisplay /dev/vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 13
Open LV 13
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 65535
VGDA 2
PE Size (Mbytes) 16
Total PE 9339
Alloc PE 6912
Free PE 2427
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


Available disks on /dev/vg01 is тАж
Total PE * PE Size
9339 * 16 = 149422

Convert to Gb, it will be around 145Gb.


I would like to add another 10Gb to this /usr/sap mount point. The new size of /usr/sap is 20Gb (20480 Mb) this is what i will do ...

# umount /usr/sap

# lvextend -L 20480 /dev/vg01/usrsap

# fsadm -b 20480m /usr/sap

# mount /usr/sap

Fyi, the /usr/sap is also NFS to a few other server, shld i also unmount the NFS mount point on other servers before extending the FS?

Your guidance & helps is very much appreciated.

Tqvm.
16 REPLIES 16
Sajjad Sahir
Honored Contributor

Re: extend LVM without onlineJFS


Dear friend
umount the file system
extend the logical volume
extend the file system by using extendfs command not fsadm command
u can't use fsadm command because u don't have online jfs

thanks and regards

Sajjad Sahir
yulianto piyut
Valued Contributor

Re: extend LVM without onlineJFS

hi, to extend lv, you must extend new filesystem did you created:
# extendfs /dev/vg01/rusrsap
Nido
Trusted Contributor

Re: extend LVM without onlineJFS

Hi,

You should use extendfs instead of fsadm.
You'll need to make sure no other hosts are mounting this Filesystem; else you'll have Stale FS error on those hosts.

I'm not good in arithmatic so please calculte the required size.

Please follow the steps:

a) Increase the size of a file system existing on a logical volume.

First, increase the size of the logical volume.

lvextend -L /dev/vg01/usrsap

Unmount the file system.

umount /dev/vg01/usrsap

Extend the file system to occupy the entire (larger) logical volume.

extendfs /dev/vg01/rusrsap

Remount the file system.

mount /dev/vg01/usrsap /usr/sap


Thanks,
" Let Villagers Be Happy!! "
Michal Kapalka (mikap)
Honored Contributor

Re: extend LVM without onlineJFS

Hi,

# umount /usr/sap

# lvextend -L 20480 /dev/vg01/usrsap

# lvextend -F vxfs /usr/sap

( fsadm is only for mounted filesystems )

# mount /usr/sap


Fyi, the /usr/sap is also NFS to a few other server, shld i also unmount the NFS mount point on other servers before extending the FS?

- yes

mikap
Taifur
Respected Contributor

Re: extend LVM without onlineJFS

Hi

Follow the below steps,

# umount /usr/sap
# lvextend -L /dev/vg01/usrsap
#extendfs /dev/vg01/rusrsap
# mount /dev/vg01/usrsap /usr/sap

Check below link for details

http://docs.hp.com/en/B2355-90691/lvextend.1M.html

If helps, pls assign point.

Rgds//
Taifur
amdtaufik
Occasional Advisor

Re: extend LVM without onlineJFS

Tqvm everyone ..

Now i'm kinda confuse, i got the logical volume extend part correct. But i'm confuse on the file system part which should i use between these two ...

1. # extendfs /dev/vg01/rusrsap

2. # lvextend -F vxfs /usr/sap


Tqvm.
Michal Kapalka (mikap)
Honored Contributor

Re: extend LVM without onlineJFS

Hi,

sorry my mistake,

it should be a

after umnounted FS

lvextend -F vxfs /dev/vg01/rusrsap

sorry

mikap
Ganesan R
Honored Contributor

Re: extend LVM without onlineJFS

Hi,

>>>Now i'm kinda confuse <<<

No need to confuse. There are two part in filesystem extending. One is logical volume extend another one is filesystem extend. "lvextend" will do logical volume extend and "extendfs" will do filesystem extend.

Before extending the filesystem and underlysing logical volume should be extended.

To extend a logical volume:
#lvextend -L lvname

To extend the filesystem
#extendfs -F vxfs /dev/vgname/rlvol

As said before, you should unmount the NFS share on all NFS clients and unexport it on NFS server before you extend it.

Best wishes,

Ganesh.
amdtaufik
Occasional Advisor

Re: extend LVM without onlineJFS

Ok, got it, Tqvm all.

Got another problem, i've found out that the NFS configured in client server is using the /etc/auto.direct configuration ...

can i simply umount the nfs FS?
and how do i remount it back?

The nfs is not configured in /etc/fstab

Tqvm.