Operating System - HP-UX
1753805 Members
7839 Online
108805 Solutions
New Discussion юеВ

Increasing size of existing filesystem

 
SOLVED
Go to solution
Phil Storer
Advisor

Increasing size of existing filesystem

Can someone confirm that the following is the correct way to increase the size of a file system. There's plenty of free space on the volume group.

==> lvextend -L 500 /dev/vg01/lvol1
==> umount the filesystem associated with the logical volume
==> extend filesytem i.e. extendfs /dev/vg01/lvol1
==> remount the filesystem



12 REPLIES 12
Michael Tully
Honored Contributor
Solution

Re: Increasing size of existing filesystem

Yes this is correct providing that the existing logical volume does not have any special features like strict/contigous. You can check by using the 'lvdisplay -v /dev/vg01/vg01' command.

Also if you have the OnLine JFS product it is possible to extend it on the fly, using the 'fsadm' command.
Anyone for a Mutiny ?
Con O'Kelly
Honored Contributor

Re: Increasing size of existing filesystem

Hi Phil

Yes thats correct.
Be aware that the "-L" option specifies the new size of the Logical Volume rather than the amount to increase it by.

Obviously if you have On-line JFS you do not need to unmount the filesystem and can use the fsadm command to extend the filesystem.

Cheers
Con
Karthik S S
Honored Contributor

Re: Increasing size of existing filesystem

Be aware that the new size of the LV will be 500MB. Often people are confused with that. If you are having a 500MB LV and you want to extend it by 500MB then the switch should read "-L 1000".

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Phil Storer
Advisor

Re: Increasing size of existing filesystem

I did notice that the output of lvdisplay -v on the logical volume show's the Allocation as strict. Will this cause problems with the extension of the file system?
Michael Tully
Honored Contributor

Re: Increasing size of existing filesystem

yes it will. WHat is the existing logical volume used for?

If I suspect it is / or /stand or primary swap, these should be strict.
You want to create a new volume if possible and the defaults will not it strict. It is also possible to change the strict flag, but use caution.
Anyone for a Mutiny ?
Jeroen Peereboom
Honored Contributor

Re: Increasing size of existing filesystem

Strict means that mirrors of logical extents will not be on the same phyiscal volume ( or even volumegroup).

So you must check if all physical volumes used by your logical volume have enough space.

JP.
Jeroen Peereboom
Honored Contributor

Re: Increasing size of existing filesystem

By the way,

you may also use SAM to do this for you, but the filesystem must be 'unmountable'

JP.
Gerhard Roets
Esteemed Contributor

Re: Increasing size of existing filesystem

By definition you should also have the space available in the VG ;)

500Mb if it is a "vanilla lv" but more if mirrored. The space will also change depending on special attributes bound to this LV.
Phil Storer
Advisor

Re: Increasing size of existing filesystem

Michael,
The logical volume is used for application software and user's home directories. mounted on /d01.
As you hinted it is possible to remove the 'Allocation=strict' entry. How do I do that?