Pagina 1 di 1

directory /var used 100%. Come risolvo?

Inviato: mer 22 apr 2009, 17:00
da fabriBit
Ciao a tutti, utilizzo Fedora 7...
nella directory /var c'è anche il proxy squid (/var/spool/squid) ho il seguente problema:

used 100% ..come risolvo per riportare l'uso ad una percentuale normale?
preciso che il server funziona solo come web-proxy..

in allegato vi posto hard disk:
Immagine

grazie per un eventuale aiuto :-k

Re: directory /var used 100%. Come risolvo?

Inviato: mer 22 apr 2009, 17:34
da murdock
Squid è un cached proxy, probabilmente a lungo andare la cache di squid ha saturato l'hard disk.
Prova a rivedere le regole di caching di squid.

Saluti,
MuRdOcK

Re: directory /var used 100%. Come risolvo?

Inviato: mer 22 apr 2009, 17:35
da DanBadJar
Cancella anche i log che non servono più

Re: directory /var used 100%. Come risolvo?

Inviato: mer 22 apr 2009, 21:53
da ponce
puoi anche fermare squid, fare un

Codice: Seleziona tutto

rm -fR /var/cache/squid/*
(la directory della cache, quella con le tante sottocartelle, sostituisci il tuo percorso)
e poi ricreare le directory della cache con

Codice: Seleziona tutto

squid -z
comunque ti conviene rivedere le impostazioni per diminuirne le dimensioni, 8 giga sono pochini se lavora tanto, ti si riempira' di nuovo.
e' l'opzione cache_dir dentro squid.conf

Codice: Seleziona tutto

#  TAG: cache_dir
#	Usage:
#	
#	cache_dir Type Directory-Name Fs-specific-data [options]
#
#	You can specify multiple cache_dir lines to spread the
#	cache among different disk partitions.
#
#	Type specifies the kind of storage system to use.  Most
#	everyone will want to use "ufs" as the type.  If you are using
#	Async I/O (--enable async-io) on Linux or Solaris, then you may
#	want to try "aufs" as the type.  Async IO support may be
#	buggy, however, so beware.
#
#	'Directory' is a top-level directory where cache swap
#	files will be stored.  If you want to use an entire disk
#	for caching, then this can be the mount-point directory.
#	The directory must exist and be writable by the Squid
#	process.  Squid will NOT create this directory for you.
#
#	The ufs store type:
#
#	"ufs" is the old well-known Squid storage format that has always
#	been there.
#
#	cache_dir ufs Directory-Name Mbytes L1 L2 [options]
#
#	'Mbytes' is the amount of disk space (MB) to use under this
#	directory.  The default is 100 MB.  Change this to suit your
#	configuration.
#
#	'Level-1' is the number of first-level subdirectories which
#	will be created under the 'Directory'.  The default is 16.
#
#	'Level-2' is the number of second-level subdirectories which
#	will be created under each first-level directory.  The default
#	is 256.
#
#	The aufs store type:
#
#	"aufs" uses the same storage format as "ufs", utilizing
#	POSIX-threads to avoid blocking the main Squid process on
#	disk-I/O. This was formerly known in Squid as async-io.
#
#	cache_dir aufs Directory-Name Mbytes L1 L2 [options]
#
#	see argument descriptions under ufs above
#
#	The diskd store type:
#
#	"diskd" uses the same storage format as "ufs", utilizing a
#	separate process to avoid blocking the main Squid process on
#	disk-I/O.
#
#	cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
#
#	see argument descriptions under ufs above
#
#	Q1 specifies the number of unacknowledged I/O requests when Squid
#	stops opening new files. If this many messages are in the queues,
#	Squid won't open new files. Default is 64
#
#	Q2 specifies the number of unacknowledged messages when Squid
#	starts blocking.  If this many messages are in the queues,
#	Squid blocks until it recevies some replies. Default is 72
#
#	Common options:
#
#	read-only, this cache_dir is read only.
#
#	max-size=n, refers to the max object size this storedir supports.
#	It is used to initially choose the storedir to dump the object.
#	Note: To make optimal use of the max-size limits you should order
#	the cache_dir lines with the smallest max-size value first and the
#	ones with no max-size specification last.
#
#Default:
# cache_dir ufs /var/spool/squid 100 16 256
### Cache partition size: 1.57 GB = 1570 MB 
cache_dir ufs /var/spool/squid 1400 16 256
se vedi che e' di una dimensione minore, allora molto probabilmente. come ti hanno consigliato, ti conviene dare un'occhiata dentro /var/log e magari anche nella cache del tuo gestore di pacchetti: gli aggiornamenti scaricati spesso si accumulano e occupano diverso spazio, magari ci sono un sacco di rpm che puoi cancellare.

Re: directory /var used 100%. Come risolvo?

Inviato: lun 27 apr 2009, 15:25
da fabriBit
Grazie mille per il vostro aiuto..
ho risolto con Parted Magic..
sono fortunato perchè la directory var "confinava" con i 60gb di spazio libero sul disco..
per cui ho fatto il boot da cd...ho dimensionato a mio piacimento (20gb di var)..riavviato e
finalmente ho risolto il mio problema...100% è diventato 4%..
\:D/

grazie a tutti