pvcreate is a command in the LVM (Logical Volume Manager) context that is used to initialize a disk or partition and convert it into a physical volume (PV). This operation is a fundamental step in setting up an LVM storage configuration. The pvcreate command must be executed by the root user or a user with sudo privileges.
The basic syntax of the pvcreate command is pvcreate [OPTIONS] DEVICE_NAME.
Some commonly used options for the pvcreate command include:
# pvcreate -v /dev/sda1 /dev/sda2 ←# Convert partitions /dev/sda1 and /dev/sda2 into PVs |