ubuntu 下檢查 NVMe SSD health,並使用clonezilla 複製資料至新硬碟

最近電腦重開機後,BIOS 出現

WARNING:Please back-up your data and replace your hard disk drive.
A failure may be imminent and cause unpredictable fail.

這個警告是發生在我的SSD PX-256M9PeG 上,因此我想知道,到底我的SSD 壽命還剩多少?

在非NVMe 硬碟的情況下,可以直接透過 gnome-disk-utility 來取得SMART資訊;但是在NVMe SSD中,需要透過nvme tool 來取得資訊:

sudo apt install nvme-cli
$ sudo nvme smart-log /dev/nvme0
Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning                    : 0
temperature                         : 40 C
available_spare                     : 100%
available_spare_threshold           : 10%
percentage_used                     : 0%
data_units_read                     : 28,167,888
data_units_written                  : 19,397,424
host_read_commands                  : 561,183,142
host_write_commands                 : 171,788,833
controller_busy_time                : 1,354
power_cycles                        : 2,385
power_on_hours                      : 1,363
unsafe_shutdowns                    : 133
media_errors                        : 0
num_err_log_entries                 : 608
Warning Temperature Time            : 0
Critical Composite Temperature Time : 0
Temperature Sensor 1                : 40 C
Temperature Sensor 2                : 51 C

其中最重要的資訊是

percentage_used                     : 0%

如果這一項出現95%,代表 SSD 壽命已經使用了95%,剩下5%壽命。

檢查之後,發現我的SSD已經使用了95%,所以決定趕快把SSD換掉。

參考:

hard drive - How can I check the SMART status of a SSD or HDD on current versions of Ubuntu 14.04 through 20.04? - Ask Ubuntu

software recommendation - How do I check system health? - Ask Ubuntu


拿到新SSD後,第一件事情就是利用 clonezilla 將舊SSD的檔案完整複製過去。下載 clonezilla iso檔,如果你另一台電腦是windows的話,可以用 rufus 製作開機隨身碟。

將新/舊SSD都裝上主機板後,用 clonezilla 開機,按照畫面提示一步一步選下去,記得要選"整顆硬碟完整複製",這樣才可以把開機的硬碟分割表給複製過去。