A method, system, and computer program product to preserve data integrity in a mirror and copy environment is disclosed herein. In one embodiment, a method may include receiving a write command and data from a host device. The method may further include writing the data to a primary storage device and attaching a primary sequence number associated with the primary storage device to the write command, thereby providing a numbered write command with a command sequence number. The numbered write command may then be transmitted to a secondary storage device. The method may further include comparing the command sequence number to a secondary sequence number associated with the secondary storage device. If the command sequence number matches the secondary sequence number, then the command may be executed. Otherwise, it may be ignored.