Product: FGT, FortiOS 5.4.1
Level: Beginner
Scope: CLI
Author: Gregory Ciolek
Each SSD has a TBW (Total Bytes Written). Most SSD vendors put that number in the specification.
So let’s check HOMER’s drive:
diagnose hardware smartctl /dev/sdb -a smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.2.16] (local build) Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Device Model: D2CSTK251M3T-0120.F Serial Number: A22IQ061520001344 LU WWN Device Id: 5 e83a97 1000668d7 Firmware Version: 2.50 User Capacity: 120,034,123,776 bytes [120 GB] Sector Size: 512 bytes logical/physical Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 8 ATA Standard is: ACS-2 revision 3 Local Time is: Tue Sep 27 11:30:32 2016 GMTb 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: ( 1) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: (0) 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: ( 1) minutes. Extended self-test routine recommended polling time: ( 36) minutes. Conveyance self-test routine recommended polling time: ( 2) minutes. SCT capabilities: (0x0025) SCT Status supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Number of Accumulation of Uncorrectable Error 0x0033 120 120 050 Pre-fail Always - 0x000000000000 5 Reassigned block count 0x0033 100 100 003 Pre-fail Always - 0x000000000000 9 Power_On Hours count 0x0032 091 091 000 Old_age Always - 0x00000000214F 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 0x000000000068 171 Program fail count 0x000a 000 000 000 Old_age Always - 0x000000000000 172 Erase fail count 0x0032 000 000 000 Old_age Always - 0x000000000000 174 Unexpected power loss count 0x0030 000 000 000 Old_age Offline - 0x00000000006A 177 Wear_Leveling_Count 0x0000 000 000 000 Old_age Offline - 0x000000000001 181 Program_Fail_Cnt_Total 0x000a 000 000 000 Old_age Always - 0x000000000000 182 Erase_Fail_Count_Total 0x0032 000 000 000 Old_age Always - 0x000000000000 187 Reported_Uncorrect count 0x0012 100 100 000 Old_age Always - 0x000000000000 194 Temperature_Celsius 0x0022 041 059 000 Old_age Always - 0x000000000029 195 Hardware_ECC_Recovered 0x001c 120 120 000 Old_age Offline - 0x000000000000 196 Reallocated_Event_Count 0x0033 100 100 003 Pre-fail Always - 0x000000000000 201 Soft_Read_Error_Rate 0x001c 120 120 000 Old_age Offline - 0x000000000000 204 Soft_ECC_Correction 0x001c 120 120 000 Old_age Offline - 0x000000000000 230 Percentage of total write/erase 0x0013 100 100 000 Pre-fail Always - 0x000000000064 231 Temperature_Celsius 0x0013 100 100 010 Pre-fail Always - 0x000000000000 233 Media_Wearout_Indicator 0x0032 000 000 000 Old_age Always - 0x0000000010CE 234 Percentage of total write/erase(BC blocks) 0x0032 000 000 000 Old_age Always - 0x0000000006AB 241 Total_LBAs_Written 0x0032 000 000 000 Old_age Always - 0x0000000006AB 242 Total_LBAs_Read 0x0032 000 000 000 Old_age Always - 0x0000000020C9 SMART Error Log not supported SMART Self-test Log not supported 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 Not_testing
I highlighted the most important stuff for this exercise:
D2CSTK251M3T-0120.F – OCZ Deneva 2 C Series – solid state drive – 128 GB – SATA 6Gb/s – http://www.conetec.su/upload/iblock/ecd/OCZ_Deneva2.pdf and this is 20TBW (4k) or 120TBW (128K)
Sector Size 512 – We are going to use this.
233 Media_Wearout_Indicator – Value – this indicate how helthy is the drive – 0 is the best
241 Total_LBAs_Written – this is current TBW in a RAW format.
So we need to do some math:
0x0000000006AB (hex) = 1707 (dec)
1707 * 512 (LBA size) / 1073741824 = 0.000813961 TBW
and the verdict is – There’s a long life ahead for HOMER.