directory /var used 100%. Come risolvo?

Postate qui per tutte le discussioni legate a Linux in generale.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Gnu/Linux in genere, se l'argomento è specifico alla Slackware usate uno dei forum Slackware o Slackware64.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Rispondi
fabriBit
Linux 1.x
Linux 1.x
Messaggi: 160
Iscritto il: lun 18 lug 2005, 0:00
Località: roma

directory /var used 100%. Come risolvo?

Messaggio 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

Avatar utente
murdock
Linux 2.x
Linux 2.x
Messaggi: 477
Iscritto il: ven 25 mag 2007, 12:58
Slackware: 64 14.1
Kernel: 3.18.3
Desktop: KDE 4.14.3
Contatta:

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

Messaggio 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

Avatar utente
DanBadJar
Linux 4.x
Linux 4.x
Messaggi: 1027
Iscritto il: ven 28 lug 2006, 19:27
Nome Cognome: Daniele Malavasi
Slackware: 13.1
Kernel: 2.6.34.1
Desktop: XFCE - Gnome
Località: Bologna
Contatta:

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

Messaggio da DanBadJar »

Cancella anche i log che non servono più

Avatar utente
ponce
Iper Master
Iper Master
Messaggi: 3123
Iscritto il: mer 5 mar 2008, 16:45
Nome Cognome: Matteo Bernardini
Slackware: slackware64-current
Kernel: 7.0.12
Desktop: lxde
Località: Pisa
Contatta:

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

Messaggio 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.

fabriBit
Linux 1.x
Linux 1.x
Messaggi: 160
Iscritto il: lun 18 lug 2005, 0:00
Località: roma

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

Messaggio 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

Rispondi