Lumber can be purchased from the owner of most lumber mills throughout Skyrim or indirectly from a Steward. The fixed rate is 20 sawn logs for 200. The Dragonborn may also ask permission to cut logs for free from mill owners. Each log cut will yield ten sawn logs. Mill owners will only allow the Dragonborn to use their mill if they view them as a friend. The easiest way to do this is to sell them some firewood, which can often be cut nearby. They are more likely to agree if they are at home, instead of working at the mill. This is not always necessary, however, as Hod will agree even at the mill, saying "Sure thing, friend. I can use a break anyway."
Unlike other building materials, sawn logs are not added to the inventory, rather they are delivered to the building site of the homestead. At the building site, they exist as a physical object called a "Log Pile". It's possible to see how many are available by pointing the crosshair at the logs.
When instructed to buy lumber for Lakeview Manor, the objective marker may point to Half-Moon Mill, however upon arrival there will be no owner to buy lumber from. This only occurs if Hert and Hern were killed in the Dark Brotherhood quest Contract: Kill Hern. Buying lumber from another mill will remove the marker.
PS3 Sometimes when asking to cut sawn logs at a mill when in the mill owner's house, they will say that they can't give it away.
Logs may appear in the inventory under Misc with the appearance of Elven Boots.
Upon cutting logs at a mill, no logs are awarded. Asking to buy lumber and choosing, "Can I cut my own?" will grant lumber again. (Tested with Hod at Anga's mill after several attempts with no lumber.)