pvs: command not found

Pvs is a command-line utility that is used to display detailed information about physical volumes in LVM. It shows the size, number of allocated and free extents, and other information about each physical volume in the system. It can also display information about the volume groups and logical volumes associated with each physical volume.

LVM is a system that allows you to manage disk space more flexibly than traditional disk partitioning methods. LVM works by dividing the physical storage devices into physical volumes, which can be combined into volume groups, and then divided into logical volumes. Logical volumes can then be mounted as if they were physical partitions, allowing you to manage disk space and file systems more easily.

Using pvs, you can easily see how your physical volumes are being used and identify any issues or potential problems. For example, if you’re running low on disk space on a particular physical volume, pvs can help you identify which logical volumes are consuming the most space, so you can take action to free up disk space or add additional storage.

In addition to pvs, LVM also includes other command-line utilities such as vgdisplay and lvdisplay, which provide additional information about volume groups and logical volumes, respectively. These tools can be used in conjunction with pvs to gain a complete understanding of how LVM is managing disk space on your system.

If you encounter the below error while running the command pvs:

pvs: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install lvm2
Ubuntu apt-get install lvm2
Alpine apk add lvm2
Arch Linux pacman -S lvm2
Kali Linux apt-get install lvm2
CentOS yum install lvm2
Fedora dnf install lvm2
Raspbian apt-get install lvm2

pvs Command Examples

1. Display information about physical volumes:

# pvs

2. Display non-physical volumes:

# pvs -a

3. Change default display to show more details:

# pvs -v

4. Display only specific fields:

# pvs -o field_name_1,field_name_2

5. Append field to default display:

# pvs -o +field_name

6. Suppress heading line:

# pvs --noheadings

7. Use separator to separate fields:

# pvs --separator special_character

Summary

Overall, pvs is a valuable tool for managing physical volumes in LVM on Linux systems. Its ability to display detailed information about disk usage and potential issues makes it an essential tool for system administrators and anyone else responsible for managing disk space on a Linux system.

Related Post