to do this, all we have to know is the divisible by 7 trick and the divisible by 9 trick. the divisible by 7 trick is where you take away the last digit then multiply it by two, then subtract that number from the original number, and repeat. the divisible by 9 trick is if the digits sum up to a mulitple of 9. now, you can just go with trial and error, and the lowest repunit divisible by both 21 and 9 is 111,111,111,111,111,111, which contains $\boxed{18}$ digits.