2. Let $\log _{x}\left(2 x^{2}+x-1\right)>\log _{x} 2-1$, then the range of $x$ is
A. $\frac{1}{2}<x<1$
B. $x>\frac{1}{2}$, and $x \neq 1$ C. $x>1$
D. $0<x<1$
$$
\begin{array}{l}
\log _{x}\left(2 x^{2}+x-1\right)>\log _{x} \frac{2}{x} \Rightarrow\left\{\begin{array} { l } 
{ x > 1 , } \\
{ 2 x ^ { 2 } + x - 1 > \frac { 2 } { x } }
\end{array} \text { or } \left\{\begin{array}{l}
0 < x < 1, \\
2 x^{2} + x - 1 > \frac{2}{x}
\end{array}\right.\right. \\
\text { or } \left\{\begin{array}{l}
0 < x < 1, \\
2 x^{3} + x^{2} - x - 2 = (x-1)\left(2 x^{2} + 3 x + 2\right) > 0
\end{array} \Rightarrow x > 1,\right. \\
\text { or }\left\{\begin{array}{l}
0 < x < 1, \\
2 x^{3} + x^{2} - x - 2 = (x-1)\left(2 x^{2} + 3 x + 2\right) > 0
\end{array} \Rightarrow \frac{1}{2} < x < 1 .\right.
\end{array}
$$

Thus, the range of $x$ is $\left(\frac{1}{2}, 1\right) \cup(1,+\infty)$. Therefore, the answer is $B$.