Oil prices rose after a report of a gasoline unit shutdown at a refinery, and as traders bought contracts to cover short positions ahead of a long U.S. holiday weekend.