Operating System - HP-UX
1831919 Members
3453 Online
110031 Solutions
New Discussion

Increasing a logical volume problem

 
SOLVED
Go to solution
ROSS HANSON
Regular Advisor

Increasing a logical volume problem

I have lli installed on a N4000 box with enterprise support on it.
I needed to increase the size of /home from 2048
to 4096. Out of laziness I did it through sam.
Well, everything seem to have worked. But,when I do a lvdisplay -v /dev/vg00/lvol4 the LV Size shows as 4096 but when I do a bdf at the command line I am only shown 2048
So, now when I'm trying to download a couple of patches to my home directory I cannot because /home is still only 2GB instead of 4GB
What do I do now to get /home to 4GB?
Ross Hanson
7 REPLIES 7
Rodney Hills
Honored Contributor

Re: Increasing a logical volume problem

Their are 2 steps to extend a logical volume.

The first is extending the volume itself, the second is extending the file system.

Do a "man extendfs" for more info

HTH

-- Rod Hills
There be dragons...
Sanjay_6
Honored Contributor
Solution

Re: Increasing a logical volume problem

Hi Ross,

sam probably executed the lvextend command to extend the lv, but did not execute the fsadm/extendfs command since the filesystem was still mounted.

Do you have onlineJFS on the system. to verify

swlist |grep -i onlinejfs

grep vx /stand/system

if the grep command return vxadv in the list, that means you have onlinejfs installed and configured.

To increase the filesystem, first calulate the block size in MB.

# bc -l
4*1024*1024 --> for 4GB
4194304

So 4194304 is the block size in MB. to increase using fsadm online if you have onlineJFS, try

fsadm -b 4194304 /home

If you do not have onlineJFS, unmount /home and use extendfs to extend the filesystem size.

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: Increasing a logical volume problem

Hi,

A correction

read this,

To increase the filesystem, first calulate the block size in MB.

as

To increase the filesystem, first calulate the block size in KB.

Thanks
Sanjay
Pedro Cosmen
Valued Contributor

Re: Increasing a logical volume problem

Hello Ross,

From root with /home dismounted (shutdown 0 will put your system in single user and dismount all) do:

# extendfs /dev/vg00/rlvol4

Then return your syste to normal state with

# init 3 (or your initdefault, see /etc/inittab)

Regards.
Florian Heigl (new acc)
Honored Contributor

Re: Increasing a logical volume problem

With OnlineJFS You can also use -b 4096m to skip the calculator.
It surely supports lazyness which might not be the best thing, but with (quite)larger filesystems I find it less error-prone.

If the filesystem is completely full, You can't extend it immediately, You'll have to free some blocks for JFS to be able to put in that 'extended block map' (I don't know the correct name, sorry).
8KB should be enough, our DBAs tend to fill up their archivelog filesystems quite regularly.
yesterday I stood at the edge. Today I'm one step ahead.
Radhakrishnan Venkatara
Trusted Contributor

Re: Increasing a logical volume problem

Well its simple just u have to extend the filesystem, bcoz only ur lv size has been increased and ur filesystem information is not updated.
Just do extendfs, u have to unmount the filesystem before doing this.If u have onlinejfs you can do it online.
Negative thinking is a highest form of Intelligence
Charles Egbon
Regular Advisor

Re: Increasing a logical volume problem

Hi Ross,

The exact target location werein the downloaded patch will seat is a filesystem (/home) not logical volume. But the filesystem seats on the logical Volume.
All you need to do is to extend the size of your filesystem.
Besides, when you run 'bdf or
mount -v'displays the size of the filesystem.

All the best.

Charles.