Hi,
Please first of all state your exact model and SW version. Do you have an HP 5120 SI or HP 5120 EI?
I recommend you bookmark the HP Networking support lookup tool, where you can search for your specific model either by name or product number and gain access to all related SW downloads and manuals:
https://h10145.www1.hpe.com/support/SupportLookUp.aspx
In general, HP Comware-based switches use a technology called IRF for stacking purposes. In the manuals for your switch model you will find a specific guide for this, the "IRF Configuration Guide".
The EI models for example only support IRF on 10 GbE ports, that's why the exact model of yours is so important.
Regards