Thursday, October 23, 2025

Debian 13: increase nvme life time, and how to check its health with addtional ssd sata

We move some mount point to cheaper device sata ssd (sata ssd is cheaper then nvme)

  1. /home
  2. /var
  3. /tmp 

for small ram consider to move swap disk into sata ssd. for big ram (equal or more then 16GB), you may keep it on nvme, in case the os require to use swap, it will use nvme for best performance. It is for Debian or other linux distribution, not for windows.

nvme

install nvme-cli to check nvme lifetime

# apt-get install nvme-cli

To list nvme device

# nvme list

To view nmve information

# nvme smart-log /dev/nvme0n1
Smart Log for NVME device:nvme0n1 namespace-id:ffffffff
critical_warning            : 0
temperature                : 93 °F (307 K)
available_spare                : 100%
available_spare_threshold        : 5%
percentage_used                : 3%
endurance group critical warning summary: 0
Data Units Read                : 13440652 (6.88 TB)
Data Units Written            : 11259034 (5.76 TB)
host_read_commands            : 204366865
host_write_commands            : 182401866
controller_busy_time            : 3981
power_cycles                : 1399
power_on_hours                : 1106
unsafe_shutdowns            : 32
media_errors                : 0
num_err_log_entries            : 0
Warning Temperature Time        : 0
Critical Composite Temperature Time    : 0
Temperature Sensor 1            : 93 °F (307 K)
Thermal Management T1 Trans Count    : 0
Thermal Management T2 Trans Count    : 0
Thermal Management T1 Total Time    : 0
Thermal Management T2 Total Time    : 0

You can copy paste the result to AI for analyzing. Gemini said: 

"Low Usage. This is the total amount of data written to the drive. For a modern consumer or enterprise SSD, 5.76 TB is a very low amount of lifetime writes." 

ssd sata

install smartmontools to check ssd sata

# apt-get install smartmontools

To view information from /dev/sda

# smartctl -a /dev/sda

to show all information in /dev/sda with filter Error

# smartctl -x /dev/sda | grep Error
Error logging capability:        (0x01)    Error logging supported.
  1 Raw_Read_Error_Rate     -O--CK   100   100   050    -    0
199 UDMA_CRC_Error_Count    -O--CK   100   100   050    -    0
0x10       GPL,SL  R/O      1  NCQ Command Error log
SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
Device Error Count: 6 (device log contains only the most recent 4 errors)
    ER     = Error register
Error 6 [1] occurred at disk power-on lifetime: 1 hours (0 days + 1 hours)
Error 5 [0] occurred at disk power-on lifetime: 1 hours (0 days + 1 hours)
Error 4 [3] occurred at disk power-on lifetime: 1 hours (0 days + 1 hours)
Error 3 [2] occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)

to test ssd on /dev/sda 

# smartctl -t long /dev/sda
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.48+deb13-amd64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 4 minutes for test to complete.
Test will complete after Thu Oct 23 15:35:03 2025 WIB
Use smartctl -X to abort test.

After 4 minutes

# smartctl -a /dev/sda | grep Error
Error logging capability:        (0x01)    Error logging supported.
  1 Raw_Read_Error_Rate     0x0032   100   100   050    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x0032   100   100   050    Old_age   Always       -       0
SMART Error Log Version: 1
ATA Error Count: 6 (device log contains only the most recent five errors)
    ER = Error register [HEX]
Error 6 occurred at disk power-on lifetime: 1 hours (0 days + 1 hours)
Error 5 occurred at disk power-on lifetime: 1 hours (0 days + 1 hours)
Error 4 occurred at disk power-on lifetime: 1 hours (0 days + 1 hours)
Error 3 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)
Error 2 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)

Sample Device Model: RX7 2.5 240GB 

Copy paste this to AI and what are they suggest

Error 6 [1] occurred at disk power-on lifetime: 1 hours (0 days + 1 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  04 -- a0 00 01 00 00 4f 00 c2 c0 51 00  Device Fault

  Commands leading to the command that caused the error were:
  CR FEATR COUNT  LBA_48  LH LM LL DV DC  Powered_Up_Time  Command/Feature_Name
  -- == -- == -- == == == -- -- -- -- --  ---------------  --------------------
  b0 00 d5 00 01 00 00 4f 00 c2 c0 a0 00     00:00:00.430  SMART READ LOG
  ec 00 00 00 00 00 00 00 00 00 00 a0 00     00:00:00.430  IDENTIFY DEVICE
  67 b6 c2 97 32 21 61 7b 60 cf ba 1f ff     00:00:00.360  [RESERVED FOR SERIAL ATA]

This part is indicating a hardware failure. Gemini recommendation:

"Recommendation: Since the error occurred so early, it's highly likely to be a dead-on-arrival (DOA) or early life failure. The drive should be considered unreliable and immediately replaced under warranty. Do not store critical data on this device."