摘要 |
Embodiments of the present invention provide a file processing method and a storage device. In the method, a storage device receives T files that are to be stored in the RAID, and determines a sequence number of a check block in a stripe of the RAID. The storage device repeatedly obtains a data block of the K th file in the T files as the K th data block in the stripe, where a value of K progressively increases from 1 to T, and the value of K is not equal to the sequence number of the check block in the stripe. After computing the check block according to data blocks, the storage device writes, into the T disks, the data blocks and the obtained check block in the stripe. By using the foregoing method, one file can be written into one disk of the RAID while ensuring security of file storage. |