• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

vgs Command Examples in Linux

by Deepika

vgs is a command-line utility that displays information about Logical Volume Manager (LVM) volume groups. LVM is a system that allows users to manage logical volumes, which are virtual storage devices created by combining multiple physical storage devices. Volume groups are collections of physical volumes that have been combined into a single logical volume for easier management.

With vgs, you can obtain a summary of information about all the volume groups on the system, including their size, number of physical volumes, and free space. You can also use vgs to obtain more detailed information about a specific volume group, such as the size and number of its logical volumes, the physical volumes that make up the group, and the status of each volume.

The output of vgs includes the following information:

  • VG Name: The name of the volume group.
  • VG UUID: The universally unique identifier (UUID) of the volume group.
  • PV Count: The number of physical volumes in the volume group.
  • LV Count: The number of logical volumes in the volume group.
  • SN Attr: The status of the volume group. For example, “w” indicates that the volume group is writable, while “r” indicates that it is read-only.
  • V Size: The size of the volume group.
  • V Free: The amount of free space in the volume group.

Some of the common use cases for vgs include:

  • Checking the status of volume groups: You can use vgs to check whether a volume group is active or inactive, and to see how much free space is available in the group.
  • Viewing detailed information about a volume group: You can use vgs to view the size and status of each logical volume in a volume group, as well as the physical volumes that make up the group.
  • Troubleshooting LVM issues: vgs can be used to diagnose LVM issues, such as when a logical volume is full or when a physical volume is failing.

vgs Command Examples

1. Display information about volume groups:

# vgs

2. Display all volume groups:

# vgs -a

3. Change default display to show more details:

# vgs -v

4. Display only specific fields:

# vgs -o field_name_1,field_name_2

5. Append field to default display:

# vgs -o +field_name

6. Suppress heading line:

# vgs --noheadings

7. Use separator to separate fields:

# vgs --separator =

Summary

vgchange is a powerful tool that should be used with caution. Before using it, make sure you have a good understanding of LVM and its concepts. You can find more information on vgchange and other LVM commands in the lvm2 man pages or online documentation.

Filed Under: Linux

Some more articles you might also be interested in …

  1. feedreader: command not found
  2. How to Automatically Run ntpdate When Starting NTPD in CentOS/RHEL 5
  3. pacman –files Command Examples
  4. checkupdates : Command Examples in Linux
  5. How to Remove/Delete All Packages from Channel(s) in SpaceWalk
  6. po4a-updatepo: command not found
  7. readelf: command not found
  8. ASMLib-Managed Disks on Multipathed iSCSI Targets are not Discovered after Server Reboot in CentOS/RHEL 7
  9. grub-mkconfig Command Examples in Linux
  10. amass – In-depth Attack Surface Mapping and Asset Discovery tool

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright