Operating System - HP-UX
1834296 Members
2117 Online
110066 Solutions
New Discussion

Re: extending the filesystem-- 11iv2

 
SOLVED
Go to solution
masthan_1
Advisor

extending the filesystem-- 11iv2

Hi,

The below is the vgdisplay output in my cluster server. OS is 11iv2. I have 4 filesystems in this VG and i could see no free PEs are available to extend the filesystem. In this situation I need to extend one of the filesystem due to its size getting filled. Kindly guide me what is the best way to extend the filesystem.. Is this possible that, if i delete any unwanted filesystem and then when i get the free space, can i extend the required file system..As this VG is active in exclusive mode, what is the procedure to be followed up when extending the filesystem...I knew that I can add 4 more PVs in this VG, that way i will get more extends...Please ask me if any more output is required....

 

# vgdisplay dev/vg_stc_irb_data
--- Volume groups ---
VG Name                     /dev/vg_stc_irb_data
VG Write Access             read/write
VG Status                   available, exclusive
Max LV                      255
Cur LV                      4
Open LV                     4
Max PV                      16
Cur PV                      12
Act PV                      12
Max PE per PV               16184
VGDA                        24
PE Size (Mbytes)            32
Total PE                    129454
Alloc PE                    129454
Free PE                     0
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0

 

Regards,

Masthan..

6 REPLIES 6
Modris Bremze
Esteemed Contributor

Re: extending the filesystem-- 11iv2

If you have PVs (extra disks) to add to this VG, you can do so with vgextend. Afterwards extend LV with lvextend. Both of these actions (vgextend/lvextend) can be done online while the LVs are mounted. The last bit is to extend the filesystem on this LV. If you have Online JFS, this operation too can be done online, no umount necessary. Use fsadm to extend the filesystem online. If you don't have Online JFS, umount the necessary LV first, then use extendfs to extend its file system and then mount it back. This might help: http://www.unixguide.net/hp/hplvmtasks.shtml

masthan_1
Advisor

Re: extending the filesystem-- 11iv2

Thanks for your reply.

 

If I am deleting any mount point within this VG, I will be getting some LV's free right?...So can this free LV's be used to extend the filesystem I wish to do?..

Is there any specific commands i need to  use other than #lvextend -L (mentioning the total size after counting the LV's free) /dev/vgname/mylvname

 

is this enough?

Regards,

Masthan

James R. Ferguson
Acclaimed Contributor
Solution

Re: extending the filesystem-- 11iv2


@masthan_1 wrote:

If I am deleting any mount point within this VG, I will be getting some LV's free right?...So can this free LV's be used to extend the filesystem I wish to do?..


Masthan


Simply deleting a mount point (a directory) and/or all of its contents, does not create free LVM extents.  You must 'lvremove' the underlying logical volume or resize it with 'lvreduce' to obtain free extents.

 

If you wish to preserve a filesystem but reduce its size and in doing so obtain free LVM physical extents for use elsewhere, resize the filesystem downward with 'fsadm' and then do an 'lvreduce'.  The point is you must do things in the opposite order that you did them to create the filesystem.  To do otherwise will result in filesystem corruption.

 

Regards!

 

...JRF...

masthan_1
Advisor

Re: extending the filesystem-- 11iv2

Thanks JRF. But if i dont want that LV & filesystem, i can simply do like this,
unmount, lvremove, then i will get free extends right?...then i can use the free extends to extend the other filesystems right?

Regards,
Masthan
James R. Ferguson
Acclaimed Contributor

Re: extending the filesystem-- 11iv2


@masthan_1 wrote:
Thanks JRF. But if i dont want that LV & filesystem, i can simply do like this,
unmount, lvremove, then i will get free extends right?...then i can use the free extends to extend the other filesystems right?

That's correct, this will return free extents to the volume group.   Depending on the allocation policies (strict, contiguous) of the *other* logical volumes you may nor may not be able to use the freed extents without other reorganizations (e.g. a 'pvmove').

 

Regards!

 

...JRF...

masthan_1
Advisor

Re: extending the filesystem-- 11iv2

Thanks JRF....I forget to consider that point...