  The locally repairable codes (LRCs) were introduced to correct erasures
efficiently in distributed storage systems. LRCs are extensively studied
recently.
  In this paper, we first deal with the open case remained in \cite{q} and
derive an improved upper bound for the minimum distances of LRCs. We also give
an explicit construction for LRCs attaining this bound. Secondly, we consider
the constructions of LRCs with any locality and availability which have high
code rate and minimum distance as large as possible. We give a graphical model
for LRCs. By using the deep results from graph theory, we construct a family of
LRCs with any locality $r$ and availability $2$ with code rate
$\frac{r-1}{r+1}$ and optimal minimum distance $O(\log n)$ where $n$ is the
length of the code.
