I am flavoring my first beer in a new, 5 gallon oak barrel. This batch is a full 5 gallon batch, but is it ok to put smaller sizes in it? For example, can I put 2.5 gallons in without any harmful effects? I'm thinking the oak flavors will flavor the beer fairly quickly (i.e., 2 to 5 days), so having more surface exposed to oxygen will not be a huge problem.
Wood barrels should be full or they will leak. The dry areas may open up allowing contamination from the air.
To prevent oxidation when racking to barrels the hydrating / sanitizing fluid is purged from the barrel with c02, so there is no oxygen exposure at all when racking to the barrel. This is good practice with any secondary.
Barrel still needs to be filled though.
Your thinking is correct. Even with one day that extra surface area will oxidize your beer. A better option for a partially sized batch would be oak cubes or chips in a normal carboy/fermentor. Save the barrel for a full 5 gallon batch.
A good practice is to brew more than 5 gallons to be sure you can nearly fill it. Or to brew 5 gallons slightly stronger in gravity and bitterness, so you can top off with some water if need be in the barrel later on. Just be sure to use boiled water so its sanitized and de-oxygenated.