System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.
Ganesan R
Honored Contributor
Solution

Re: extend LVM without onlineJFS

Hi,

If you are using automount/autofs on client side, you don't need to do much on NFS cients.

Make sure no clients are currently mounted the filesystem and after confirmation just unexport the /usr/sap on NFS server using #exportfs -u /usr/sap

Now you can extend the filesystem as we described earlier.
Best wishes,

Ganesh.
TTr
Honored Contributor

Re: extend LVM without onlineJFS

The steps for extending without onlineJFS are

1. lvextend -L 20480 /dev/vg01/usrsap

2. umount /usr/sap

3. extendfs -F vxfs /dev/vg01/rusrsap

4. mount /usr/sap

Yes, you can run lvextend without unmounting first, minimizes the unmount time. Using extendfs is safer than fsadm, no number of sectors needed.

Take a look at the "man lvextend" this very same example is towards the bottom.
subodhbagade
Regular Advisor

Re: extend LVM without onlineJFS

Hi ,

please follow the steps :----

(1)umount /usr/sap

(2)if it is showing device is busy then
fuser -cu /usr/sap
fuser -ku /usr/sap
kill pid or kill -9 pid

(3) lvextend -L 20480 dev/vg01/usrsap

(4)extendfs /dev/vg01/rusrsap

(5)mount /dev/vg01/rusrsap /usr/sap

(6)check the new size using bdf

(7)Start the nfs service on server
/sbin/init.d/nfs.server start

(8)NFS shared FS on client machine will mount automaticaly.

Regards,
Subodh.
Tingli
Esteemed Contributor

Re: extend LVM without onlineJFS

I wonder whether there should be a backup of the file system before the umount.
UVK_1
Advisor

Re: extend LVM without onlineJFS

Instead of fsadm step in ur procedure just use #extendfs /dev/vg01/rusrsap

and you are all set to go
amdtaufik
Occasional Advisor

Re: extend LVM without onlineJFS

To All, Tqvm for the helps and guides ...

I have successfully extend my /usr/sap mount point to another 10gb. here was the steps taken ...

1. remove all nfs client connected to /usr/sap
2. unexport the /usr/sap nfs
exportfs -u /usr/sap/trans

3. umount /usr/sap
# umount /usr/sap

4. extend the fs
# lvextend -L 20480 /dev/vg01/usrsap
# extendfs /dev/vg01/rusrsap

5. mount back the fs
# mount /usr/sap

6. check the new size (20Gb)
# bdf /usr/sap
Filesystem kbytes used avail %used Mounted on
/dev/vg01/usrsap 20971520 10123384 10170186 50% /usr/sap

7. export back the unexported nfs file
# exportfs -a

8. mount back all the nfs share at the relevant client.


Tqvm.
amdtaufik
Occasional Advisor

Re: extend LVM without onlineJFS

Tqvm to all that has helped.