lvmpersist
manages SCSI persistent reservations on block devices used as LVM physical
TLDR
Start PR on all PVs in a VG with a local key (exclusive access by default)
SYNOPSIS
lvmpersist command [options]
DESCRIPTION
lvmpersist manages SCSI persistent reservations (PR) on block devices used as LVM physical volumes. Persistent reservations prevent multiple hosts from simultaneously accessing shared storage, protecting against data corruption in clustered or failover configurations.
The tool can establish exclusive reservations (one host owns access) or shared reservations (multiple hosts coordinate access). Keys identify each host, and reservations can be preempted if a host fails or needs to be forcibly removed.
Common use cases include SAN-based clusters, high-availability failover pairs, and shared storage environments where fencing is required.
PARAMETERS
start
Register a key and create a persistent reservationstop
Release reservation and unregister the keyremove
Remove another host's key from devicesread
Display registered keys and current reservations--ourkey _key_
The local host's reservation key (hexadecimal)--removekey _key_
Another host's key to preempt or remove--vg _vg_name_
Operate on all physical volumes in the specified volume group--device _device_
Operate on a specific device (can be repeated)--access _type_
Reservation type: ex (exclusive) or sh (shared)
CAVEATS
Requires SCSI devices that support persistent reservations (SCSI-3 PR). Not all storage arrays implement PR identically; test in your environment. Improper use can cause data loss in shared storage environments. Requires root privileges.
SEE ALSO
lvm(8), sg_persist(8), vgchange(8), lvmlockd(8)
