BP has agreed to sell a majority stake in its lubricants business, Castrol, to investment firm Stonepeak, in a transaction that would value the unit at $10.1 billion, a company statement showed on Wednesday.