f



/var getting clogged up

Hi,
My disks are getting to be a bit of a shambles, so I removed the ports
collection, and then had a look in /var.  I note that my spool is quite
full with leafnode (but not inodes, so it's not _that_ urgent), but that
there's also 10MB sitting in /var/db/pkg

Do I need this ?  Can I delete it ? 

Ta.

0
Desmond
11/24/2003 12:16:29 PM
comp.unix.bsd.freebsd.misc 13187 articles. 1 followers. Post Follow

11 Replies
2580 Views

Similar Articles

[PageSpeed] 52

Desmond Coughlan <fuckoffspam@zeouane.org> wrote
	in <slrnbs3tkt.17uj.fuckoffspam@lievre.voute.net>:
# Hi,
# My disks are getting to be a bit of a shambles, so I removed the ports
# collection, and then had a look in /var.  I note that my spool is quite
# full with leafnode (but not inodes, so it's not _that_ urgent), but that
# there's also 10MB sitting in /var/db/pkg
# 
# Do I need this?

Yes, the ports and package system store a lot of info there.

# Can I delete it?

No. That would be asking for trouble when you use ports and packages.
The right thing is to remove transient data from your news spool,
maybe by expiring older articles more often.

Regards,

	Jens
-- 
Jens Schweikhardt  http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)
0
Jens
11/24/2003 12:11:51 PM
Jens Schweikhardt <usenet@schweikhardt.net> wrote ... 

{ snip }

> # Do I need this?

> Yes, the ports and package system store a lot of info there.

My ports collection has gone; I deleted it.

> # Can I delete it?

> No. That would be asking for trouble when you use ports and packages.
> The right thing is to remove transient data from your news spool,
> maybe by expiring older articles more often.

I'm going to run texpire this weekend, but since I don't use ports (never
used them much anyway), I thought I could just get rid of this 'db' ... 

-- 
Desmond Coughlan               |desmond [at] zeouane [dot] org
http://www.zeouane.org/ 
0
Desmond
11/24/2003 12:26:36 PM
In article <slrnbs3tkt.17uj.fuckoffspam@lievre.voute.net>,
Desmond Coughlan  <pasdespam_desmond@zeouane.org> wrote:

>My disks are getting to be a bit of a shambles, so I removed the ports
>collection, and then had a look in /var.  I note that my spool is quite
>full with leafnode (but not inodes, so it's not _that_ urgent), but that
>there's also 10MB sitting in /var/db/pkg

>Do I need this ?  Can I delete it ? 

I'd suggest storing your news somewhere on /usr and then
using symlinks have the data targeted to /var/spool/news [if that's
the culprit] point ot /usr/spool/news/

Also check to see that something huge may be in /var/mail.
Sometimes an account you are not aware of will get a lot of email
because of error messages. I had that happen with the web owner -
www.

Bill
-- 
Bill Vermillion - bv @ wjv . com
0
bv
11/24/2003 2:15:00 PM
In article <sdtspb.lv71.ln@zeouane.org>,
Desmond Coughlan  <pasdespam_desmond@zeouane.org> wrote:
>Jens Schweikhardt <usenet@schweikhardt.net> wrote ... 
>
>{ snip }
>
>> # Do I need this?
>
>> Yes, the ports and package system store a lot of info there.
>
>My ports collection has gone; I deleted it.
>
>> # Can I delete it?
>
>> No. That would be asking for trouble when you use ports and packages.
>> The right thing is to remove transient data from your news spool,
>> maybe by expiring older articles more often.

>I'm going to run texpire this weekend, but since I don't use ports (never
>used them much anyway), I thought I could just get rid of this 'db' ... 

Doesn't package also use db.  As you get more and more used to
FreeBSD you'll find that ports and the portupgrade are almost 
indispensable.

How large is your /var partition.  It really doesn't need to be too
big but maybe you made it too small.  What does   df -H show?

Bill

-- 
Bill Vermillion - bv @ wjv . com
0
bv
11/24/2003 2:15:01 PM
Bill Vermillion <bv@wjv.comremove> wrote ... 

>>> # Do I need this?

>>> Yes, the ports and package system store a lot of info there.

>>My ports collection has gone; I deleted it.

>>> # Can I delete it?

>>> No. That would be asking for trouble when you use ports and packages.
>>> The right thing is to remove transient data from your news spool,
>>> maybe by expiring older articles more often.

>>I'm going to run texpire this weekend, but since I don't use ports (never
>>used them much anyway), I thought I could just get rid of this 'db' ... 

> Doesn't package also use db.  As you get more and more used to
> FreeBSD you'll find that ports and the portupgrade are almost 
> indispensable.
> 
> How large is your /var partition.  It really doesn't need to be too
> big but maybe you made it too small.  What does   df -H show?

Filesystem     Size   Used  Avail Capacity  Mounted on
/dev/ad0s1f    492M   397M    56M    88%    /var

I think I'm just going to delete it ... if it goes pear-shaped (_when_ it
goes pear-shaped), I'll run portupgrade, or something.


