Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Logical volume voll gelaufen ohne erkenntlichen Grund -> Debugging Tipps

Empfohlene Antworten

Veröffentlicht

Hey zusammen,

vorweg, ich bin Azubi im 2. Lehrjahr und UNWISSEND :)

Auf meinem Server ist mir heute folgendes Problem begegnet und ich würde gerne Ansätze zum debuggen erhalten. So wie ich es verstehe muss das logicalvolume angepasst werden via lvextend/lvresize. Allerdings verstehe ich nicht was genau und wieso mein logical volume so voll laufen lassen hat, da auf dem Server nur ein popliges wikijs als docker image läuft.

 

root@server:/dev/mapper# apt update
Hit:1 http://at.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 https://download.docker.com/linux/ubuntu jammy InRelease [48.9 kB]
Ign:2 https://download.docker.com/linux/ubuntu jammy InRelease
Err:1 http://at.archive.ubuntu.com/ubuntu jammy InRelease
  Splitting up /var/lib/apt/lists/at.archive.ubuntu.com_ubuntu_dists_jammy_InRelease into data and signature failed
Get:3 http://at.archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Ign:3 http://at.archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:4 http://at.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Ign:4 http://at.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:5 http://at.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Ign:5 http://at.archive.ubuntu.com/ubuntu jammy-security InRelease
Get:2 https://download.docker.com/linux/ubuntu jammy InRelease [48.9 kB]
Ign:2 https://download.docker.com/linux/ubuntu jammy InRelease
Get:3 http://at.archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Ign:3 http://at.archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:4 http://at.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Ign:4 http://at.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:5 http://at.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Ign:5 http://at.archive.ubuntu.com/ubuntu jammy-security InRelease
Get:3 http://at.archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Ign:3 http://at.archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:2 https://download.docker.com/linux/ubuntu jammy InRelease [48.9 kB]
Ign:2 https://download.docker.com/linux/ubuntu jammy InRelease
Get:4 http://at.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Ign:4 http://at.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:5 http://at.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Ign:5 http://at.archive.ubuntu.com/ubuntu jammy-security InRelease
Get:3 http://at.archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Err:3 http://at.archive.ubuntu.com/ubuntu jammy-updates InRelease
  Error writing to file - write (28: No space left on device) [IP: 83.164.133.196 80]
Get:2 https://download.docker.com/linux/ubuntu jammy InRelease [48.9 kB]
Err:2 https://download.docker.com/linux/ubuntu jammy InRelease
  Error writing to file - write (28: No space left on device) [IP: 18.66.139.114 443]
Get:4 http://at.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Err:4 http://at.archive.ubuntu.com/ubuntu jammy-backports InRelease
  Error writing to file - write (28: No space left on device) [IP: 83.164.133.196 80]
Get:5 http://at.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Err:5 http://at.archive.ubuntu.com/ubuntu jammy-security InRelease
  Error writing to file - write (28: No space left on device) [IP: 83.164.133.196 80]
