Technical Note: Diagnose command to test flash SSD
Description
Solution
This article describes how the diagnose command introduced in v5.2.1 can be used to test flash SSD. It can be useful to test and diagnose the flash status when it appears to be corrupted or defective.
It will run some read/write tests to the flash and can help to understand if the flash could be recovered, it provides more precise results than the common HQIP test.
device Specify which device to test
block The block size of each read/write operation
time The limit of test time of each cycle. Default is no limit.
size The limit of test time of each cycle. Default is no limit.
run Run test with specified cycle. Default is infinite cycles.
It will run some read/write tests to the flash and can help to understand if the flash could be recovered, it provides more precise results than the common HQIP test.
diag disktestSyntax
diagnose disktest <option>Option values are:
device Specify which device to test
block The block size of each read/write operation
time The limit of test time of each cycle. Default is no limit.
size The limit of test time of each cycle. Default is no limit.
run Run test with specified cycle. Default is infinite cycles.
Solution
Disk Test examples
1. Good SDD flash disk test:
1.1. Prepare and run the test
1.2. Stop the test using ‘ <ctrl + C>’
2. SDD flash disk test Failure:
2.1. Prepare and run the test
1. Good SDD flash disk test:
1.1. Prepare and run the test
FGT90D # diagnose disktest device ?
1 /dev/sda, size 30533MB
2 /dev/sdb, size 1900MB, boot device
FGT90D # diagnose disktest device 2
Current Test Device: /dev/sdb
FGT90D # diagnose disktest block 1
Current Test Block: 1M.
FGT90D # diagnose disktest size 10
Current Size Limit: 10 MB
FGT90D # diagnose disktest run
Round 1 started.
Current Test Device: /dev/sdb
Total size: 1900M
Current Test Block: 1M.
Current Time Limit: No limit
Current Size Limit: 10 MB
Time(Sec) Size(MB) Read(MB/s) Write(MB/s)
0.0 0(0.00%): ..........
Test Result: Passed
Tested size: 10MB (0.53% Coverage of whole disk)
Time used: 7.0 sec
Read Speed: 15.0MB/s
Write Speed: 3.6MB/s
Round 1 Finished!
Round 2 started.
Current Test Device: /dev/sdb
Total size: 1900M
Current Test Block: 1M.
Current Time Limit: No limit
Current Size Limit: 10 MB
Time(Sec) Size(MB) Read(MB/s) Write(MB/s)
0.0 0(0.00%): ..........
Test Result: Passed
Tested size: 10MB (0.53% Coverage of whole disk)
Time used: 7.0 sec
Read Speed: 14.5MB/s
Write Speed: 3.6MB/s
Round 2 Finished!
Round 3 started.
Current Test Device: /dev/sdb
Total size: 1900M
Current Test Block: 1M.
Current Time Limit: No limit
Current Size Limit: 10 MB
Time(Sec) Size(MB) Read(MB/s) Write(MB/s)
0.0 0(0.00%): ..........
Test Result: Passed
Tested size: 10MB (0.53% Coverage of whole disk)
Time used: 7.7 sec
Read Speed: 15.2MB/s
Write Speed: 3.2MB/s
Round 3 Finished!
1.2. Stop the test using ‘ <ctrl + C>’
Round 4 started.
Current Test Device: /dev/sdb
Total size: 1900M
Current Test Block: 1M.
Current Time Limit: No limit
Current Size Limit: 10 MB
Time(Sec) Size(MB) Read(MB/s) Write(MB/s)
0.0 0(0.00%): ......User interrupt! Restoring data back to disk...
Test Result: Interrupted
Tested size: 6MB (0.32% Coverage of whole disk)
Time used: 5.2 sec
Read Speed: 14.5MB/s
Write Speed: 2.8MB/s
Round 4 Finished!
2. SDD flash disk test Failure:
2.1. Prepare and run the test
FGT60C # diagnose disktest run
Round 1 started.
Current Test Device: /dev/sda
Total size: 7640M
Current Test Block: 4M.
Current Time Limit: No limit
Current Size Limit: No limit
Time(Sec) Size(MB) Read(MB/s) Write(MB/s)
0.0 0(0.00%): .................................................. 12.4 7.5
90.2 200(2.62%): .................................................. 12.3 7.7
178.9 400(5.24%): .................................................. 12.4 7.7
267.4 600(7.85%): .................................................. 12.4 7.7
356.0 800(10.47%): ................... Read error: 4194304 bytes wanted , only 3899392 bytes read! ---------
Test Result: Failed ---------
Tested size: 876MB (11.47% Coverage of whole disk) ---------
Time used: 389.3 sec
Read Speed: 12.3MB/s
Write Speed: 7.7MB/s
Command fail. Return code -1
