Also, were these religious minorities subject to persecution during the Muslim conquest of Iraq and Iran and beyond?
All right, this is a bit out of my water, but I will give it a shot.
Mandaeism and Yazidism both belong to a 2000-year old tradition of Mesopotamian syncretism, a tradition which took influence from Greek neoplatonism, Judaism, Christianity, as well as (to various extents) Zoroastrianism. Yazidism almost certainly did not exist as an identifiable religious movement during the Islamic invasion. Not least becasue the name is usually thought these days to come from the Umayyad Caliph al-Yazidi bin Mu'awiyya. Rather, it emerges in the 11th century, mixing Sufism, Iranian tradition, and Mesopotamian syncretism into a basically monotheistic religion mainly defined by purity rites and rules of living (rather typical of Iranian religion, but probably also owing to Islamic influence as well). Simply put, they survived by making agreements with local Islamic authorities, as any other religious minority did.
Mandaeism is undoubtedly older, but also understudied and not very well understood. They are usually conflated with other religious miniorities by outside writers, and their history can only carefully be teased out from name lists and the like, along with a fragmentary text known as the The Haran Gawaita and the Baptism of Hibil Ziwa. In its latter parts we find polemics against Muslims, with especial condemnation of their practice of circumcision. Tradition holds that a layman named Anuš bar Danqa was able to convince Muslim authorities that they should be considered a "people of the book"; they were apparently (wrongly or rightly) identified with the Sabians mentioned as such peoples in the Qur'an.
Unfortunately, the history of either group is not very well recorded. But from what we can tell, they survived as any other group - by reaching agreements with the new Islamic authorities.
My main sources are these Encyclopaedia Iranica articles along with various reading on Mesopotamian syncretic groups connected with Zoroastrianism to some extent.