Jak monitorovat zdraví disku?

Basics

  • Use a reasonably recent Linux (kernel)
  • Use the latest firmware for the SSD
  • Use a command like: "sudo smartctl -a /dev/sda" to check for issues.
  • Use the ext4 filesystem (the most mature filesystem) unless you have reason not to.
  • Have enough DRAM required to operate without swap space under normal workloads

Mounting SSD filesystems

The performance of SSDs is also influenced by filesystem mounting options:

  • Add the "noatime" (or the default "relatime") mount option in /etc/fstab, to disable (or significantly reduce) disk writes whenever a file is read. This improves filesystem read performance for both SSDs and HDDs.
  • If desirable, enable the "discard" filesystem options for automatic online TRIM.
    • Set "issue_discards" option in /etc/lvm/lvm.conf for LVM if you want LVM to discard on lvremove.

    • Set "discard" option in /etc/crypttab for dm-crypt.
    • Enable weekly trim.
    sudo systemctl enable fstrim.timer
    sudo systemctl start fstrim.timer
    • Alternatively, and often not recommended: Set "discard" mount option in /etc/fstab for the ext4 filesystem, swap partition, Btrfs, etc.
  • The "discard" options is not needed if your SSD has enough overprovisioning (spare space) or you leave (unpartitioned) free space on the SSD.

SmartMonTools

sudo smartctl -H /dev/nvme0n1
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.2.0-20-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

sudo apt-get install nvme-cli

  • hdd
  • 0 用戶發現這個有用
這篇文章有幫助嗎?

相關文章

Kolik mohu dostat IP adres?

Mohu mít k serveru více než 1 IPv4 adresu? Ano, avšak maximální počet IPv4 adres k vyhrazenému...

Linux - parametry kernelu

Linux Kernel Boot Parameters

Linux firewall - iptables

Iptables iptables -[ADC] chain rule-specification [options] iptables -I chain [rulenum]...

Linux firewall - fail2ban

Fail2ban   Nástroj na blokování útočníků automaticky...

Linux kernel

Sysctl   zapnuti ochrany kernelu (execshield) kernel.exec-shield=1...