[Résolu] Répertoire /var plein à 100 %

Bonjour,

  1. J’ai installé à la maison un petit serveur HP Proliant Gen 10 qui tourne avec une Debian 10 et Yunohost en version 4.1.6 (4.1.4 pour yunohost-admin et moulinette ; 4.1.3 pour ssowat). J’ai installé l’OS et Yunohost sur un SSD et créé une une grappes de 4 disques en RAID 6 qui me sert de stockage pour nextcloud.
    Quand je veux mettre à jour le serveur lui même, en ssh depuis mon PC client, j’ai le message suivant :

You don’t have enough free space in /var/cache/apt/archives/

En effet, la commande df -h confirme que le répertoire /var est plein à 100 % :

Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 745M 74M 671M 10% /run
/dev/mapper/gen10–ssd-root 23G 15G 6.9G 69% /
tmpfs 3.7G 0 3.7G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup
/dev/sda2 237M 49M 176M 22% /boot
/dev/sda1 511M 9.0M 502M 2% /boot/efi
/dev/mapper/gen10–ssd-var 9.2G 8.8G 0 100% /var
/dev/mapper/gen10–ssd-tmp 1.8G 6.4M 1.7G 1% /tmp
/dev/mapper/gen10–ssd-home 178G 22G 147G 13% /home
/dev/md0 7.3T 308G 6.6T 5% /media/stockage
tmpfs 745M 0 745M 0% /run/user/0

J’ai essayé de supprimer “sauvagement” quelques gros fichiers, à partir d’un accès au serveur avec FileZilla en parcourant le contenu du répertoire /var, notamment mail.info, mail.log et mail.warn (chacun 913 Mo) dans /var/mail ; et aussi syslog (987 Mo) dans /var/log.

En rebootant le serveur, j’ai toujours /var à 100% et je ne trouve plus de gros fichiers à supprimer en parcourant les sous répertoires de /var…

  1. Je précise que je rencontre simultanément un autre problème qui fait l’objet d’un autre message sur le forum ([Nom d’utilisateur ou mot de passe incorrect]) ; lorsque je veux me connecter depuis mon PC client au portail yunohost j’ai l’avertissement suivant :

Nom d’utilisateur ou mot de passe incorrect

Je peux accéder en ssh à mon serveur, mais j’ai alors souvent une ligne indiquant un problème d’accès au serveur ldap.

ldap_sasl_bind(SIMPLE): Can’t contact LDAP server (-1)

Merci de m’avoir lu jusqu’au bout.
Longue vie à Yunohost

bonsoir @tous
@pointnemo peux-tu faire un
du -ach /var --max-depth 1 pour voir la répartition des données dans ton /var et un
df -h pour voir comment tu as partitionné tes disques sur ton instance.

Bonsoir,

du -ach /var --max-depth 1 me renvoie :

28K /var/tmp
984M /var/lib
2.1G /var/www
0 /var/run
4.0K /var/local
1.8M /var/spool
66M /var/cache
1.8M /var/backups
4.0K /var/opt
88M /var/log
36K /var/xmpp-upload
0 /var/lock
16K /var/lost+found
2.9M /var/mail
3.2G /var
3.2G total

et df -h :

Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 745M 74M 671M 10% /run
/dev/mapper/gen10–ssd-root 23G 15G 6.9G 69% /
tmpfs 3.7G 12K 3.7G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup
/dev/sda2 237M 49M 176M 22% /boot
/dev/sda1 511M 9.0M 502M 2% /boot/efi
/dev/mapper/gen10–ssd-var 9.2G 8.9G 0 100% /var
/dev/mapper/gen10–ssd-tmp 1.8G 6.5M 1.7G 1% /tmp
/dev/mapper/gen10–ssd-home 178G 22G 147G 13% /home
/dev/md0 7.3T 308G 6.6T 5% /media/stockage
tmpfs 745M 0 745M 0% /run/user/0

Merci pour la réactivité… instantanée !

Ton /var ne contient que 3.2G de données.
Fais un du -ach /dev/mapper/gen10–ssd-var --max-depth 1

Un du -ach /dev/mapper/gen10–ssd-var --max-depth 1 renvoie :

0 /dev/mapper/gen10–ssd-var
0 total

Les commandes du et df renvoient donc des informations contradictoires : 3.2G /var
mais /dev/mapper/gen10–ssd-var 9.2G 8.9G 0 100% /var

Il y a bien un seul et unique répertoire /var…?

Bonsoir,

Au cas où, que donne :

sudo du -ach /var --max-depth 1

Amicalement,
Gaëtan.

Merci de votre aide. C’est /var/lib et /var/www qui sont bien remplis… Mais toujours un total de 3,2 Go et pas 8.9 Go comme indique la commande df…

28K /var/tmp
984M /var/lib
2.1G /var/www
0 /var/run
4.0K /var/local
1.8M /var/spool
66M /var/cache
1.8M /var/backups
4.0K /var/opt
88M /var/log
36K /var/xmpp-upload
0 /var/lock
16K /var/lost+found
2.9M /var/mail
3.2G /var
3.2G total

Edit : j’ai notamment un /var/www/nextcloud/apps qui occupe 1.2 Go ; mais avec une palanquée de sous répertoires à explorer…

Suite et fin…
En ssh depuis mon PC client et en root :

1) J’ai réussi à faire un sudo apt update sans cette fois le fichu message :slight_smile: :

You don’t have enough free space in /var/cache/apt/archives/

2) Puis un sudo apt upgrade qui m’a indiqué :

sudo: ldap_sasl_bind_s(): Can’t contact LDAP server
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
base-files ca-certificates certbot dnsmasq dnsmasq-base dovecot-core dovecot-imapd dovecot-ldap dovecot-lmtpd dovecot-managesieved dovecot-sieve file grub-common grub-efi-amd64
grub-efi-amd64-bin grub-efi-amd64-signed grub2-common intel-microcode iproute2 ldap-utils libcairo-gobject2 libcairo2 libdbi-perl libgnutls-dane0 libgnutls-openssl27 libgnutls28-dev
libgnutls30 libgnutlsxx28 libldap-2.4-2 libldap-common libmagic-mgc libmagic1 libnss-myhostname libnss-systemd libpam-systemd libpq5 libsystemd0 libudev1 linux-libc-dev postgresql-11
postgresql-client-11 postsrsd python-bottle python3-bottle python3-certbot slapd systemd systemd-sysv tzdata udev unzip yunohost
52 upgraded, 0 newly installed, 0 to remove and 7 not upgrade

Setting up slapd (2.4.47+dfsg-3+deb10u5) …
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.47+dfsg-3+deb10u4… done.
Job for slapd.service failed because the control process exited with error code.
See “systemctl status slapd.service” and “journalctl -xe” for details.
invoke-rc.d: initscript slapd, action “restart” failed.
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
Loaded: loaded (/etc/init.d/slapd; generated)
Drop-In: /etc/systemd/system/slapd.service.d
└─ynh-override.conf
Active: activating (auto-restart) (Result: exit-code) since Mon 2021-02-08 18:25:00 CET; 7ms ago
Docs: man:systemd-sysv-generator(8)
Process: 13390 ExecStart=/etc/init.d/slapd start (code=exited, status=1/FAILURE)
Feb 08 18:25:00 mondomaine.tld systemd[1]: slapd.service: Failed with result ‘exit-code’.
Feb 08 18:25:00 mondomaine.tld systemd[1]: Failed to start LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).
dpkg: error processing package slapd (–configure):
installed slapd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
slapd
Updating loolwsd systemplate
E: Sub-process /usr/bin/dpkg returned an error code (1)

Toujours donc mon second problème d’accès à ldap…

3) Enfin un sudo apt autoremove qui me renvoie :

sudo: ldap_sasl_bind_s(): Can’t contact LDAP server
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
ldap-utils : Depends: libldap-2.4-2 (= 2.4.47+dfsg-3+deb10u4) but 2.4.47+dfsg-3+deb10u5 is installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

4) Donc un apt --fix-broken install qui me dit :

Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following additional packages will be installed:
ldap-utils
Suggested packages:
libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal
The following packages will be upgraded:
ldap-utils
1 upgraded, 0 newly installed, 0 to remove and 48 not upgraded.
5 not fully installed or removed.
Need to get 0 B/199 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Reading changelogs… Done
Setting up slapd (2.4.47+dfsg-3+deb10u5) …
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.47+dfsg-3+deb10u4… done.
Job for slapd.service failed because the control process exited with error code.
See “systemctl status slapd.service” and “journalctl -xe” for details.
invoke-rc.d: initscript slapd, action “restart” failed.
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
Loaded: loaded (/etc/init.d/slapd; generated)
Drop-In: /etc/systemd/system/slapd.service.d
└─ynh-override.conf
Active: activating (auto-restart) (Result: exit-code) since Mon 2021-02-08 18:26:11 CET; 10ms ago
Docs: man:systemd-sysv-generator(8)
Process: 14128 ExecStart=/etc/init.d/slapd start (code=exited, status=1/FAILURE)
Feb 08 18:26:11 mondomaine.tld systemd[1]: Failed to start LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).
dpkg: error processing package slapd (–configure):
installed slapd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
slapd
Updating loolwsd systemplate
E: Sub-process /usr/bin/dpkg returned an error code (1)

5) Et là, surprise… df -h me renvoie :

Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 745M 74M 671M 10% /run
/dev/mapper/gen10–ssd-root 23G 15G 6.9G 69% /
tmpfs 3.7G 0 3.7G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup
/dev/sda2 237M 49M 176M 22% /boot
/dev/sda1 511M 9.0M 502M 2% /boot/efi
/dev/mapper/gen10–ssd-home 178G 22G 147G 13% /home
/dev/mapper/gen10–ssd-tmp 1.8G 5.8M 1.7G 1% /tmp
/dev/mapper/gen10–ssd-var 9.2G 3.3G 5.4G 38% /var
/dev/md0 7.3T 308G 6.6T 5% /media/stockage
tmpfs 745M 0 745M 0% /run/user/0

Va comprendre Charles…
Enfin un problème de réglé même si j’ai pas compris le pourquoi du comment (et ça m’énerve un peu…). Reste mon soucis avec ldap…

Merci pour l’attention consacrée et l’aide apportée
Longue vie à Yunohost

Bonsoir,

Merci à toi d’être revenu pour donner des nouvelles et une solution qui pourra sans doute servir à d’autre.

Amicalement,
Gaëtan.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.