lotus 扇区一致性检测 删除错误扇区

1,POST提交失败

ERROR	storageminer	storage/wdpost_run.go:101	runPost failed: running window post failed:
    github.com/filecoin-project/lotus/storage.(*WindowPoStScheduler).runPost
        /root/lotus/storage/wdpost_run.go:599
  - sanity check failed
lotus-miner proving deadlines

1个扇区错误导致整个deadline 0扇区都提交失败

lotus-miner proving deadline 0

2,检测扇区

  • 导出环境变量
export TMPDIR=
export FIL_PROOFS_PARENT_CACHE=
export FIL_PROOFS_PARAMETER_CACHE=
export RUST_LOG=info
export FIL_PROOFS_MAXIMIZE_CACHING=1
export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1
export FIL_PROOFS_USE_GPU_TREE_BUILDER=1
export BELLMAN_CUSTOM_GPU=
./sector-checker checking --sector-size=32G --miner-addr=矿工ID --storage-dir=存储目录
  • 删除错误扇区,重新检测通过

3,扇区188已经上链

# lotus-miner sectors list | grep 188 
188  Proving              YES      NO      1728645 (in 1 year 24 weeks)  CC
  • 扇区cache不是74M,从远程节点拷贝cache的74M替换
store/cache# du -sh * | grep -v 74M
416G s-t矿工-188
  • 查找扇区存储位置
lotus-miner storage find 188
  • 远程矿工目录worker/sealed,从远程节点拷贝sealed的32GB替换store/sealed的扇区
scp s-t矿工-188 root@IP:/cephfs/store/sealed
# lotus-miner proving deadline 0
Faulty Sectors:           [184 186 188 194]
  • 目录store/sealed
# md5sum s-t矿工-184
+69a85eaa6fd28784c634a6bcb1d5984c  s-t矿工-184

3.1 查看扇区故障

# lotus-miner storage find 184
In 44... (Cache)
	Sealing: true; Storage: false
	Remote
	URL: http://IP:3456/remote/cache/s-t矿工-184
In 89... (Sealed, Cache)
	Sealing: false; Storage: true
	Local (/cephfs/k1/store)
	URL: http://IP:2345/remote/sealed/s-t矿工-184
In fd... (Sealed)
	Sealing: true; Storage: false
	Remote
	URL: http://IP:3456/remote/sealed/s-t矿工-184
  • md5对比扇区
store/sealed# md5sum s-t矿工-184
69a85eaa6fd28784c634a6bcb1d5984c  s-t矿工-184
worker/sealed# md5sum s-t矿工-184
cb32c4156857dafde58edaf06d2579d3  s-t矿工-184

4,指定扇区检测

  • 创建文件
# touch sectors-to-scan.txt
# vim sectors-to-scan.txt
  • 检测扇区184 186 188 194
# cat sectors-to-scan.txt
184
186
188
194
# lotus-miner proving deadline 0
Faulty Sectors:           [184 186 188 194]
./sector-checker checking --sector-size=32G -sectors-file-only-number=sectors-to-scan.txt --miner-addr=f矿工 --storage-dir=/cephfs/store存储地址

参考:

  1. sector-sanity-checker-v0.3.0