as I am not a tax professional, so don't quote me...
there are 2 ways, cash out against primary home or HELOC against primary home.
1. if you do cash out refi, closing should go to itemized deduction, interest should also go with primary home.
2. if you do HELOC, closing should go to itemized deduction, then claim interest against rent income.