Operating System - HP-UX
1753666 Members
6160 Online
108799 Solutions
New Discussion юеВ

reducing the filesystem sizing

 
SOLVED
Go to solution
whiz_kid
Regular Advisor

reducing the filesystem sizing


is it possible to reduce the file system size without loosing the data ?

OS is hpux 11.31 MCOE,

abt 30% of total filesystem size is free for the filesystem for which i intend to do this.

9 REPLIES 9
James R. Ferguson
Acclaimed Contributor
Solution

Re: reducing the filesystem sizing

Hi:

Yes.

If you have OnlineJFS, simply use 'fsadm' to resize your filesystem downward. Then, AFTERWARDS, perform a 'lvreduce' of the logical volume container to the appropriate size.

If you do NOT have OnlineJFS, then you will need to backup your filesystem; 'lvreduce' (or 'lvremove' followed by a 'lvcreate' of the logical volume again); 'newfs' the filesystem; and restore your data.

Regards!

...JRF...
whiz_kid
Regular Advisor

Re: reducing the filesystem sizing


am doing this to free up a pv in which this lvol is extended for 5 PEs. I want to free up that pv for something else.
whiz_kid
Regular Advisor

Re: reducing the filesystem sizing

this is my vg and i want to get disk3_p2 out of this vg.

#vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4328
VGDA 4
PE Size (Mbytes) 16
Total PE 8647
Alloc PE 4324
Free PE 4323
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0.0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 128
Allocated PE 128
Used PV 1

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 384
Used PV 1

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 256
Used PV 1

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 64
Used PV 1

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 512
Allocated PE 512
Used PV 1

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 128
Allocated PE 128
Used PV 1

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 384
Used PV 1

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 384
Used PV 1

LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 33344
Current LE 2084
Allocated PE 2084
Used PV 2


--- Physical volumes ---
PV Name /dev/disk/disk2_p2
PV Status available
Total PE 4319
Free PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk3_p2
PV Status available
Total PE 4328
Free PE 4323
Autoswitch On
Proactive Polling On


#
whiz_kid
Regular Advisor

Re: reducing the filesystem sizing

fsadm -b 32768M /oracle
lvreduce /dev/vg00/lvol9 /dev/disk/disk3_p2


double checking - is that how it will go ?
whiz_kid
Regular Advisor

Re: reducing the filesystem sizing

is there any way to tell fsadm to reduce it from disk3_p2 ?
James R. Ferguson
Acclaimed Contributor

Re: reducing the filesystem sizing

Hi (again):

You will need to specify the logical volume size that you want the reduction to specify. See the '-L' option of 'lvreduce'.

Once you have done this, you may need to use 'pvmove' to move any extents for the logical volume that reside on the target physical volume. See the 'pvmove' manpages, too.

If you use 'pvmove', be careful not to interrupt, or let the operation be interrupted. To do so may leave one or more of the the logical volume extents unaccessible.

Regards!

...JRF...
Aashique
Honored Contributor

Re: reducing the filesystem sizing

Hi,
Use this command :

fsadm -F vxfs -e /oracle
fsadm -F vxfs -b (size) /oracle
lvreduce -L (size) /dev/vg00/lvol9


Thanks & regards

Aashique
whiz_kid
Regular Advisor

Re: reducing the filesystem sizing

fsadm -b 32768M /oracle

crash dumped!!! - by CRS
whiz_kid
Regular Advisor

Re: reducing the filesystem sizing

thanku...