-- 
Desmond Coughlan               |desmond [at] zeouane [dot] org
http://www.zeouane.org/ 
0
Desmond
11/24/2003 2:37:55 PM
Desmond Coughlan <pasdespam_desmond@zeouane.org> wrote
	in <sdtspb.lv71.ln@zeouane.org>:
# Jens Schweikhardt <usenet@schweikhardt.net> wrote ... 
# 
# { snip }
# 
#> # Do I need this?
# 
#> Yes, the ports and package system store a lot of info there.
# 
# My ports collection has gone; I deleted it.

Do you have any ports or packages *installed*? This is what /var/db/pkg
is for: e.g. holding lists of files belonging to a port so you can
e.g. uninstall a port with pkg_delete.

#> # Can I delete it?
# 
#> No. That would be asking for trouble when you use ports and packages.
#> The right thing is to remove transient data from your news spool,
#> maybe by expiring older articles more often.
# 
# I'm going to run texpire this weekend, but since I don't use ports (never
# used them much anyway), I thought I could just get rid of this 'db' ... 

Don't. You gain only 10M and severly cripple the pkg_* tools.

Regards,

	Jens
-- 
Jens Schweikhardt  http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)
0
Jens
11/24/2003 3:38:57 PM
Desmond Coughlan <pasdespam_desmond@zeouane.org> writes:

> I think I'm just going to delete it ... if it goes pear-shaped (_when_ it
> goes pear-shaped), I'll run portupgrade, or something.

Portupgrade is not going to work after deleting the package
db. Neither will pkg_deinstall, pkg_info etc. /var/db/pkg records
information about /installed/ packages, if this information is gone,
there is no way to restore it (except backups, of course). So if you
have any packages installed and perhaps some day want to deinstall or
upgrade it cleanly, keep it around.

Why not move it to some other partition with more space and symlink it
to /var/db/pkg? That way you'll save the space and things will
continue to work.
0
Henrik
11/24/2003 3:49:22 PM
Henrik Motakef <usenet-reply@henrik-motakef.de> wrote ... 

>> I think I'm just going to delete it ... if it goes pear-shaped (_when_ it
>> goes pear-shaped), I'll run portupgrade, or something.

> Portupgrade is not going to work after deleting the package
> db. Neither will pkg_deinstall, pkg_info etc. /var/db/pkg records
> information about /installed/ packages, if this information is gone,
> there is no way to restore it (except backups, of course). So if you
> have any packages installed and perhaps some day want to deinstall or
> upgrade it cleanly, keep it around.
> 
> Why not move it to some other partition with more space and symlink it
> to /var/db/pkg? That way you'll save the space and things will
> continue to work.

You've convinced me.  :-)

-- 
Desmond Coughlan               |desmond [at] zeouane [dot] org
http://www.zeouane.org/ 
0
Desmond
11/24/2003 5:19:10 PM
In article <345tpb.pa81.ln@zeouane.org>,
Desmond Coughlan  <pasdespam_desmond@zeouane.org> wrote:
>Bill Vermillion <bv@wjv.comremove> wrote ... 
>
>>>> # Do I need this?
>
>>>> Yes, the ports and package system store a lot of info there.
>
>>>My ports collection has gone; I deleted it.
>
>>>> # Can I delete it?
>
>>>> No. That would be asking for trouble when you use ports and packages.
>>>> The right thing is to remove transient data from your news spool,
>>>> maybe by expiring older articles more often.
>
>>>I'm going to run texpire this weekend, but since I don't use ports (never
>>>used them much anyway), I thought I could just get rid of this 'db' ... 
>
>> Doesn't package also use db.  As you get more and more used to
>> FreeBSD you'll find that ports and the portupgrade are almost 
>> indispensable.

>> How large is your /var partition.  It really doesn't need to be too
>> big but maybe you made it too small.  What does   df -H show?

>Filesystem     Size   Used  Avail Capacity  Mounted on
>/dev/ad0s1f    492M   397M    56M    88%    /var

>I think I'm just going to delete it ... if it goes pear-shaped
>(_when_ it goes pear-shaped), I'll run portupgrade, or something.

That is HUGE for var.  The most I've ever put in was about 125MB
on /var and that is for a mail server that currenty is
averaging of a 500,000 lines in the mail log each day - and I keep
10 days worth.  The popper logs get large as the clients - all
business uses poll at least every 5 minutes.  

My observation is you really only need large /var systems for
exceptionally busy systems, but 100-125MB is often overkill
in the 4.x [ but about the minimum for 5.x ]

