A method for initializing a plurality of physical storage devices (PSD) in a redundant array of independent disks (RAID) subsystem, the method comprising:
- creating a RAID, including setting a RAID configuration of the RAID and creating a consistency initialization progress table for storing a plurality of consistency initialization states of a plurality of consistency initialization regions of the physical storage devices of the RAID subsystem;
- wherein the consistency initialization progress table includes a plurality of fields, and wherein one of the plurality of fields corresponds to one of the plurality of consistency initialization regions and said one of the plurality of fields includes a value for indicating the consistency initialization state of said one of the plurality of consistency initialization regions of the physical storage devices of the RAID subsystem, in which the consistency initialization state is a first consistency initialization state meaning that said one of the plurality of consistency initialization regions is completed with an induced regional consistency initialization, or is a second consistency initialization state meaning that said one of the plurality of consistency initialization regions is not completed with the induced regional consistency initialization, wherein after the consistency initialization progress table is created, the RAID subsystem is allowed to be accessed by a host I/O when there are still some of the consistency initialization regions not completed with the induced regional consistency initialization, wherein said induced regional consistency initialization makes data consistent with one another in the consistency initialization region of the physical storage devices of the RAID subsystem;
- receiving the host I/O;
- determining, after referring to the consistency initialization progress table, whether the consistency initialization region that is associated with the host I/O has been completed with the induced regional consistency initialization, so as to determine whether or not to trigger the induced regional consistency initialization on the consistency initialization region that is associated with the host I/O to define data of the consistency initialization region to a predetermined consistent state;
- triggering by the host I/O, before executing an I/O access associated with the host I/O and after referring to the consistency initialization progress table where the consistency initialization progress table shows that the consistency initialization region which is associated with the host I/O has not been completed with the induced regional consistency initialization, is not being performed with the induced regional consistency initialization, and has not been started with the induced regional consistency initialization, the induced regional consistency initialization on the consistency initialization region which is associated with the host I/O to define data of the consistency initialization region to the predetermined consistent state, executing, after triggering the induced regional consistency initialization, the I/O access associated with the host I/O, and updating, after triggering the induced regional consistency initialization, a consistency initialization state of the consistency initialization region that is associated with the host I/O, into the consistency initialization progress table;
- and
- executing the I/O access associated with the host I/O on the consistency initialization region that is associated with the host I/O without first triggering the induced regional consistency initialization on the consistency initialization region that is associated with the host I/O, if the consistency initialization progress table shows that the consistency initialization region that is associated with the host I/O has been completed with the induced regional consistency initialization, after referring to the consistency initialization progress table.