A machine-readable medium storing a program code that, when executed by a processor, causes the processor to perform following steps:
- identifying defective storage areas in a storage space of a storage device, and accordingly generating an identification result;
- and
- creating a target storage layout table referenced for partitioning the storage space of the storage device according to the identification result, wherein when the identification result indicates that an actual storage area corresponding to a pre-defined partition with a pre-defined partition size has at least one defective area, setting a partition size of a partition defined in the target storage layout table according to a sum of the pre-defined partition size and a size of the at least one defective area.