A method for writing data into a storage system, wherein the storage system comprises a redundant array of independent disks, RAID, the RAID comprises a control device and X storage devices, a data stripe is stored in the RAID, and the data stripe comprises (N+M) members, N standing for a quantity of data units in the members, M standing for a quantity of check units generated based on the N data units, N>=2, M=2, and the RAID is RAID 6 with N+M=X or N+M=2X or (N+M)>X, wherein when (N+M)>X and (N+M) is not equal to a multiple of X, each storage device stores one or two members of the stripe; and the method is performed by the control device and comprises: determining that at least one first storage device of the X storage devices is out of service, wherein at least one member of the data stripe is stored in the first storage device; the method being characterized by: determining that a quantity of out-of-service members reaches a quantity of out-of-service members that is tolerable to the RAID 6; updating the members of the data stripe stored on the remaining not out of service storage devices by writing new data to the members; and writing target data into (Y+1) second storage devices of the X storage devices, wherein Y=M-(┌(N+M)/X┐-1), wherein the target data is a data unit or a check unit used to update the at least one member that is stored in the first storage device, and wherein ┌(N + M)/X┐ represents performing rounding up on (N+M)/X, and wherein the target data is obtained through calculation by using the updated members of the data stripe stored on the remaining not out of service storage devices. determining that at least one first storage device of the X storage devices is out of service, wherein at least one member of the data stripe is stored in the first storage device; the method being characterized by: determining that a quantity of out-of-service members reaches a quantity of out-of-service members that is tolerable to the RAID 6; updating the members of the data stripe stored on the remaining not out of service storage devices by writing new data to the members; and writing target data into (Y+1) second storage devices of the X storage devices, wherein Y=M-(┌(N+M)/X┐-1), wherein the target data is a data unit or a check unit used to update the at least one member that is stored in the first storage device, and wherein ┌(N + M)/X┐ represents performing rounding up on (N+M)/X, and wherein the target data is obtained through calculation by using the updated members of the data stripe stored on the remaining not out of service storage devices. determining that a quantity of out-of-service members reaches a quantity of out-of-service members that is tolerable to the RAID 6; updating the members of the data stripe stored on the remaining not out of service storage devices by writing new data to the members; and writing target data into (Y+1) second storage devices of the X storage devices, wherein Y=M-(┌(N+M)/X┐-1), wherein the target data is a data unit or a check unit used to update the at least one member that is stored in the first storage device, and wherein ┌(N + M)/X┐ represents performing rounding up on (N+M)/X, and wherein the target data is obtained through calculation by using the updated members of the data stripe stored on the remaining not out of service storage devices.