Operating System - HP-UX
1826451 Members
3884 Online
109692 Solutions
New Discussion

How I can reduce the file system size of /hp_pvcs

 
SOLVED
Go to solution

How I can reduce the file system size of /hp_pvcs

Hi All,
I want to reduce my file size of /hp_pvcs (8GB TO 5 GB). Could you please let me know the step by step solutions to reduce it as I am new to this HP UX.My server is PA-RISC based and HP UX version 11.11 is running. Your help will be truly appreciated.Please find attachment for details.Please find below the required file system size information:
#bdf /hp_pvcs
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvpvcs 8388608 2861414 5182044 36% /hp_pvcs

1) Any Full backup for this file system is required before doing this activity? How many chances are for data losses.It is very critical server and I am not in position to bear the data loss. IS it safe and secure activity or dangerous?
2)could I perform these steps online (applications are running).

Really Hands on experiences are welcome on this.
Thank you very much in advance.
Regards
Anshumali

9 REPLIES 9
Vihang.
Trusted Contributor

Re: How I can reduce the file system size of /hp_pvcs

Hi Anshumali,

You can reduce the filesystem online & without dataloss if you have "online jfs" product installed. Use below command to check.

# swlist | grep -i "onlinejfs"

The method would differ if you have online jfs & if you dont. Either ways, it is always recommended to have a backup before attempting to reduce your filesystem.


Best Regards,
Vihang.
Vihang.
Trusted Contributor

Re: How I can reduce the file system size of /hp_pvcs

Hi Anshumali,

Use below steps if you have online jfs installed.

1) Take full backup of the filesystem "/hp_pvcs"
2) Use fsadm to reduce the filesystem size.
# fsadm -b 5242880 /hp_pvcs (Size specified in KB)
# bdf /hp_pvcs (Check the size whether its reduced).
# lvreduce -L 5120 /dev/vg00/lvpvcs (reduce the logical volume).

Refer to man pages of fsadm_vxfs & lvreduce for more info.

Regards,
Vihang.
Deepak Kr
Respected Contributor

Re: How I can reduce the file system size of /hp_pvcs

Hi Anshumali,


>>>How many chances are for data losses.It is very critical server and I am not in position to bear the data loss. IS it safe and secure activity or dangerous?

Yes, it can be.


>>2)could I perform these steps online (applications are running).

yes, you can do it if you have onlinejfs installed in hp box

you can check using following:

swlist |grep -i onlinejfs

steps will depend on onlinejfs installation status.

My question here is that , if it is a critical production server and you can not bear data loss of any type then why are trying to do it here.

Still you have 1.8 GB free space available so you can extend if you wish.


typical steps will be following

with onlinejfs

lvreduce -L lvname
fsadm -b /filesystem

"There is always some scope for improvement"
Prashanth Waugh
Esteemed Contributor
Solution

Re: How I can reduce the file system size of /hp_pvcs

Hi Anshu,

Pls check firest
swlist -l product |grep -i jfs
If its online Jfs then use the below procedure


Pls check the below steps
1)First take a backup safety point of view
2)bdf
Check FS is in use or not
3)fuser -cu
4)Reorganize the files/directories in the file system.
fsadm -F vxfs -d -D -e -E
5)Reduce the file system size
fsadm -F vxfs -b
6)Reduce the logical volume.
lvreduce â  L


check the man pages for each command so it will give clear idea what ur doing.

Regards
Prashant
For success, attitude is equally as important as ability
Vihang.
Trusted Contributor

Re: How I can reduce the file system size of /hp_pvcs

Hi Anshumali,

Use below steps if you dont have online jfs.

1) Stop the applications using that filesystem.
2) Take full backup of /hp_pvcs filesystem.
3) Unmount the filesystem /hp_pvcs
# umount /hp_pvcs
4) Reduce the logical volume to 5GB.
# lvreduce -L 5120 /dev/vg00/lvpvcs (this will erase any data on your logical volume)
5) Create a filesystem again on the logical volume.
# newfs -F vxfs -o largefiles /dev/vg00/rlvpvcs

6) Mount the filesystem again.
# mount /dev/vg00/lvpvcs /hp_pvcs
7) Restore data from backup.
8) Start applications.

Regards,
Vihang.

Re: How I can reduce the file system size of /hp_pvcs

Thank you very much for all..really millions thanks for your quick reply. Plz find the below
details:
#swlist | grep -i "onlinejfs"
B3929CA B.11.11 HP OnLineJFS

I think this server has onlineJFS file system installed on it.
Again thank you very much for your help.
Vihang.
Trusted Contributor

Re: How I can reduce the file system size of /hp_pvcs

Hi Anshumali,

Its always a pleasure of all forum members to assist fellow mates.
The best way to say thank you is by assigning points :-)


Regards,
Vihang.
Deepak Kr
Respected Contributor

Re: How I can reduce the file system size of /hp_pvcs

good!!

so have you decided now to go for lvreduce or planning for extension.
"There is always some scope for improvement"
Prashanth Waugh
Esteemed Contributor

Re: How I can reduce the file system size of /hp_pvcs

Hi Anshu,


If you are doing on production server ,my suggestion is first take the backup.Then carry out the activity.

Best Luck
Prashant
For success, attitude is equally as important as ability