1. A controller that is connected to a data access unit that writes and reads data to and from a data storage unit that stores data, a management information access unit that writes and reads data to and from a management information storage unit that stores management information including address conversion information in which physical addresses and logical addresses of the data storage unit are associated with each other, a first access unit that writes and reads data to and from a first storage unit that stores a first physical address of the data storage unit, and a second access unit that writes and reads data to and from a second storage unit that stores a second physical address of the data storage unit, the controller comprising: a receiver that receives a data write request from a host device; a write instructing unit that instructs the first access unit to read the first physical address, instructs the data access unit to write, in a storage area of the data storage unit indicated by the first physical address, write object data that is data requested to be written by a host device, instructs the management information access unit to update the address conversion information of the write object data, and instructs the first access unit to update the first physical address; and a compaction unit that instructs the management information access unit to read the management information, extracts a physical address of compaction object data among data stored in the data storage unit on the basis of the management information read, instructs the data access unit to read the compaction object data stored in a storage area of the data storage unit indicated by the physical address, instructs the second access unit to read the second physical address, instructs the data access unit to write the compaction object data in a storage area of the data storage unit indicated by the second physical address read, instructs the management information access unit to update the address conversion information of the compaction object data, and instructs the second access unit to update the second physical address.