Let F be a totally real field with ring of integers O and p be an odd prime unramified in F. Let p be a prime above p. We prove that a mod p Hilbert modular form associated to F is determined by its restriction to the partial Serre-Tate deformation space Gm ⊗ Op (p-rigidity). Let K/F be an imaginary quadratic CM extension such that each prime of F above p splits in K and λ a Hecke character of K. Partly based on p-rigidity, we prove that the µ-invariant of anticyclotomic Katz p-adic L-function of λ equals the µ-invariant of the full anticyclotomic Katz p-adic L-function of λ. An analogue holds for a class of Rankin-Selberg p-adic L-functions. When λ is self-dual with the root number −1, we prove that the µ-invariant of the cyclotomic derivatives of Katz p-adic L-function of λ equals the µ-invariant of the cyclotomic derivatives of Katz p-adic L-function of λ. Based on previous works of authors and Hsieh, we consequently obtain a formula for the µ-invariant of these p-adic L-functions and derivatives, in most of the cases. We also prove a p-version of a conjecture of Gillard, namely the vanishing of the µ-invariant of Katz p-adic L-function of λ.