Operating System - HP-UX
1832587 Members
3481 Online
110043 Solutions
New Discussion

decrease size of file systems

 

decrease size of file systems

Hi, all!

Please ask - can I decrease size of file systems in my HP-UX 10.20?
I know what in SAM can increase size with step 4 Mb.

Thanx in advance.
Oleg
3 REPLIES 3
Joaquin Gil de Vergara
Respected Contributor

Re: decrease size of file systems

yes

backup data
umount file system

lvreduce Logical Volume

format lvol (newfs)

mount file system

restore data

good luck!
Teach is the best way to learn
Sean OB_1
Honored Contributor

Re: decrease size of file systems

Unless you have online-jfs you will need to rebuild the file system at the smaller size.


Here are the steps involved without online-jfs.


backup/copy data

umount /file/system/to/reduce
lvreduce /dev/vgNN/lvoltoreduce
newfs fileystem
mount /dev/vgNN/lvol /file/system/just/reduced

restore/copy data back to filesystem


HTH

Sean
MANOJ SRIVASTAVA
Honored Contributor

Re: decrease size of file systems

Hi Oleg


Yes you can do it , but then you need to abck up data as it is more safe to do it that way , incase you ahve online JFS installed then you can do it on the fly but then it may result in lss of data , the safest way is to backup , lvreduce and then resoter data if required.


Manoj Srivastava