1819744 Members
2985 Online
109606 Solutions
New Discussion юеВ

Re: opt file system full

 
susee
Advisor

opt file system full

hi all ,

In one of my production ( hp ) server the /opt filesystem is nearing 100% , i have attached the big files in the attachment . can any one suggest me to remove the unwanted files or to trim any log files .
bdf /opt
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol6 1024000 1010356 38124 99% /opt

And i would also like to clarify that what filesystems does the online jfs does not apply , can i increase the opt filesystem thru online JFS .

Please post your valuable suggesstions
Thanks in advance
Susee
25 REPLIES 25
Steven E. Protter
Exalted Contributor

Re: opt file system full

Shalome Susee,

The /opt filesystem is for binaries and has very little variable data. It can safely be left at 99% ifyou wish.

To expand it.

lvextend the logical volume
use fsadm to extend the filesystem with OnlineJFS.

The way to reduce the usage of /opt is to remove optionaal software.

ll /opt
to get an idea whats there.

Then use swremove to remove what you don't need.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: opt file system full

Hi Susee:

Properly setup, '/opt' should be static in size. '/var' should be the repository of most log files, including those from applications in '/opt'.

Yes, you absolutely can use OnlineJFS to resize '/opt'.

Regards!

...JRF...
susee
Advisor

Re: opt file system full

Hi Steven,

Is there any possible way to find the unused softwares .
and is it possible to compress/unavailable softwares and make it available when requested .

A. Clay Stephenson
Acclaimed Contributor

Re: opt file system full

Essentially nothing in /opt can be safely removed except via the swremove command. If you have some packages that you no longer need then you can swremove them. If you have OnlineJFS, you can readily expand /opt. Another option is to move /opt out of vg00 altogether -- or at least off the boot disk. Only /stand, primary swap, and / MUST be on the boot disk. Occasionally I move /opt to another VG. You can create a /newopt filesystem and tar or cpio your current /opt to it. You then umount /newopt and as a last step, edit /etc/fstab and change the mountpoint of /newopt to /opt and comment out the original /opt. Reboot and you can later remove the original LVOL to free up vg00 space.
If it ain't broke, I can fix that.
James George_1
Trusted Contributor

Re: opt file system full

Hi

To extend your FS with online JFS

# lvextend -L 2048 /dev/vg00/lvol6
# fsadm -F vxfs -b 2048m /opt

check bdf .

Rgds / James

forum is for techies .....heaven is for those who are born again !!
A. Clay Stephenson
Acclaimed Contributor

Re: opt file system full

The downside to leaving /opt at near capacity is that patch installations are almost certainly going to fail. I've also seen a few cases that even when the swinstall diskspace check passed the actual install failed because of not enough space so it's best to leave a little extra headroom. I would definitely increase /opt or swremove some unused packages.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: opt file system full

I would extend it - most of my /opt's are 2GB in size (some even 4GB).

lvextend -L 2048 /dev/vg00/lvol6
fsadm -F vxfs -b 2048M /opt

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
susee
Advisor

Re: opt file system full

Hi all

Since this is in VG00 , when increasing will it affect other filesystems in vg00
currently i am having ( / , /swap , /var , /usr , /stand , tmp ) in vg00 .

thanks in advance
A. Clay Stephenson
Acclaimed Contributor

Re: opt file system full

No, that the beauty of OnlineJFS. It will leave the other LVOL's completely untouched. Just make sure that you extend the LVOL before extending the filesystem.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: opt file system full

Hi Susee:

No, increasing '/opt' will not affect the other filesystems residing in vg00.

There is no requirement for the logical volume that underlies '/opt' to have configuous extents, so enlarging it will not be a problem.

Regards!

...JRF...
Uday_S_Ankolekar
Honored Contributor

Re: opt file system full

If you have free extents available in vg00 then best way is to increase the file system or swremove applications that you don't need.
Extending a file system does not effet any other file system.
Check if you have online jfs installed and free extents available to increase filesystem online with method given by other fellow forum members.

Good luck
-USA..
Good Luck..
susee
Advisor

Re: opt file system full

Hi all ,

lvextend has failed can you suggest me what is the problem even i find enough free PE's are available .

lvextend -L 2048 /dev/vg00/lvol6
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol6" could not be extended.
Failure possibly caused by strict allocation policy

# vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 19
Open LV 19
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 7285
Free PE 1395
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 112
Current LE 28
Geoff Wild
Honored Contributor

Re: opt file system full

Do a :

lvdisplay -v /dev/vg00/lvol6 |grep Allocation

Does it show strict? or strict/contiguous?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
susee
Advisor

Re: opt file system full

Hi geoff

it is strict

# lvdisplay /dev/vg00/lvol6
--- Logical volumes ---
LV Name /dev/vg00/lvol6
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
Devender Khatana
Honored Contributor

Re: opt file system full

Hi,

This is because you have not continuous extents available and your LVOL is set for continuous. This can be changed by

#lvchange -C n /dev/vg00/lvol6

Then retry vgextend.

