Lubricant dynamics in sliding and flying