Proxmoxに内蔵しているSSDの寿命を確認する方法を紹介します。
SSDは機械的動作がないため、HDDのような突然故障はめったに起こりませんが、FlashROMデバイス技術を使っているため、書き込み回数に上限があります。
書き込み可能回数はTBW(Tera Byte Written)という値でメーカー仕様書に記載されていますので、容易に寿命を予測することができます。
SSDはTBWを迎えてしまうとストレージが書き込めない状態になることで、突然システムダウンになることがあるため、毎年1回くらいは書き込み量をチェックしておいたほうが無難と思います。
確認方法
操作はProxmoxのシェルで行います。
proxmoxシェルは画面を変えると強制exitとなるため、不都合があるかたはteratermなどからSSH接続するのが良いでしょう。
ProxmoxはDebianベースのため、ubuntuで標準インストールされているsmartctlを使うことで作業は完結します。
SSDデバイス名の確認
smartctlコマンドでSSDデバイス名を確認します。
# M.2 SSDの場合 root@falcon:~# smartctl --scan /dev/nvme0 -d nvme # /dev/nvme0, NVMe device # SATA SSDの場合 root@falcon2:~# smartctl --scan /dev/sda -d scsi # /dev/sda, SCSI device # SATA HDDの場合 root@falcon3:~# smartctl --scan /dev/sda -d scsi # /dev/sda, SCSI device /dev/sdb -d scsi # /dev/sdb, SCSI device /dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/nvme0がM.2のnvmeデバイスで、/dev/sdaがSATAドライブになります。
SMART情報の確認
HDD/SSDは各種動作や障害履歴を記録する仕組みがあり、SMART情報として読み出すことができます。
それではsmartctlでSMART情報を取り出し、寿命を計算してみます。
1. M.2 NVMeドライブの場合
Crucialの民生品M.2 NVMe SSDを使ったマシンのSMART情報を確認してみます。
root@falcon1:~# smartctl /dev/nvme0 --all smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.8.12-9-pve] (local build) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Number: CT1000P3PSSD8 Serial Number: XXXXXXXXXXX Firmware Version: P9CR413 PCI Vendor/Subsystem ID: 0x1344 IEEE OUI Identifier: 0x00a075 Controller ID: 0 NVMe Version: 1.4 Number of Namespaces: 1 Namespace 1 Size/Capacity: 1,000,204,886,016 [1.00 TB] Namespace 1 Formatted LBA Size: 512 Namespace 1 IEEE EUI-64: 00a075 0147226c46 Local Time is: Wed May 7 15:25:07 2025 JST Firmware Updates (0x14): 2 Slots, no Reset required Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test Optional NVM Commands (0x00d7): Comp Wr_Unc DS_Mngmt Sav/Sel_Feat Timestmp Verify Log Page Attributes (0x1e): Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg Pers_Ev_Lg Maximum Data Transfer Size: 64 Pages Warning Comp. Temp. Threshold: 83 Celsius Critical Comp. Temp. Threshold: 85 Celsius Namespace 1 Features (0x08): No_ID_Reuse Supported Power States St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat 0 + 5.50W - - 0 0 0 0 0 0 1 + 3.00W - - 1 1 1 1 0 0 2 + 1.50W - - 2 2 2 2 0 0 3 - 0.0300W - - 3 3 3 3 5000 2500 4 - 0.0025W - - 4 4 4 4 8000 40000 Supported LBA Sizes (NSID 0x1) Id Fmt Data Metadt Rel_Perf 0 + 512 0 1 1 - 4096 0 0 === START OF SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00 Temperature: 37 Celsius Available Spare: 100% Available Spare Threshold: 5% Percentage Used: 3% Data Units Read: 6,522,609 [3.33 TB] Data Units Written: 10,961,882 [5.61 TB] Host Read Commands: 54,187,308 Host Write Commands: 477,944,589 Controller Busy Time: 492 Power Cycles: 25 Power On Hours: 7,263 Unsafe Shutdowns: 13 Media and Data Integrity Errors: 0 Error Information Log Entries: 0 Warning Comp. Temperature Time: 0 Critical Comp. Temperature Time: 0 Temperature Sensor 1: 37 Celsius Error Information (NVMe Log 0x01, 16 of 255 entries) No Errors Logged
総書き込みデータ量の確認をします。
- トータル書き込みバイト数:Data Units Written:10,961,882 [5.61 TB]
- このM.2のModel Number:CT1000P3PSSD8
- Model NumberでTBWを検索する:220TB
5.61TB << 220TBであるため、寿命到達までかなりの時間があることが分かります。
参考までにこのマシンはApache Webサーバーとして1年運用しているものです。
2. SATA SSDの場合
次はADATAのSATA SU800を使ったマシンのSMART情報を確認してみます。
root@falcon2:~# smartctl /dev/sda --all smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.8.4-2-pve] (local build) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Silicon Motion based SSDs Device Model: ADATA SU800 Serial Number: XXXXXXXXXXXX LU WWN Device Id: 5 707c18 100d5c50d Firmware Version: 22Z4VBND User Capacity: 1,024,209,543,168 bytes [1.02 TB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Form Factor: 2.5 inches TRIM Command: Available, deterministic, zeroed Device is: In smartctl database 7.3/5319 ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Wed May 7 15:26:56 2025 JST SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED ~~中略~~ SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x0000 100 100 000 Old_age Offline - 0 5 Reallocated_Sector_Ct 0x0000 100 100 000 Old_age Offline - 0 9 Power_On_Hours 0x0000 100 100 000 Old_age Offline - 101 12 Power_Cycle_Count 0x0000 100 100 000 Old_age Offline - 7 148 Total_SLC_Erase_Ct 0x0000 100 100 000 Old_age Offline - 7138 149 Max_SLC_Erase_Ct 0x0000 100 100 000 Old_age Offline - 164 150 Min_SLC_Erase_Ct 0x0000 100 100 000 Old_age Offline - 0 151 Average_SLC_Erase_Ct 0x0000 100 100 000 Old_age Offline - 89 159 DRAM_1_Bit_Error_Count 0x0000 100 100 000 Old_age Offline - 0 160 Uncorrectable_Error_Cnt 0x0000 100 100 000 Old_age Offline - 0 161 Valid_Spare_Block_Cnt 0x0000 100 100 000 Old_age Offline - 101 163 Initial_Bad_Block_Count 0x0000 100 100 000 Old_age Offline - 22 164 Total_Erase_Count 0x0000 100 100 000 Old_age Offline - 2083 165 Max_Erase_Count 0x0000 100 100 000 Old_age Offline - 2 166 Min_Erase_Count 0x0000 100 100 000 Old_age Offline - 1 167 Average_Erase_Count 0x0000 100 100 000 Old_age Offline - 1 168 Max_Erase_Count_of_Spec 0x0000 100 100 000 Old_age Offline - 3000 169 Remaining_Lifetime_Perc 0x0000 100 100 000 Old_age Offline - 100 177 Wear_Leveling_Count 0x0000 100 100 050 Old_age Offline - 0 181 Program_Fail_Cnt_Total 0x0000 100 100 000 Old_age Offline - 0 182 Erase_Fail_Count_Total 0x0000 100 100 000 Old_age Offline - 0 192 Power-Off_Retract_Count 0x0000 100 100 000 Old_age Offline - 0 194 Temperature_Celsius 0x0000 100 100 000 Old_age Offline - 26 195 Hardware_ECC_Recovered 0x0000 100 100 000 Old_age Offline - 0 196 Reallocated_Event_Count 0x0000 100 100 016 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0000 100 100 050 Old_age Offline - 0 232 Available_Reservd_Space 0x0000 100 100 000 Old_age Offline - 100 241 Host_Writes_32MiB 0x0000 100 100 000 Old_age Offline - 15426 242 Host_Reads_32MiB 0x0000 100 100 000 Old_age Offline - 15595 245 TLC_Writes_32MiB 0x0000 100 100 000 Old_age Offline - 43743 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Completed [00% left] (0-65535) Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.
総書き込みデータ量の確認をします。
- トータル書き込みバイト数:TLC_Writes_32MiB - 43743 →32をかけてMBytesに変換: 43743 * 32 = 1,399,776(MBytes) ≒ 1.3TB
- このM.2のModel Number:ADATA SU800
- Model NumberでTBWを検索する:800TB
1.3TB << 800TBであるため、寿命到達までかなりの時間があることがわかります。
WD製M.2 SSDの場合
次はWD製M.2 NVMeのSMART情報を確認です。
WD製のSATA SSDはSMART情報に書き込みバイト数がわからない(仕様上もTBW非公開)のですが、NVMeはSMART情報に普通に記録されていました。
root@falcon3:~# smartctl /dev/nvme0 --all smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.8.12-10-pve] (local build) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Number: WD_BLACK SN770 1TB Serial Number: 24274K803610 Firmware Version: XXXXXXXX PCI Vendor/Subsystem ID: 0x15b7 IEEE OUI Identifier: 0x001b44 Total NVM Capacity: 1,000,204,886,016 [1.00 TB] Unallocated NVM Capacity: 0 Controller ID: 0 NVMe Version: 1.4 Number of Namespaces: 1 Namespace 1 Size/Capacity: 1,000,204,886,016 [1.00 TB] Namespace 1 Formatted LBA Size: 512 Namespace 1 IEEE EUI-64: 001b44 8b408381d6 Local Time is: Wed May 7 16:16:27 2025 JST Firmware Updates (0x14): 2 Slots, no Reset required Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test Optional NVM Commands (0x00df): Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp Verify Log Page Attributes (0x7e): Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg Pers_Ev_Lg *Other* Maximum Data Transfer Size: 256 Pages Warning Comp. Temp. Threshold: 84 Celsius Critical Comp. Temp. Threshold: 88 Celsius Namespace 1 Features (0x02): NA_Fields Supported Power States St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat 0 + 5.00W 5.00W - 0 0 0 0 0 0 1 + 3.30W 3.00W - 0 0 0 0 0 0 2 + 2.20W 2.00W - 0 0 0 0 0 0 3 - 0.0150W - - 3 3 3 3 1500 2500 4 - 0.0050W - - 4 4 4 4 10000 6000 5 - 0.0033W - - 5 5 5 5 176000 25000 Supported LBA Sizes (NSID 0x1) Id Fmt Data Metadt Rel_Perf 0 + 512 0 2 1 - 4096 0 1 === START OF SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00 Temperature: 40 Celsius Available Spare: 100% Available Spare Threshold: 10% Percentage Used: 0% Data Units Read: 324,915 [166 GB] Data Units Written: 1,499,954 [767 GB] Host Read Commands: 2,515,863 Host Write Commands: 76,321,000 Controller Busy Time: 71 Power Cycles: 14 Power On Hours: 316 Unsafe Shutdowns: 9 Media and Data Integrity Errors: 0 Error Information Log Entries: 0 Warning Comp. Temperature Time: 0 Critical Comp. Temperature Time: 0 Temperature Sensor 1: 60 Celsius Temperature Sensor 2: 40 Celsius Error Information (NVMe Log 0x01, 16 of 256 entries) No Errors Logged
総書き込みデータ量の確認をします。
- トータル書き込みバイト数:Data Units Written: 1,499,954 [767 GB]
- M.2のModel Number:WD_BLACK SN770 1TB
- Model NumberでTBWを検索する:600TB
767GB << 600TBであるため、寿命到達までかなりの時間があることが分かりました。
Silicon Power製SATA SSDの場合
Silicon Power(シリコンパワー)製SATA SSDは、Total_LBAs_Writtenという値で総書き込み量がわかります。
またSilicon Power製SSDは、Device Modelで型番が出てこないため、インストール時に型番を記載しておく必要があります。
ただ、SSDはSP A55 1TBという型番なのですが、Firmwareバージョン(SBFMLA.5)である程度想定することもできそうです。
root@falcon4:~# smartctl /dev/sda --all smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.8.12-7-pve] (local build) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: SPCC Solid State Disk Serial Number: XXXXXXXXXXXXXXXXXXX Firmware Version: SBFMLA.5 User Capacity: 1,024,209,543,168 bytes [1.02 TB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Form Factor: 2.5 inches TRIM Command: Available Device is: Not in smartctl database 7.3/5319 ATA Version is: ACS-4 (minor revision not indicated) SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Sun May 25 21:13:37 2025 JST SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x00) Offline data collection activity was never started. Auto Offline Data Collection: Disabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: (65535) seconds. Offline data collection capabilities: (0x79) SMART execute Offline immediate. No Auto Offline data collection support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 30) minutes. Conveyance self-test routine recommended polling time: ( 6) minutes. SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0 9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 3011 12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 12 168 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0 170 Unknown_Attribute 0x0003 100 100 000 Pre-fail Always - 156 173 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 65539 192 Power-Off_Retract_Count 0x0012 100 100 000 Old_age Always - 8 194 Temperature_Celsius 0x0023 067 067 000 Pre-fail Always - 33 (Min/Max 33/33) 218 Unknown_Attribute 0x000b 100 100 050 Pre-fail Always - 0 231 Unknown_SSD_Attribute 0x0013 100 100 000 Pre-fail Always - 99 241 Total_LBAs_Written 0x0012 100 100 000 Old_age Always - 625 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] SMART Selective self-test log data structure revision number 0 Note: revision number not 1 implies that no selective self-test has ever been run SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.
総書き込みデータ量の確認をします。
- トータル書き込みバイト数:Total_LBAs_Written: 625 LBAs →625*32Mbytes=約20GB
- M.2のModel Number:SP A55 1TB
- Model NumberでTBWを検索する:500TB
20GB << 500TBであるため、寿命到達までかなりの時間があることが分かりました。
ストレージを高速なM.2に変えることで寿命が心配になると思いますが、汎用サーバーのメインストレージ用途であれば10年くらいは持ちそうな感じです。
SSDは機械動作品がないため、MTBFは150万時間(約170年)という途方もない数値ですので、発熱対策とTBW管理をしっかりしておけば、HDDより優れたデバイスと思います。