actually his position was chief of operations his rank was chief petty officer he has the same position as data in operations department
Actually, that wasn't the case originally. Chief of Operations was indeed O'Brien's rank--something he declared (rather firmly) several times to the Cardassians in "Tribunal":
O'BRIEN: My name is Miles O'Brien. My rank, Chief of Operations...
While Starfleet's commissioned officer grades generally corresponded with those of the US Navy, the same couldn't be entirely said for the enlisted grades, probably due to writer unfamiliarity with them and/or a need to continue calling O'Brien a chief after his promotion, so we end up with O'Brien having an invented Starfleet-only noncom rank of Chief of Operations.
It wasn't until later that they tried to give O'Brien a more traditional rank and came up with Senior Chief Specialist in "Shadowplay."