Three places to check that can get large under var before you go
looking are in /var/spool.  A du on it will tell you if you have
some print of uucp jobs stuck there.

Then perform a du on /var/mail - as programs which mail error
messages to a special account can fill the system.

Look also in /var/log.  One that can sneak up on you as it is not
rotated in the syslog utility is the the error log from the web
server.  httpd-err*.    And IF for some reason you had it large
and removed it, then guess what, your disk space will still get
used as the file is kept open and there will be an invisible file
sucking up HD space.

You need to use logrotate, or remove the file and restart apache.

If none of these are the culprit - but I have a good hunch one of
those might be the problem - then do this.


cd /var
du . | less

And starting looking for really large files.

On my busy machines I perfom a symlin to put so that the default
/var/mail goes to /usr/mail and that /var/log goes to /usr/log

Your problem shouldn't be that hard, but don't remove the /var
or else you can create more problems than you imagine.

Bill


-- 
Bill Vermillion - bv @ wjv . com
0
bv
11/25/2003 5:05:03 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Vermillion <bv@wjv.comremove> wrote ... 

{ snip }

>>/dev/ad0s1f    492M   397M    56M    88%    /var
> 
>>I think I'm just going to delete it ... if it goes pear-shaped
>>(_when_ it goes pear-shaped), I'll run portupgrade, or something.

> That is HUGE for var.  The most I've ever put in was about 125MB
> on /var and that is for a mail server that currenty is
> averaging of a 500,000 lines in the mail log each day - and I keep
> 10 days worth.  The popper logs get large as the clients - all
> business uses poll at least every 5 minutes.  
> 
> My observation is you really only need large /var systems for
> exceptionally busy systems, but 100-125MB is often overkill
> in the 4.x [ but about the minimum for 5.x ]
> 
> Three places to check that can get large under var before you go
> looking are in /var/spool.  A du on it will tell you if you have
> some print of uucp jobs stuck there.

Done.  There was a user who hadn't logged in for a while, and who had 50 MB
of mail.  I 'su'ed' to their account and transferred those messages to her
$HOME.

{ snip }

> And starting looking for really large files.

{ snip }

I ran a du -h |sort -n>/tmp/bloated.var, which made interesting reading.
Still, that db file is huge ... :-(

- -- 
Desmond Coughlan               |desmond [at] zeouane [dot] org
http://www.zeouane.org/ 

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBP8RGv2iD+5zjSqyTEQLdEACgonang4PGjvl88WE/w8+8Xq6NCKMAnj1n
kBevblfZLYEQ7lAeFb4apdTJ
=7uq3
-----END PGP SIGNATURE-----
0
Desmond
11/26/2003 7:22:56 AM
In article <gck1qb.aoh1.ln@zeouane.org>,
Desmond Coughlan  <pasdespam_desmond@zeouane.org> wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Bill Vermillion <bv@wjv.comremove> wrote ... 

>{ snip }

>>>/dev/ad0s1f    492M   397M    56M    88%    /var
>> 
>>>I think I'm just going to delete it ... if it goes pear-shaped
>>>(_when_ it goes pear-shaped), I'll run portupgrade, or something.
>
>> That is HUGE for var.  The most I've ever put in was about 125MB
>> on /var and that is for a mail server that currenty is
>> averaging of a 500,000 lines in the mail log each day - and I keep
>> 10 days worth.  The popper logs get large as the clients - all
>> business uses poll at least every 5 minutes.  
>> 
>> My observation is you really only need large /var systems for
>> exceptionally busy systems, but 100-125MB is often overkill
>> in the 4.x [ but about the minimum for 5.x ]

>> Three places to check that can get large under var before you go
>> looking are in /var/spool.  A du on it will tell you if you have
>> some print of uucp jobs stuck there.

>Done. There was a user who hadn't logged in for a while, and who
>had 50 MB of mail. I 'su'ed' to their account and transferred
>those messages to her $HOME.

Surely beats reinstalling.

>{ snip }
>
>> And starting looking for really large files.

>{ snip }

>I ran a du -h |sort -n>/tmp/bloated.var, which made interesting reading.
>Still, that db file is huge ... :-(

Under /var/db you have the subdirectory called  pkg  - and I have
about 21MB in use on it, with just over 200 packages installed.

If you use portupgrade old packages get removed when new ones are
added.  If you don't do that you may find that you have several
versions of packages installed all taking up space.

Run pkg_info and pipe it through less [or your favorite pager]
and see what it thinks you have.    You may find  you have more
than you expected.

Under /var/db you have the locate database.  Depending on what
is set up it could get big.  I accidentally inlcuded my news spool
directory one time and nothing is more useless in locate that
strings of numbers for articles.

Glad got things at least partially under control.


-- 
Bill Vermillion - bv @ wjv . com
0
bv
11/26/2003 5:45:01 PM
Reply: