Top seed Samantha Stosur recovered from a slow start to beat Virginie Razzano in the second round of the HP Open.