Abstract:Any codeword symbol in a Locally Repairable Code can be denoted as linear combination of other symbols. In a distributed storage system with locally repairable codes, any node failure can be rebuilt by accessing other fixed nodes. In this paper, some methods of constructing matrices which can generate codes with small locality are proposed. And by analyzing the parameters of the optimal codes, this paper constructs the generator matrices of 5-dimentional optimal codes, by using techniques such as shortening, puncturing, adding or deleting column vectors. By analyzing the linear relationship between the column vectors of the generator matrices, the locality of the codes generated is found out. Many codes with small locality are to be found, which have a potential application prospect.