It was Salman who came up with the idea of digging a great trench around the city of Medina to defend the city against the army of 10,000 Arabian non-Muslims.
Muhammad and his companions accepted Salman's plan because it was safer and there would be a better chance that the non-Muslim army would have a larger number of casualties.

Salman participated in the conquest of the Sasanian Empire and became the first governor of Sasanid capital after its fall at the time of the second Rashidun Caliph.
According to some other sources, however, he disappeared from public life after Muhammad's death; until 656 when Ali became Caliph, and appointed Salman as the governor of Al-Mada'in at the age of 88.

While some sources gather Salman with the Muhajirun, other sources narrate that during the Battle of the Trench, one of Muhajirun stated "Salman is one of us, Muhajirun", but this was challenged by the Muslims of Medina (also known as the Ansar).
A lively argument began between the two groups with each of them claiming Salman belonged to their group and not to the other one.
Muhammad arrived on the scene and heard the argument.
He was amused by the claims but soon put an end to the argument by saying: "Salman is neither Muhajir nor Ansar.
He is one of us.
He is one of the People of the House."
It was Salman who came up with the idea of digging a great trench around the city of Medina to defend the city against the army of 10,000 Arabian non-Muslims. Muhammad and his companions accepted Salman's plan because it was safer and there would be a better chance that the non-Muslim army would have a larger number of casualties.
Salman participated in the conquest of the Sasanian Empire and became the first governor of Sasanid capital after its fall at the time of the second Rashidun Caliph. According to some other sources, however, he disappeared from public life after Muhammad's death; until 656 when Ali became Caliph, and appointed Salman as the governor of Al-Mada'in at the age of 88.
While some sources gather Salman with the Muhajirun, other sources narrate that during the Battle of the Trench, one of Muhajirun stated "Salman is one of us, Muhajirun", but this was challenged by the Muslims of Medina (also known as the Ansar). A lively argument began between the two groups with each of them claiming Salman belonged to their group and not to the other one. Muhammad arrived on the scene and heard the argument. He was amused by the claims but soon put an end to the argument by saying: "Salman is neither Muhajir nor Ansar. He is one of us. He is one of the People of the House."
Salman the Persian