Operating System - HP-UX
1836645 Members
1708 Online
110102 Solutions
New Discussion

Re: fs reduction on /opt (lvol6)

 
SOLVED
Go to solution
Ted Mims
Occasional Advisor

fs reduction on /opt (lvol6)

I am trying to reduce lvol6 on HP-UX 11.11.
#fsadm -F vxfs -b /opt

It does not let me do the reduce because there are allocated sectors out of range. I am guessing that the online JFS tools sit in opt and that is why i am having the problem. Is there a way to reduce this without rebuilding? Any help would be appreciated.
11 REPLIES 11
Ted Mims
Occasional Advisor

Re: fs reduction on /opt (lvol6)

another note if this matters:

all vg00 vols are mirrored
Frederic Sevestre
Honored Contributor
Solution

Re: fs reduction on /opt (lvol6)

Hi,

You should first try to reorganize the extends using
# fsadm -F vxfs -e /opt
then
# fsadm -F vxfs -b /opt

Fr??d??ric

Crime doesn't pay...does that mean that my job is a crime ?
Marco Santerre
Honored Contributor

Re: fs reduction on /opt (lvol6)

Actually, I don't think it is necessarily the Online JFS tool that is causing your problem, but simply, cause you might have data in the part that Online JFS is trying to reduce.

When it comes to reducing File systems, it is always recommended to rebuild rather than reduce like this as it may cause a lot of trouble.
Cooperation is doing with a smile what you have to do anyhow.
Pete Randall
Outstanding Contributor

Re: fs reduction on /opt (lvol6)

Ted,

Did you try a reorg first?

fsadm -F vxfs -d -D -e -E /opt


Pete

Pete
Ted Mims
Occasional Advisor

Re: fs reduction on /opt (lvol6)

Currently lvol6 is sitting at 5689344 total kbytes while using only 823192. So it has used only 15%. I have reorganized directories and extents but get the same message with attempting the shrink. I am trying to reduce to either 4 or 5 GB
Pete Randall
Outstanding Contributor

Re: fs reduction on /opt (lvol6)

Ted,

Online JFS is great at extending but notorious for not being able to reduce file systems. I think your best bet is to rebuild, either via Ignite or the single user, clobber, restore method.

Pete

Pete
Elif Gius
Valued Contributor

Re: fs reduction on /opt (lvol6)

If you can avoid to reduce a filesystem then do it. It is not a godd idea to reduce /opt with fsadm.
The best would be to go to single user mode.
Donald Kok
Respected Contributor

Re: fs reduction on /opt (lvol6)

Hi Ted,

You better not do this on a production machine. This is looking for trouble. There are at least 2 better ways to perform what you want.

1. make an ignitetape and reinstall your system with it. (In the reinstalling you can adjust the fs-sizes)
2. go to singleuser mode. copy the /opt dir to a temporary filesystem. remove and make the lvol again, and copy the /opt back.

Goodluck
Donald
My systems are 100% Murphy Compliant. Guaranteed!!!
Pete Randall
Outstanding Contributor

Re: fs reduction on /opt (lvol6)

To expand on Donald's second suggestion:

If you've got the room to copy /opt to a second file system, do it first, then switch the mountpoints in /etc/fstab and reboot. You're done! No need for single user mode at all.

Pete

Pete
TwoProc
Honored Contributor

Re: fs reduction on /opt (lvol6)

Pete Randall's response is what I'd recommend. I've used that method on several occasions, and it is the easiest and least risky. That is, if you have the space.
We are the people our parents warned us about --Jimmy Buffett
A. Clay Stephenson
Acclaimed Contributor

Re: fs reduction on /opt (lvol6)

Also note that /opt does not have to be on the boot disk (or even in vg00) so this should give you more options.

If at all possible I avoid shrinking filesystems especially on production systems.

If it ain't broke, I can fix that.