Investors & landlords

I have similar question. If i own a primary home fully pay off, I do cash-our refinance to take 100k. I use this 100k to buy new second home. I then convert first home to rental. is the mortgage interest treat at expense on rental income/business ?