A method for writing data in a cluster of a plurality of host machines, each host machine comprising a storage control module and a plurality of hard drives using flash memory as storage medium, and the host machines being subject to storage management by a cluster control module, wherein the storage control module of each host machine is configured to perform storage management of the hard drives of said host machine, the method comprising: obtaining, by the storage control module of each host machine, a plurality of erasing counts for the hard drives on each host machine of the host machines, wherein the erasing count for each hard drive of the hard drives equals a total count of erasing operations that have been performed on the hard drive; obtaining, by the cluster control module, a total erasing count for each host machine of the host machines, wherein the total erasing count equals a sum of the erasing counts of the hard drives on the host machine; obtaining data to be written into the cluster; in response to obtaining the data to be written into the cluster, identifying one or more of the host machines that each satisfy first conditions associated with writing the data, wherein the first conditions comprise: that a remaining storage capacity of a host machine exceeds a threshold percentage of a total storage capacity of the host machine, and that a number of accesses to data already stored on a host machine does not exceed an access threshold determining a host machine that has a smallest total erasing count among the identified one or more host machines; identifying one or more hard drives on the determined host machine that each satisfy one or more second conditions associated with writing the data, wherein the one or more second conditions comprise: that a remaining storage capacity of the one or more hard drives exceeds a threshold percentage of a total storage capacity of the one or more hard drives; determining a hard drive that has the smallest erasing count among the identified one or more hard drives; and writing the data in the determined hard drive. obtaining, by the storage control module of each host machine, a plurality of erasing counts for the hard drives on each host machine of the host machines, wherein the erasing count for each hard drive of the hard drives equals a total count of erasing operations that have been performed on the hard drive; obtaining, by the cluster control module, a total erasing count for each host machine of the host machines, wherein the total erasing count equals a sum of the erasing counts of the hard drives on the host machine; obtaining data to be written into the cluster; in response to obtaining the data to be written into the cluster, identifying one or more of the host machines that each satisfy first conditions associated with writing the data, wherein the first conditions comprise: that a remaining storage capacity of a host machine exceeds a threshold percentage of a total storage capacity of the host machine, and that a number of accesses to data already stored on a host machine does not exceed an access threshold determining a host machine that has a smallest total erasing count among the identified one or more host machines; identifying one or more hard drives on the determined host machine that each satisfy one or more second conditions associated with writing the data, wherein the one or more second conditions comprise: that a remaining storage capacity of the one or more hard drives exceeds a threshold percentage of a total storage capacity of the one or more hard drives; determining a hard drive that has the smallest erasing count among the identified one or more hard drives; and writing the data in the determined hard drive. <EOS>