Operating System - HP-UX
1843986 Members
1657 Online
110226 Solutions
New Discussion

Re: How to increase the /var space?

 
Dario_4
Frequent Advisor

How to increase the /var space?

Hello admins,
today i read this on my system:

vxfs: mesg 001: vx_nospace - /dev/vg00/lvol8 file system full (1 block extent)
Short file
ERROR: PHCO_24723.depot checksum is 05381 should be 12857
ERROR: wc results of PHCO_24723.depot are 98664 285243 13724498 should be 124069
363010 18155520

/dev/vg00/lvol8 512000 504116 7585 99% /var
Unfortunatly, it's full.

Someone can explain me the correct procedure to add a disk and dedicate his space to /var?

Thanks
12 REPLIES 12
Insu Kim
Honored Contributor

Re: How to increase the /var space?

Copy everything in /var to a newly mounted volume and verify that everything is there.
Finally do symbolic link.


# mount /dev/vgXX/lvolY /new_var
# cd /var ; find . | cpio -pdmuxl /new_var
# dircmp -s /var /new_var
# rm -rf /var
# ln -s /new_var /var

Hope this helps,
Hope this helps,
Never say "no" first.
Frederic Sevestre
Honored Contributor

Re: How to increase the /var space?

Hi,

Did you check that there is no space left on the vg00 ? (vgdisplay -v vg00 --> free PE). If you have enough free PE go to b

a. To add a disk cxtydz to vg00:
pvcreate /dev/rdsk/cxtydz
then
vgextend vg00 /dev/dsk/cxtydz

b. Then to extend the logical volume
lvextend -L /dev/vg00/lvol8
where the size is the the total size after extending the lv.

c. To extend the file system if you have OnlineJFS :
fsadm -F vxfs -b /var
where the size is 1024*size in Mo
else you will have to run the system in single user mode to have no process on /var and type extendf -F vxfs /dev/vg00/rlvol8

Fr??d??ric
Crime doesn't pay...does that mean that my job is a crime ?
Roberto Volsa
Frequent Advisor

Re: How to increase the /var space?

First of all check if there is space on disk where /var is mounted: do a vgdisplay anche take note of disks; no those disks do a pvdisplay and check for "free extents" (1 extent 4 Mb usually). If there is space do:
lvextend -L xxMb /dev/vg00/lvol8
extendfs -F vkfs /dev/vg00/rlvol8

xxMb is the wanted /var dimension, not how much to incrase.
Hope this helps.
Joseph Chakkery
Valued Contributor

Re: How to increase the /var space?

Hello,

Using vgdisplay -v /dev/vg00 check for free PE available. If u have eough PE to allocate then do the following.
$/sbin/shutdown -> for single user mode.
$/sbin/mount /var -> will mount /var
$/sbin/lvextend ???L newsize /dev/vg00/lvol? -> extend the lvol size
$/sbin/umount /var -> unmount /var
$/sbin/extendfs /dev/vg00/rlvol? -> Extend file system size to lvol size
$/sbin/mount /var -> mount /var
$/sbin/reboot ???r -> reboots in multiuser mode


Hope this will help u.

Regards
Joe.
Knowledge is wealth
Dario_4
Frequent Advisor

Re: How to increase the /var space?

I do this:
-init 1
-killall
-umount /var

..and now i wuold like to add the disk 14/0/2.0.0 to /var.

How can do this?

Thanks
Marcin Wicinski
Trusted Contributor

Re: How to increase the /var space?

Hi,

Increasing /var file system force us to umount /var. It is possible only when no processes are attached to the file system. Thus you have to reboot to single user mode. Command "init s" wont work ( some processes remain attached to /var ).

Later,

Marcin Wicinski
Paula J Frazer-Campbell
Honored Contributor

Re: How to increase the /var space?

Hi

Instead of just allocating more space to /var first check as to why it is full as log files grow in this area.

Start points are in /var/adm and the files wtmp, btmp and sulog


Either use Sam to trim them or:-

cat /dev/nul >

HTH

Paula
If you can spell SysAdmin then you is one - anon
Dario_4
Frequent Advisor

Re: How to increase the /var space?

Ok,
this is my definitive choose.
-init 1
-killall
-umount /var
-pvcreate /dev/rdsk/c1t0d0
-vgextend vg00 /dev/dsk/c1t0d0
-lvextend -L 8000 /dev/vg00/lvol8 (this means that i have use 8gig for /var. But if i wuold like to dedicate all disk to /var?)

Thanks to all
Vincent Farrugia
Honored Contributor

Re: How to increase the /var space?

Hello,

The disk is only available to /var at the moment. You can increase the size of it anytime using lvextend and fsadm. In order for it to be avalaible to other logical volumes, you need to lvextend them to the disk just like you did with /var.

HTH,
Vince
Tape Drives RULE!!!
Santosh Nair_1
Honored Contributor

Re: How to increase the /var space?

You really shouldn't need that much space for /var...I would think 2GB would be more than enough. Also, consider moving /var/adm/sw onto its own filesystem. That way you don't have to worry about /var filling up every time you install any software/patch (you'll have to worry about /var/adm/sw filling up though, but that's a much easier situation to handle).

You don't need to use the whole 8GB for /var, you can also extend other LVs in that volume group if you need to.

Finally, the last step after the lvextend should be extenfs /dev/vg00/lvol8. This should extend the filesystem to span the whole 8GB (or 2GB if you prefer).

-Santosh
Life is what's happening while you're busy making other plans
Dario_4
Frequent Advisor

Re: How to increase the /var space?

Guys...it doesn't works.


root@testmnp [/]
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 143360 69689 69127 50% /
/dev/vg00/lvol1 127573 70825 43990 62% /stand
/dev/vg00/lvol8 512000 504078 7620 99% /var
/dev/vg00/lvol7 1048576 502223 512261 50% /usr
/dev/vg00/lvol4 1048576 202449 793298 20% /tmp
/dev/vg00/lvol6 1048576 803069 230179 78% /opt
/dev/vg00/lvol5 4194304 129046 3811227 3% /home


I do this:

-init 1
-killall
-umount /var
-pvcreate /dev/rdsk/c1t0d0
-vgextend vg00 /dev/dsk/c1t0d0
-lvextend -L 8000 /dev/vg00/lvol8
I forget something ?
May be extendfs /dev/vg00/lvol8 ?

Dario_4
Frequent Advisor

Re: How to increase the /var space?

Thanks to all.
I forget extendfs /dev/vg00/lvol8

root@testmnp [/]
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 143360 69699 69116 50% /
/dev/vg00/lvol1 127573 70825 43990 62% /stand
/dev/vg00/lvol8 8192000 506001 7205817 7% /var
/dev/vg00/lvol7 1048576 502228 512256 50% /usr
/dev/vg00/lvol4 1048576 202450 793297 20% /tmp
/dev/vg00/lvol6 1048576 803069 230179 78% /opt
/dev/vg00/lvol5 4194304 129046 3811227 3% /home

Now, it works fine.
Bye && thanks