Exodus 21:4

21:4 If his master gave him a wife, and she bore sons or daughters, the wife and the children will belong to her master, and he will go out by himself.

Exodus 21:6

21:6 then his master must bring him to the judges, and he will bring him to the door or the doorposts, and his master will pierce his ear with an awl, and he shall serve him forever.