The invention discloses a method for optimizing newly written data of a
client in a
data migration scene by ceph, relates to the technical field of computer storage, and aims to solve the problems that long-
time data migration occupies bandwidth resources and seriously affects the read-write performance of the
client, the key points of the technical scheme are as follows: the method comprises osd.1, osd.2, osd.3, osd.4, object1, object2 and object6, the method comprises the following steps: S1, setting variables, in the
data migration process, setting the variables, in the
data migration process, setting the variables; the method comprises the following steps: taking prime as authoritative data, pushing the data to a newly added disk, and setting a variable lastbackfill; s2, data judgment; s3, optimizing the data; and S4, a result is judged, when the newly written object object 6 is a new object at the prime osd.1, isnewobject is equal to true, the prime end needs to be synchronized to the replica end which is being migrated, and the new object is written into osd.4. And the effects of reducing the migration time, quickly recovering the cluster to the healthy state and reducing the influence on the read-write performance of the
client are achieved.