PowerFlex enable_background_device_scanner、API 和記錄變更
Summary: 本文說明在 v3.0.0.2 HF1 中出現「保守」模式功能後,為在 VxFlexOS 中啟用背景掃描器而對 scli 和 REST API 命令的變更。這使我們能夠更好地控制報告功能,並確定客戶想要啟動的模式。在所有以前的版本(包括v3.0.1)中,後台掃描程式有兩個選項,device_only模式和comparison_mode(還包括device_only模式的所有功能)。 ...
Instructions
自 ScaleIO v2.5 起,HF1 比較模式包含一個新選項,可略過修正比較錯誤,並將其報告至 /opt/emc/scaleio/logs/comparison.0 檔案。這也會停用在正常狀態下屬於比較模式一部分的device_only模式的讀取修復和報告功能。
隨著 scli 和 API 變更,在使用 v3.0.0.2 HF 啟用背景掃描器比較模式時,一些額外的記錄已新增至 SDS 節點。
變更記錄變更:/opt/emc/scaleio/sds/logs/comparison.x
19/11 10:50:12.446570 Scanning combs for device be4c66a400000001, loop #1945 ended, #scanned combs=137, #sec combs (skipped)=69, #primary combs skipped=0, #scanned teeth=19418
將 comparison.x 檔案的預設數量從 10 個減少到較小數量的步驟:
echo "tgt_comparison_file_history =2" >> /opt/emc/scaleio/sds/cfg/conf.txt ; pkill sds
在所有應減少檔案的 SDS 上執行此操作。新的 CRC32 輸出記錄檔 (包含來自 PRI 或 SEC 的 1MB 使用者資料的雜湊輸出),以在主要和次要之間進行驗證:
/opt/emc/scaleio/sds/logs/{randomID}_compare_combID_offset_[pri/sec].log
範例:
/opt/emc/scaleio/sds/logs/1259357004_compare_71f2800001b5_18432_pri.log Trace entry correlating in comparison.x: 13/11 14:03:54.470982 vtreeId a227e28500000000 Comb 71f2800001b5, offset 18432 - compare error - succeeded to fix the secondary by the primary, randId 1259357004.
對應的 sds/logs/trc.x 記錄:
trc.5:13/11 14:03:54.459658 0x7f598e35ddb8:mgStorageRegion_VerifyDataCRC:02769: primary and secondary checksums are different (pri=1025730551, sec=3956700141). will dump the error. randId 1259357004. combId:71f2800001b5,vTree:0xa227e28500000000,offsetVol:0x12da000,offsetInComb:18432,sizeInLbs:2048,phyToothIdx:2608,srcToothIdx:inv,dstToothIdx:inv New:(0,0) Requested:(3,1) volId:0 trc.5:13/11 14:03:54.470972 0x7f598e35ddb8:raidScan_FixSecondaryByPrimary:00295: comb:71f2800001b5,vTree:0xa227e28500000000,offsetVol:0x12da000,offsetTooth:0x0, Comb 71f2800001b5, offset 18432 - fix the secondary by the primary, randId 1259357004, rc = SUCCESS trc.5:13/11 14:03:54.470988 0x7f598e35ddb8:raidScan_HandleComparisonError:01006: compare error - succeeded to fix the secondary by the primary. randId 1259357004. combId:71f2800001b5,vTree:0xa227e28500000000,offsetVol:0x12da000,offsetInComb:18432,sizeInLbs:2048,phyToothIdx:2608,srcToothIdx:inv,dstToothIdx:inv New:(0,0) Requested:(3,1) volId:0 trc.5:13/11 14:03:54.472246 0x7f598e35ddb8:raidScan_HandleComparisonError:01046: Sent a message to the MDM on compare error (randId 1259357004). combId:71f2800001b5,vTree:0xa227e28500000000,offsetVol:0x12da000,offsetInComb:18432,sizeInLbs:2048,phyToothIdx:2608,srcToothIdx:inv,dstToothIdx:inv New:(0,0) Requested:(3,1) volId:0
正在檢查兩個輸出檔案:
-rw-rw-rw-. 1 root root 4096 Nov 13 14:03 1259357004_compare_71f2800001b5_18432_pri.log -rw-r--r--. 1 root root 4096 Nov 19 11:10 1259357004_compare_71f2800001b5_18432_sec.log diff 1259357004_compare_71f2800001b5_18432_pri.log 1259357004_compare_71f2800001b5_18432_sec.log Binary files 1259357004_compare_71f2800001b5_18432_pri.log and 1259357004_compare_71f2800001b5_18432_sec.log differ [root@localhost logs]# md5sum 1259357004_compare_71f2800001b5_18432_pri.log d11924aadfe72dd1117f260f8b092caf 1259357004_compare_71f2800001b5_18432_pri.log [root@localhost logs]# md5sum 1259357004_compare_71f2800001b5_18432_sec.log 620f0b67a91f7f74151bc5be745b7110 1259357004_compare_71f2800001b5_18432_sec.log
舊命令
scli --enable_background_device_scanner
Error: Either a valid Storage Pool ID or name must be specified
Usage: scli --enable_background_device_scanner (((--protection_domain_id | --protection_domain_name ) --storage_pool_name ) | --storage_pool_id ) --scanner_mode [--scanner_bandwidth_limit ] [--report_and_fix | --report_only]
Description: Enable background device scanner
Parameters:
--protection_domain_id Protection Domain ID
--protection_domain_name Protection Domain name
--storage_pool_name Storage Pool name
--storage_pool_id Storage Pool ID
--scanner_mode Scanner mode of operation where MODE can be one of the following:
device_only - Perform read operations. Fix from peer on errors
data_comparison - Perform the device_only test and compare the data content with peer. Not supported for fine granularity Storage Pools
--scanner_bandwidth_limit Bandwidth limit in KB per second per device. The given value should be between 10KB and 10MB. The default value is 3MB
--report_and_fix Report errors and automatically fix them (default)
--report_only Report errors without fixing them
|
掃描器模式 |
動作 |
結果 |
|
device_only |
report_and_fix |
僅檢測、報告和修復讀取錯誤。 |
|
report_only |
僅偵測和報告讀取錯誤 (未修正) |
|
|
未透露 |
與report_and_fix相同(選項 1) |
|
|
data_comparison |
report_and_fix |
偵測到讀取和比較錯誤並加以修正。 |
|
report_only |
偵測並報告讀取和比較錯誤 (未修正) |
|
|
未透露 |
與 report_and_fix 相同 (選項 3) |
新增命令
Usage: scli --enable_background_device_scanner (((--protection_domain_id | --protection_domain_name ) --storage_pool_name ) | --storage_pool_id ) --read_error_action --compare_error_action [--scanner_bandwidth_limit ]
Description: Enable background device scanner
Parameters:
--protection_domain_id Protection Domain ID
--protection_domain_name Protection Domain name
--storage_pool_name Storage Pool name
--storage_pool_id Storage Pool ID
--read_error_action Read error handling. Can be one of the following:
report_and_fix - Perform read operations and automatically fix from peer on errors
report_only - Perform read operations and report errors without fixing them
--compare_error_action Compare error handling. Can be one of the following:
no_compare - Perform read operations without comparing data content with peer
report_and_fix - Perform read operations, compare data content with peer, and automatically fix
Not supported for fine granularity Storage Pools
report_only - Perform read operations, compare data content with peer, and report mismatches without fixing them
Not supported for fine granularity Storage Pools
--scanner_bandwidth_limit Bandwidth limit in KB per second per device. The given value should be between 10KB and 10MB. The default value is 3MB
|
讀取錯誤模式 |
比較錯誤模式。 |
結果 |
對應 |
|
|
no_scan |
no_scan |
無效的組合 - 有適用於此的停用命令。 |
無效 1 |
掃描器模式 = NULL (不支援) |
|
report_only |
無效組合 - 不閱讀就無法比較。 |
無效 2 |
|
|
|
report_and_fix |
無效組合 - 不閱讀就無法比較。 |
無效 3 |
|
|
|
report_only |
no_scan |
僅偵測和報告讀取錯誤 (未修正) |
2 |
掃描器模式 = device_only 比較錯誤動作 = NULL readErrorAction = report_only
|
|
report_only |
偵測並報告讀取和比較錯誤 (未修正) |
4 |
掃描器模式 = data_comparison 比較錯誤動作 = report_only readErrorAction = report_only
|
|
|
report_and_fix |
會偵測並報告讀取和比較錯誤,但只會修正比較錯誤。 |
新 1 |
掃描器模式 = data_comparison 比較錯誤動作 = report_and_fix readErrorAction = report_only
|
|
|
report_and_fix |
no_scan |
僅檢測、報告和修復讀取錯誤。 |
1 |
掃描器模式 = device_only 比較錯誤動作 = NULL readErrorAction = report_and_fix
|
|
report_only |
會偵測並報告讀取和比較錯誤,但只會修正讀取錯誤。 |
新 2 |
掃描器模式 = data_comparison 比較錯誤動作 = report_only readErrorAction = report_and_fix
|
|
|
report_and_fix |
偵測、報告和修正讀取和比較錯誤。 |
3 |
掃描器模式 = data_comparison 比較錯誤動作 = report_and_fix readErrorAction = report_and_fix
|