Deuteronomy 15:16-18

15:16 However, if the servant says to you, “I do not want to leave you,” because he loves you and your household, since he is well off with you, 15:17 you shall take an awl and pierce a hole through his ear to the door. Then he will become your servant permanently (this applies to your female servant as well). 15:18 You should not consider it difficult to let him go free, for he will have served you for six years, twice the time of a hired worker; the Lord your God will bless you in everything you do.