Operating System - HP-UX
1748089 Members
4854 Online
108758 Solutions
New Discussion юеВ

Re: The /var filesystem is full

 
SOLVED
Go to solution
Deborah J. Johnson
New Member

The /var filesystem is full

How can I extend the /var filesystem (HP-UX 10.20)? I tried extending it through sam, but was unsuccessful. The following processes are attached: syslogd, swagentd, cron, ptydaemon, vuegreet, lpsched, vtdaemon, ARMServer, etc. I am a part-time administrator, PLEASE HELP!!

THANKS
11 REPLIES 11
Pete Randall
Outstanding Contributor
Solution

Re: The /var filesystem is full

You need to get /var unmounted and the only way to accomplish that is to go into single user mode. Reboot the machine with the "shutdown -r -y 0" command. When it starts to come back up you'll receive a prompt that says you have 10 seconds to interrup the boot process by striking any key. Do so. Then enter "hpux -is" at the ISL prompt to boot into single user mode. Do a "mount -a" to get all the file systems mounted. The do a "umount /var" and run your lvextend and extendfs commands (syntax is available in the man pages for each - go to the Examples section).


Pete

Pete
MarkSyder
Honored Contributor

Re: The /var filesystem is full

Rather than extending it see if there are any things you can get rid of.

Check the size of the following files:

/var/adm/btmp
/var/adm/sulog
/var/adm/wtmp
/var/adm/cron/log
/var/adm/lp/log
/var/adm/syslog/mail.log
/var/adm/syslog/syslog.log

DO NOT delete any of these files: null them thus:

> /var/adm/syslog/syslog.log

but make sure you check the syslog first to make sure there's nothing you need to know about.

If you really are squeezed for space, you could set up a separate filesystem hanging of /var in its own logical volume: e.g. /var/adm/crash (which it's always a good idea to have in its own lvol anyway).

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Pete Randall
Outstanding Contributor

Re: The /var filesystem is full

You should also take a look at what is taking up all the room. Use "du -sk /var/* |sort -n" to give you a listing of the largest directories under /var. Then repeat the process under each of the largest directories to narrow down what is occupying all the space. There may be something you can get rid of rather than enlarging /var.


Pete

Pete
RAC_1
Honored Contributor

Re: The /var filesystem is full

You can not do this online. If you have OnlineJFS product, you can. This is licensed product.

In your case, start by looking at who is using the space.

cd /var
du -sk *|sort -nr

The files that are not required can be deleted. In case you have to extend it, then reboot the system, interrupt the boot process, interact with ISL and boot into single user mode.

Once on single user mode,
lvextend -L "new_size_in_MB" /dev/vg00/lvolxx
extendfs /dev/vg00/lvolx

Anil
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: The /var filesystem is full

If you have OnlineJFS(if that was offered on 10.20) you can extend it on the fly. All you need is space.

I'm doubting you have this, so here is a procedure, though its an 11.x procedure, it will probably work.

AT console

Boot box

Interupt at the 10 second prompt

hpux -is

N Do not Interact with the ISL/IPL

You are now in single use mode as root.

You now need to run the following commands:

lvextend -L
extendfs character device name for the logical volume

Then

shutdown -ry now

Then you are done.

There is no sam in single user mode, but before you start you should do the following:

Figure out the name of the block and character devices for the logical volume you wish to extend(sam or lvdisplay)

Find the same information for the disk you will be using new space on(pvdisplay or sam)

Find out the full path of the commands you want to use, because you won't have a PATH or environment in single user mode.

whence command

whence extendfs
whence lvextend

Do your homework prior to booting to single user mode and assuming you have disk space you can do the whole thing in under a half an hour.

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
Geoff Wild
Honored Contributor

Re: The /var filesystem is full

Pete has the way, but you might want to find out why it's full...

cd /var
du -sk * |sort -n

That will help you determine whre it is full...

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.
A. Clay Stephenson
Acclaimed Contributor

Re: The /var filesystem is full

Your first task is to determine if you have any available free space in the volume group which I assume is /dev/vg00.

Do a vgdisplay -v /dev/vg00 and note the PE Size and and "Free PE" values listed. The sum of the product of PE_SIZE and Free PE's will give you the amount of free space.

Your first task should probably be to find any files that you might be able to safely remove. Look in /var/tmp and /var/mail.

You should also do a swlist | grep -i "JFS"

If you hace OnlineJFS then you should be able to expand the filesyste in place otherwise you are going to have to knock down to single user and extend the LVOL and filesystem using commands.

If it ain't broke, I can fix that.
Fabio Ettore
Honored Contributor

Re: The /var filesystem is full

Hi Deborah,

you should accomplish it in single user mode and other guys already said enough about steps.
The only one thing that I would suggest you to check if under /var/adm/crash there are old crash files. If they are old then you can remove it and I think it would free a lot of space.

Just a thought....

Best regards,
Fabio
WISH? IMPROVEMENT!
Bernie Vande Griend
Respected Contributor

Re: The /var filesystem is full

ANother good place to look is often /var/adm/sw where all the patches are located can take up a lot of space. If you added patch bundles recently and everything is stable, do a "cleanup -c 1" and you'll commit all patches beyond going back one level which is usually good for most situations.
Ye who thinks he has a lot to say, probably shouldn't.