Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Container sorting scenarios and demos

Darren Ldl edited this page Apr 13, 2019 · 4 revisions

Purpose

This page discusses scenarios related to sorting SBX containers. Not all scenarios are designed to be realistic, they are designed to illustrate various techniques for you to pick and apply for your specific scenario.

You want to adjust the burst error resistance level

Demo

You can supply --burst flag to specify the burst error resistance level to use for the sorted container.

You only want to check if the container blocks are in the correct order

Demo

You can supply --dry-run flag to sort mode and it'll only report the statistics without writing to any files.

You want to merge multiple corrupted copies to get a good copy

Demo

Sort mode supports --multi-pass for updating the final container across multiple runs, this essentially allows you to "merge" several partially good containers together.

Say we have test.ecsbx.0, test.ecsbx.1, test.ecsbx.2 which all have varying degrees of damage upon checking with check mode, and repair mode dry run tells you they cannot be repaired successfully. Now you want to merge all of the good blocks together and see if that fixes it or allows repair mode to do something at least. You can do the following

$ blkar sort --multi-pass test.ecsbx.0 merged.ecsbx
$ blkar sort --multi-pass test.ecsbx.1 merged.ecsbx
$ blkar sort --multi-pass test.ecsbx.2 merged.ecsbx

then check and/or repair as you see fit

$ blkar check merged.ecsbx
$ blkar repair merged.ecsbx

The demo uses SBX rather than ECSBX, but everything looks basically the same for ECSBX sorting.