וּבֶֽרֶכְיָה֙ וְאֶלְקָנָ֔ה שֹׁעֲרִ֖ים לָאָרֽוֹן׃
And Berechiah and Elkanah were door-keepers for the ark.
Rashi
Zechariah Ben That was his name; and all these singers and gate sentries [served] on the road by bringing the Ark. The singers and the gate sentries that David stationed after they placed the Ark into the tent that David had pitched for it and in the Tabernacle of Shiloh, were gate sentries, but they were not gate sentries while on the road, because not that many gate sentries were required. Therefore, they became singers, with the exception of two, Berechiah and Elkanah (verse 23). All this was on the road, but when the Ark rested, the singers became gate sentries.