Servo patterns for patterned media. The servo pattern includes specification of cylinder/track ID with and without a Gray code. The servo pattern space is minimized by the optimum usage of the islands. This is achieved by island allocation rules to take advantage of non-magnetic island. The island allocation also provides for easier lift-off. Logic is used to encode and decode the Gray code. Further, the Gray code is designed to stabilize the magnetic island/non-magnetic island ratio to allow for easier manufacture.