2. Given an equilateral $\triangle A B C$ with side length $2, P$ is a point inside $\triangle A B C$, and the distances from point $P$ to the three sides $B C, A C, A B$ are $x, y, z$ respectively, and their product is $\frac{\sqrt{3}}{9}$. Then the sum of the squares of $x, y, z$ is
2. 1 .

As shown in Figure 4, connect
$$
P A, P B, P C \text{. }
$$

It is easy to see that, in the equilateral $\triangle A B C$, we have
$$
\begin{array}{l}
x+y+z \\
=\frac{\sqrt{3}}{2} A B=\sqrt{3} .
\end{array}
$$

Thus, $\sqrt{3}=x+y+z$
$$
\geqslant 3 \sqrt[3]{x y z}=3 \sqrt[3]{\frac{\sqrt{3}}{9}}=\sqrt{3} \text{. }
$$

Since the equality holds, we have
$$
x=y=z=\frac{\sqrt{3}}{3} \text{. }
$$

Therefore, $x^{2}+y^{2}+z^{2}=1$.