Operating System - HP-UX
1748156 Members
3739 Online
108758 Solutions
New Discussion

Re: /var space incress steps

 
Mast-San
Occasional Contributor

/var space incress steps

Dear All,

 

We have HP-UX 11.23 U ia64 server. VAR partition 75% full, what can I do to increase free space? Please guide the same.

 

Thanks in advance

 

Thanks & Regards, Mastan.

12 REPLIES 12
Dennis Handly
Acclaimed Contributor

Re: /var space increase steps

It may be simpler to find out what's taking all of that space and remove it.

What are the large directories?

For /var/adm/sw/, you can use cleanup(1m) to cleanup superseded patches.

For /var/tmp/, you can remove old files.

For /var/spool/, you can clean up old mail messages.

rariasn
Honored Contributor

Re: /var space incress steps

Hi Mastan:

 

Analyze output from next commands:

 

# du -skx /var/* | sort -nr | head -10

# find /var -type f -xdev -size +5000000c -exec ll {} \; 

 

rgs,

Pete Randall
Outstanding Contributor

Re: /var space incress steps

Check, with vgdisplay, to see if there is free space in vg00.  If there is, you can lvextend the lvol containing /var and then extendfs the file system (see the examples section of man lvextend (1M).  If not, you will have to provide extra space through vgextend first or start trimming, as others have suggested.


Pete
Hiren N Dave
Valued Contributor

Re: /var space incress steps

Hi,

 

You need free PEs in your root vg (vg00) to be able to extend any LVs. If you dont have any free space, then you need to add new disk and follow below steps.

 

# ioscan -fnC disk

# insf

# reboot the server in single user mode  (i.e.  boot -is from EFI shell)

# pvcreate /dev/rdsk/cxtxdx

# vgextend vg00 /dev/rdsk/cxtxdx

# umount /var

# lvextend /dev/vg00/lvol5   (Here, lvol5 is for /var mount point)

# extendfs -F vxfs /dev/vg00/lvol5

# mount /dev/vg00/lvol5 /var   (Or use mountall as it is already there in /etc/fstab)

 

Hope this helps!!!!

Cheers.

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
Doug O'Leary
Honored Contributor

Re: /var space incress steps

Hey;

 

As others have mentioned, the first thing to do is to see if there is anything that can be cleaned up in /var.  That filesystem holds log files and various temp files which have to be periodically cleaned up or the filesystem fills.

 

Things to check:

* /var/tmp - old files in here

* /var/adm/syslog - logs in here can grow w/o bounds

* /var/adm/*tmp* - btmp, wtmp, and wtmpx grow w/o bounds

* /var/adm/sw/save - where commitable patches are saved.

 

You should run "cleanup -c 1" to clean up any patches, then check those items above.  After that, I tend to run "du -sk * | sort -n -k 1" to find out where the space is being used.  

 

Once you've done that, and still need more space, you can extend the space in /var assuming you have the space available.

 

First, find out if you have online jfs:  "swlist -l fileset | grep -i onlinejfs".  

Next, find out if you have the space in vg00 to extend: "vgdisplay vg00"

If you have the space, ID the lv for /var: mount | grep -i "/var " | awk '{print $3}'

extend the filesystem: lvextend -L ${new_size_in_megs} ${lv}

if you have online jfs: fsadm -F vxfs -b $(new_size_in_megs}m /var
If you don't have online jfs, unmount /var and run extendfs -F vxfs ${raw_lv}

You'll probably have to go into single user mode in order to unmount /var.  *LOTS* of processes keep files open in that filesystem...

 

Hope that helps.

 

Doug O'Leary 


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Hiren N Dave
Valued Contributor

Re: /var space incress steps

Why this thread is still open!!!

 

http://h30499.www3.hp.com/t5/Integrity-Servers/var-space-incress-steps/m-p/5290241#M11050

 

 

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
Pete Randall
Outstanding Contributor

Re: /var space incress steps

> Why this thread is still open!!!

 

Is that supposed to be a question or a statement?  If it's a question, what is it you're questioning?  If it's a statement, could you explain what you're commenting about?


Pete
Hiren N Dave
Valued Contributor

Re: /var space incress steps

Check the link please, its a duplicate thread from same user, should have closed that thread if posted to different category by mistake. Wasn't that self understandable?

 

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
Pete Randall
Outstanding Contributor

Re: /var space incress steps

No, not to me.


Pete