Running a lvm command and you encounter the message File-based locking initialisation failed means that the filesystem is read-only
root@linux:~ # pvs
File-based locking initialisation failed
The directory /var/lock/lvm must be writable. So you have a /var or / filesystem read-only.
You can try to remount it as read-write or reboot the server
mount -o remount,rw /
reboot -d -n -f