Hierarchical codes: how to make erasure codes attractive for peer-to-peer storage systems