Gloucestershire up against it after second day