NAS and Storage

Choosing and Maintaining Healthy Drives

Disks will eventually fail. With the right choice and monitoring, you often know in advance and won’t lose anything.

Hard drive, SSD or NVMe?

  • Hard drive (HDD): lots of space for little money. Ideal for a NAS with photos, movies and backups. Slower and with moving parts (noise, power).
  • SSD: fast and quiet, energy-efficient. Perfect for your operating system, virtual machines and databases. More expensive per terabyte.
  • NVMe: an SSD that mounts directly on the motherboard, even faster. Handy for Proxmox, Docker and applications that write a lot.

Choose disks for a NAS

  • NAS drives (such as the series from Western Digital, Seagate and Toshiba for NAS) are made to run day and night and sit together in a case. They’re usually worth the extra cost.
  • Watch out for SMR. Some cheap drives use SMR technology (overlapping tracks). These are slow with heavy writes and can cause problems with RAID or ZFS, especially during recovery. For a NAS, choose a drive with CMR. Check the manufacturer’s specifications; they usually list it.
  • Don’t buy all drives at once from the same batch. Drives from one production batch can fail shortly after one another. Spread your purchases if possible.
  • Size: large drives (16 TB and more) store a lot in little space, but recovery after a failure takes days. With four drives or more, RAID 6 or RAIDZ2 is wise.

See what you end up with using our RAID and ZFS calculator, and what it costs in power with the power cost calculator. A hard drive uses about 5 to 8 watts.

Check health with SMART

Drives monitor themselves with SMART. Install the tools and read it out (replace sda with your disk):

sudo apt install smartmontools
sudo smartctl -H /dev/sda          # short verdict: PASSED or FAILED
sudo smartctl -a /dev/sda          # all details
sudo smartctl -t short /dev/sda    # start a short test
sudo smartctl -t long /dev/sda     # an extended test (takes hours)

Pay special attention to these values. If they rise, the disk is failing and you need to replace it:

  • Reallocated_Sector_Ct: sectors the disk has replaced.
  • Current_Pending_Sector and Offline_Uncorrectable: sectors that are no longer readable.
  • Temperature_Celsius: keep the disk below 50 degrees, preferably around 30 to 45.

In Proxmox you’ll see the SMART values under Server → Disks. TrueNAS and OpenMediaVault have their own screen and can send you a notification.

With RAID and ZFS

  • ZFS: check the status with zpool status and run a monthly check of all data with zpool scrub pool (replace pool with the name of your pool).
  • Linux RAID (mdadm): check with cat /proc/mdstat whether everything is healthy.

If a disk fails

  1. Stay calm. With a mirror or RAID 5/6, your NAS just keeps working.
  2. Immediately check whether your backup is recent before changing anything.
  3. Replace the disk as quickly as possible with a disk of the same or larger size and let recovery run.
  4. Don’t remove a second disk from the system while recovery is in progress.

Do you have an uninterruptible power supply for your NAS? That prevents damage during a power outage. See how long it lasts with our UPS runtime tool.

Can't do it yourself? Have an expert come to your home via hulpaanhuis.nl