Patent ID: 7546412

Claim:
An apparatus for global metadata copy repair, the apparatus comprising a semiconductor device storing executable code executed by a processor and comprising: a control module configured to copy global metadata from a primary storage device to a target storage device by issuing a buffer read to the primary storage device and subsequently issuing a buffer write to the target storage device, the primary and target storage devices comprising a plurality of track and the global metadata comprising file system configuration data, space usage quotas, access control lists, and extended attributes; a verification module configured to identify an invalid first track in the global metadata of the primary storage device, maintain a bitmap with one bit representing each track of the global metadata, mark a bit for the invalid first track, and clear a bit for each valid second track; a location module configured to maintain a current read address of the buffer read prior to the invalid first track and a write location for writing the invalid first track to the target storage device; a read module configured to find a valid copy of the first track on a secondary storage device, send a buffer write of the valid copy of the first track to the primary storage device at the current read address overwriting the invalid first track on the primary storage device, and concurrently send a buffer write of the valid copy of the first track to the target storage device at the write location, writing the valid copy of the first track to the target storage device; and if no valid copy of the first track is found, the location module is further configured to invalidate the first track of which no valid copy is found, recalculate a longitudinal redundancy check (LRC) for the global metadata, clear the bit in the bitmap for the invalid first track, and write a flag for the invalid first track, the flag requesting restoration of the invalid first track when an owner accesses the invalid first track.