Moreover apart from extending /opt you can remove one of the older versions of java if not in use. More than one version of java are seen in the attachment of the file list.

HTH,
Devender
Impossible itself mentions "I m possible"
A. Clay Stephenson
Acclaimed Contributor

Re: opt file system full

Does your lvdisplay -v /dev/vg00/lvol6 display a "struct/contigious" Allocation Policy. If so then you cannot extend the LVOL but this is not common for /opt. I suspect what is really the problem is that this LVOL is mirrored and while there is enough total space in the VG to extend the LVOL there is not enough free PE's on each PV to allow the mirrors to be extended on separate PV's. It looks like moving /opt out of vg00 may be your least evil option.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: opt file system full

With strict - you should be able to lvextend it....

Post full output of vgdisplay -v vg00 - so we can see the disks at the end...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
susee
Advisor

Re: opt file system full

Hi geoff

here is the output

# vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 19
Open LV 19
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 7285
Free PE 1395
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 112
Current LE 28
Allocated PE 56
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available
LV Size (Mbytes) 4096
Current LE 1024
Allocated PE 2048
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 140
Current LE 35
Allocated PE 70
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 20
Current LE 5
Allocated PE 10
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 1400
Current LE 350
Allocated PE 700
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

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

LV Name /dev/vg00/lvol10
LV Status available/syncd
LV Size (Mbytes) 12
Current LE 3
Allocated PE 6
Used PV 2

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

LV Name /dev/vg00/lvol12
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/lvol13
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 256
Used PV 2

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

LV Name /dev/vg00/lvol15
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0

LV Name /dev/vg00/lvol16
LV Status available/syncd
LV Size (Mbytes) 76
Current LE 19
Allocated PE 19
Used PV 1

LV Name /dev/vg00/lvol17
LV Status available/syncd
LV Size (Mbytes) 200
Current LE 50
Allocated PE 50
Used PV 1

LV Name /dev/vg00/lvol18
LV Status available/syncd
LV Size (Mbytes) 100
Current LE 25
Allocated PE 25
Used PV 1

LV Name /dev/vg00/lvol19
LV Status available/syncd
LV Size (Mbytes) 100
Current LE 25
Allocated PE 25
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c5t8d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c3t8d0
PV Status available
Total PE 4340
Free PE 1395
Autoswitch On
--------------------------------

and i would also like to confirm the syntax
for changing it

lvchange -s n /dev/vg00/lvol6
Devender Khatana
Honored Contributor

Re: opt file system full

Hi,

As the first disk do not have any free space you can not extend a mirroed LVOL with strict allocation policy and will not have benefit of mirroring it otherwise.

There are too many small LVOLs in first disk itself which I do not think would be of any actual use. If these small LVOL can be removed then you should be able to extend the mirrored LVOL. You should extend the LVOL only by the space available on both the disks.

HTH,
Devender
Impossible itself mentions "I m possible"
A. Clay Stephenson
Acclaimed Contributor

Re: opt file system full

Exactly as I suspected. your allocation is "strict" fortunenately not "strict/contigious" but you have no space left on PV0 so the mirrors can't be placed on separate PV's for safety. Your vg00 is more or less a mess with some LVOL's mirrored and some not. Normally, vg00 should only be used for the OS and other data/applications should go in a separate VG. This makes for a much cleaner system. You have some major housekeeping to do if you want to extent opt. Of course, you could drop the mirror but that has risks.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: opt file system full

No need to change the lv - you need to free up your PV 0 - and then you can extend...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Devender Khatana
Honored Contributor

Re: opt file system full

Hi,

Another good options seems to be by moving one of unmirrored LVOLs to the second disk. lvol14-lvol19 can be reallocated to the second disk. This will create some space in first disk and will allow you to extend mirror LVOL. This can be simply done by

#pvmove -n /dev/vg00/lvol14 /dev/dsk/c5t8d0 /dev/dsk/c3t8d0

Repeat same for lvol16,17,18,19.

This will create 1500MB of free space on first disk and the balance free space in second disk will still be 4080MB, allowing you to extend lvol6 (opt).

This can be done online but the performance will be slightly low. Also do cconsider the low size LVOLs, if they are not mounted and are not in use these can be really removed. Sometime for practicing commands some new administrators create such LVOLs and then leave them. You can find the usage from bdf output.

But even without removing them you can extend opt by using pvmove.

HTH,
Devender
Impossible itself mentions "I m possible"
A. Clay Stephenson
Acclaimed Contributor

Re: opt file system full

Before doing anything, I would carefully map out the system as it is and as you want it to be. This is really a time to "do it right". You should also ask yourself, "what would happen if I lost a disk?". Again, a "clean" system has OS stuff in vg00 and nothing else. Yours is far from clean.
If it ain't broke, I can fix that.
susee
Advisor

Re: opt file system full

Hi all ,

Thanks for every one those who gave me the solutions ,

Finally we plan to moveout the /opt filesystem from vgoo ..and extend the filesystem after that

we have scheduled later this month .
let me post some messages during that actvity

once again thanks for all .

Susee