Skip to content

Disk ve güç sağlığı uyarısı / Disk and power health warnings - #17

Merged
schematrix merged 2 commits into
schematrix:mainfrom
Proxy34:disk-sagligi
Nov 6, 2026
Merged

schematrix merged 2 commits into
schematrix:mainfrom
Proxy34:disk-sagligi

Conversation

@Proxy34

@Proxy34 Proxy34 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Disk ve güç sağlığı uyarısı. Afette SSD bozulursa bütün arşiv gider; uyarı erken gelirse içerik başka bir diske kopyalanabilir.

scripts/disk-health.sh 6 saatte bir (ve açılıştan 5 dakika sonra) çalışır. Sorun varsa ana sayfanın en üstünde kırmızı uyarı çıkar:

  • Disk salt okunur moda geçmiş ya da ext4 hata kaydı var.
  • Diskin kendi SMART testi arıza ya da arıza öncesi belirti bildiriyor; NVMe SSD ömrünün %90'ı dolmuş.
  • Disk %95 dolu.
  • Pi düşük voltajla çalışıyor ya da açılıştan beri düşük voltaj yaşandı (vcgencmd get_throttled). Elektrik kesintisinde pil ya da zayıf güç kaynağıyla çalışırken disk bozulmasının en sık nedeni.

SMART için smartmontools kurulur; bazı USB adaptörlerinin arkasındaki diskler SMART vermez, o zaman bu kontrol sessizce atlanır (yanlış alarm yok).

Test: Debian 13 + Internet-in-a-Box sanal makinesinde gerçek kurulum; salt okunur ve dolu disk sahte bir diskle, SMART arızası ve düşük voltaj sahte smartctl / vcgencmd ile denendi. Gerçek Pi 5'te vcgencmd çıktısı denenmedi.


Disk and power health warnings. If the SSD dies in a disaster the whole archive is gone; an early warning gives time to copy it.

scripts/disk-health.sh runs every 6 h (and 5 min after boot) and shows a red warning at the top of the homepage when:

  • the disk was remounted read-only or has ext4 errors,
  • SMART reports failure or pre-failure, or an NVMe SSD has used 90% of its life,
  • the disk is 95% full,
  • the Pi is or was under-voltage (vcgencmd get_throttled), the usual cause of corruption when running on a battery or weak supply.

Installs smartmontools; disks behind USB adapters without SMART are skipped silently (no false alarms).

Tested in a Debian 13 + IIAB VM with a fake full/read-only disk and fake smartctl / vcgencmd. Not tested on a real Pi 5.

Firewall (Proxy34)

6 saatte bir /library diskine bakar: salt okunura düşme, ext4 hata kaydı, SMART arızası, NVMe aşınması, %95 doluluk ve Raspberry Pi düşük voltajı. Sorun varsa ana sayfanın üstünde kırmızı uyarı.
@schematrix

Copy link
Copy Markdown
Owner

Teşekkürler, SSD'nin sessizce ölmesi en büyük korkularımdan biriydi açıkçası. Pi'de gerçek vcgencmd ve SMART çıktısıyla bir deneyeyim, sorun yoksa merge ederim. Diğer PR'larla çakışma olursa güncellemeni rica edebilirim.

Thanks, the SSD dying silently was one of my biggest worries to be honest. I'll try it on the Pi with real vcgencmd and SMART output and merge if all good. If it ends up conflicting with other PRs, I might ask you to update it.

@schematrix

Copy link
Copy Markdown
Owner

Gerçek Pi 5'te denedim, her şey sorunsuz çalıştı. SMART okuması eski bir laptoptan çıkan Toshiba NVMe diskimde doğru çalıştı, düşük voltaj kontrolü de gerçek vcgencmd ile sorunsuz. Disk sağlıklıyken uyarı listesi boş geliyor, sahte bir uyarı yazınca ana sayfada kırmızı kutu hemen çıkıyor, gerçek kontrol tekrar çalışınca da kayboluyor. Afette SSD'nin sessizce bozulması en büyük endişelerimden biriydi, bu PR tam o boşluğu dolduruyor. Merge ediyorum, emeğine çok teşekkürler.

WhatsApp Image 2026-11-06 at 23 21 55

Tested on a real Pi 5 and everything worked smoothly. The SMART reading worked correctly on my Toshiba NVMe drive taken from an old laptop, and the under-voltage check works fine with the real vcgencmd. With a healthy disk the warning list is empty, writing a fake warning shows the red box on the homepage right away, and it disappears once the real check runs again. The SSD failing silently in a disaster was one of my biggest worries, and this PR fills exactly that gap. Merging it, thanks a lot for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants