| CPC G06F 3/0616 (2013.01) [G06F 3/064 (2013.01); G06F 3/0647 (2013.01); G06F 3/0688 (2013.01)] | 19 Claims |

|
1. A data storage apparatus, comprising:
a plurality of data storage devices, each data storage device having a same storage capacity, and each data storage device including a corresponding number of bad blocks; and
a plurality of controllers, each controller corresponding to a respective data storage device, and each controller configured to:
obtain a minimum number of blocks of the respective data storage device for supporting a predetermined storage characteristic;
calculate a respective number of spare blocks based on a respective number of bad blocks within the respective data storage device;
perform relocation for the respective data storage device based on the minimum number of blocks; and
perform operations, which are not relocation, for the respective data storage device, based on the minimum number of blocks and the respective number of spare blocks,
wherein each controller is configured to:
determine a respective number of illusory free blocks within the respective data storage device; and
in accordance with a determination that the respective number of illusory free blocks meets a respective threshold, trigger the relocation for the respective data storage device,
wherein:
the blocks of the respective data storage device for supporting the predetermined storage characteristic are configured to be used for data storage;
the illusory free blocks are configured to be used for data storage;
the spare blocks are configured to be used for data storage;
bad blocks are not usable for data storage;
the illusory free blocks exclude the spare blocks and bad blocks; and
the illusory free blocks are based on the blocks of the respective data storage device for supporting the predetermined storage characteristic.
|