Operating System - HP-UX
1834800 Members
2761 Online
110070 Solutions
New Discussion

Error reducing FS with fsadm - Urgent pls

 
Anil C. Sedha
Trusted Contributor

Error reducing FS with fsadm - Urgent pls

I am getting a error when i use

fsadm -b 2500m /var

i am reducing my file system from 4.7 gb to 2.5 gb of /var

pls reply urgently

regards,
anil
If you need to learn, now is the best opportunity
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: Error reducing FS with fsadm - Urgent pls

Hi Anil:

The general success in reducing a JFS (vxfs) filesystem's size is not good. You can try defragmenting the filesystem *before* you try a size reduction. This may improve your chances of reducing it. Online JFS version 3.3 is supposed to improve your chances over previous versions too.

It might be easier to backup the filesystem, 'lvreduce' it; 'newfs' the filesystem; and reload your data fromt the backup.

Regards!

...JRF...
Uday_S_Ankolekar
Honored Contributor

Re: Error reducing FS with fsadm - Urgent pls


Do defrag the file system first.

Follow these steps..


# fsadm -d -D -e -E / To defrag,
# fsadm -b /
# lvreduce -L /dev/vgnn/lvolnn
-USA..
Good Luck..
Anil C. Sedha
Trusted Contributor

Re: Error reducing FS with fsadm - Urgent pls

Uday,

Will there be a problem of my data getting lost if i do an lvreduce in the last step as u have mentioned

If you need to learn, now is the best opportunity
Wodisch
Honored Contributor

Re: Error reducing FS with fsadm - Urgent pls

Hello Anil,

YES, there is some chance: be absolutely certain that those "fsadm"s DID work, e.g. check for their exit-codes, and then use "bdf" to check wether the reduction *seems* to work, to, i.e. reduced the file-system.
Be careful, as even the "defragmentation" often does NOT work (or not good enough), and then the "fsadm -b" CANNOT work!
In any case, make a backup to a safe place (like a *NEW* tape), verify it actually DID work, then
- umount
- lvreduce
- mkfs
- mount
that LVol/filesystem and then restore your backup to it...

Just to be safe,
Wodisch
PS: make a second backup :-
Layne C. Berg II
Occasional Advisor

Re: Error reducing FS with fsadm - Urgent pls

I know this is a little basic but make sure that you aren't using more space then what you trying to reduce to i.e. if you are using 3 gigs in /var and you are trying to reduce to 2.7 gigs fsadm will fail. Also it would work much better if you brought the system into init level 1 or s.


The easiest way todo this is to reboot the system and lose the ISL and when at the prompt enter: hpux -i s. Make sure you are at a console directly on the system if you do this. It will load the system in to single user mode and allow to manually mount the /var filesystem and reduce it with out file activity on it. Reduce is a very finking process.

Good Luck,

Layne