A method for storing data shards, wherein the method comprises: determining M storage nodes on which data will be stored; obtaining N replicas of the data, wherein the N replicas comprise original data of the data and N-1 pieces of backup data of the original data, and sharding each of the N replicas into X data shards in a same sharding mode, so that each data shard has N data shard replicas, wherein N is less than or equal to M; and storing the N replicas of the data on the M storage nodes, wherein the N data shard replicas of each of the X data shards are respectively stored on N storage nodes in the M storage nodes, and a quantity of data shards whose data shard replicas are stored on same N storage nodes is P or P+1, wherein P is an integer quotient of X divided by C M N, and wherein the storing comprises: determining C M N data node combinations for selecting N data nodes from the M data nodes when storing the N replicas of the data on the M data nodes; determining the integer quotient P obtained by dividing the quantity X of the shards by C M N, and a remainder Q; and selecting, from the C M N data node combinations, Q data node combinations for storing P+1 data shards, and using remaining C M N − Q data node combinations for storing P data shards, wherein the N replicas of each data shard are respectively stored on N different data nodes in a data node combination. determining M storage nodes on which data will be stored; obtaining N replicas of the data, wherein the N replicas comprise original data of the data and N-1 pieces of backup data of the original data, and sharding each of the N replicas into X data shards in a same sharding mode, so that each data shard has N data shard replicas, wherein N is less than or equal to M; and storing the N replicas of the data on the M storage nodes, wherein the N data shard replicas of each of the X data shards are respectively stored on N storage nodes in the M storage nodes, and a quantity of data shards whose data shard replicas are stored on same N storage nodes is P or P+1, wherein P is an integer quotient of X divided by C M N, and wherein the storing comprises: determining C M N data node combinations for selecting N data nodes from the M data nodes when storing the N replicas of the data on the M data nodes; determining the integer quotient P obtained by dividing the quantity X of the shards by C M N, and a remainder Q; and selecting, from the C M N data node combinations, Q data node combinations for storing P+1 data shards, and using remaining C M N − Q data node combinations for storing P data shards, wherein the N replicas of each data shard are respectively stored on N different data nodes in a data node combination. determining C M N data node combinations for selecting N data nodes from the M data nodes when storing the N replicas of the data on the M data nodes; determining the integer quotient P obtained by dividing the quantity X of the shards by C M N, and a remainder Q; and selecting, from the C M N data node combinations, Q data node combinations for storing P+1 data shards, and using remaining C M N − Q data node combinations for storing P data shards, wherein the N replicas of each data shard are respectively stored on N different data nodes in a data node combination.