Reading package lists... Error!
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://at.archive.ubuntu.com/ubuntu jammy InRelease: Splitting up /var/lib/apt/lists/at.archive.ubuntu.com_ubuntu_dists_jammy_InRelease into data and signature failed
W: Failed to fetch http://at.archive.ubuntu.com/ubuntu/dists/jammy/InRelease  Splitting up /var/lib/apt/lists/at.archive.ubuntu.com_ubuntu_dists_jammy_InRelease into data and signature failed
W: Failed to fetch http://at.archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  Error writing to file - write (28: No space left on device) [IP: 83.164.133.196 80]
W: Failed to fetch http://at.archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease  Error writing to file - write (28: No space left on device) [IP: 83.164.133.196 80]
W: Failed to fetch http://at.archive.ubuntu.com/ubuntu/dists/jammy-security/InRelease  Error writing to file - write (28: No space left on device) [IP: 83.164.133.196 80]
W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/jammy/InRelease  Error writing to file - write (28: No space left on device) [IP: 18.66.139.114 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Write error - write (28: No space left on device)

df -h gibt mir folgendes aus, falls wichtig:

root@server:/dev/mapper# df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              198M   21M  177M  11% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  9.8G  9.8G     0 100% /
tmpfs                              989M   28K  989M   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/vda2                          1.8G  125M  1.5G   8% /boot
tmpfs                              989M     0  989M   0% /run/qemu
tmpfs                              198M  4.0K  198M   1% /run/user/1000

ich sehe hier "/dev/mapper/ubuntu--vg-ubuntu--lv  9.8G  9.8G     0 100% /", aber verstehe wie gesagt absolut nicht was genau hier so voll gelaufen ist.

Vielen Dank schonmal für jeden der sich hier Zeit nimmt mir zu helfen 

Ich verwende das Tool ncdu um herauszufinden welcher Ordner gerade vollläuft. 

sudo apt install ncdu
ncdu /

Da kannst du dich dann mit den Pfeiltasten durch die Ordnerstruktur bewegen um den Übeltäter ausfindig zu machen

10G sind zu klein, so oder so.

Du hast /var nicht als eigene Partition angelegt. Vermutlich fressen die Logs unter /var/log und vlt irgendwelche App Logs unter /home den Platz

mach mal

du -sh /var

du -sh /var/log

oder aus / heraus einfach "du -sh *" ... dann kommste auf die Spur.

Übrigens laufen nur Filesysteme voll ... der LV ist nur das Volumen dafür

Ich benutz gern den hier für sowas, ausgehend vom "/"-Verzeichnis:

du -ch -d 1 | sort -hr | head

Beim du command das "-c" produziert ein "grand total", und das "-d 1" beschränkt den Output auf eine Ebene darunter, sodass es übersichtlich bleibt, und man wirklich nur die nächsttiefere Ebene sieht, und keine Unter-unter-Ordner, oder gar Dateien.

Weiter mit der pipe zu sort, human-readable (-h), und mit "-r" reverse angeordnet (die größten Speicherfresser nach oben).

Dann noch ein "head" zum Schluss, damit man mit der Limitierung auf 10 Zeilen (default) einen guten Überblick behält.

Und ja, /var/log/ ist ein klassischer Speicherfresser :P


Zum Thema LVM kann ich diese beiden empfehlen (wenn du englisch nicht scheust ;) )
https://www.youtube.com/watch?v=dMHFArkANP8
https://www.youtube.com/watch?v=MeltFN-bXrQ

Viel Erfolg!

vor 18 Stunden schrieb kimura:

muss das logicalvolume angepasst werden via lvextend/lvresize

So, hab nochmal mit Kaffee im Kopf gelesen.

Also: Du brauchst zunächst mehr Platz. Den kannst Du mit

vgs

auslesen. Wenn da nix mehr frei ist brauchst Du ein zusätzliches Physisches Volume oder eine Vergrösserung des bestehenden PVs ( wenn das ne VM ist ).

Ein neues PV weist Du mit "pvcreate" dem LVM zu, die Volumegruppe kannst Du dann mit "vgextend" vergrössern.

Mit dem Platz erweiterst Du das LV in dem / liegt, also

/dev/mapper/ubuntu--vg-ubuntu--lv

Wenn das LV vergrössert wurde "siehst" Du den Speicher noch nicht, da Du nur auf Dateisysteme schaust. Das also mit "xfs_grows /" dann auf die neue Zielgrösse heben.

LVM im Youtube ? Sorry, nicht mein Stil.

Der LVM selbst stammt von IBM und HP und wird da besser erklärt als das bisher jede Linux Schwarte kann. Nur gelten unter Linux leider etwas andere Kommandos für dasselbe System. Grundlagen bei AIX abschauen oder bei T.Krenn und dann n bischen damit spielen. Das ist abstrakt, aber ne wirklich geniale Sache.

Leider kommt unter Linux selten so richtig das geniale Konzept rüber. Der Auslöser des LVM war es, Festplatten mit gemeinsamen Metainformationen als EINE export und importfähige Instanz portabel zu halten und akribisch System von Nutzdaten zu trennen.

Damit kann/konnte man komplette Systeme der mittleren Datentechnik ( AIX und HP/UX ) sehr resourcensparend und auch mit einfachen Ansätzen von HA aufsetzen. Den LVM gibts seit 1991 meine ich, der kam mit AIX 2 oder 3 raus.

Heutzutage wird der fast nur noch benutzt um Dateisysteme nachträglich vergrössern zu können ...

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.