A parallelogram is generated by the vectors $\begin{pmatrix} 2 \\ 1\\ 1 \end{pmatrix}$ and $\begin{pmatrix} 1 \\ -1 \\ - 1 \end{pmatrix}.$

[asy]
unitsize(0.4 cm);

pair A, B, C, D;

A = (0,0);
B = (7,2);
C = (1,3);
D = B + C;

draw(A--B,Arrow(6));
draw(A--C,Arrow(6));
draw(B--D--C);
draw(B--C,dashed);
draw(A--D,dashed);
[/asy]

If $\theta$ is the angle between the diagonals, then find $\cos \theta.$
Suppose that vectors $\mathbf{a}$ and $\mathbf{b}$ generate the parallelogram.  Then the vectors corresponding to the diagonals are $\mathbf{a} + \mathbf{b}$ and $\mathbf{b} - \mathbf{a}.$

[asy]
unitsize(0.4 cm);

pair A, B, C, D, trans;

A = (0,0);
B = (7,2);
C = (1,3);
D = B + C;
trans = (10,0);

draw(B--D--C);
draw(A--B,Arrow(6));
draw(A--C,Arrow(6));
draw(A--D,Arrow(6));

label("$\mathbf{a}$", (A + B)/2, SE);
label("$\mathbf{b}$", (A + C)/2, W);
label("$\mathbf{a} + \mathbf{b}$", interp(A,D,0.7), NW, UnFill);

draw(shift(trans)*(B--D--C));
draw(shift(trans)*(A--B),Arrow(6));
draw(shift(trans)*(A--C),Arrow(6));
draw(shift(trans)*(B--C),Arrow(6));

label("$\mathbf{a}$", (A + B)/2 + trans, SE);
label("$\mathbf{b}$", (A + C)/2 + trans, W);
label("$\mathbf{b} - \mathbf{a}$", (B + C)/2 + trans, N);
[/asy]

Thus, the vectors corresponding to the diagonals are $\begin{pmatrix} 3 \\ 0 \\ 0 \end{pmatrix}$ and $\begin{pmatrix} 1 \\ 2 \\ 2 \end{pmatrix}.$  Then
\[\cos \theta = \frac{\begin{pmatrix} 3 \\ 0 \\ 0 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ 2 \\ 2 \end{pmatrix}}{\left\| \begin{pmatrix} 3 \\ 0 \\ 0 \end{pmatrix} \right\| \left\| \begin{pmatrix} 1 \\ 2 \\ 2 \end{pmatrix} \right\|} = \frac{3}{3 \cdot 3} = \boxed{\frac{1}{3}}.\]