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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

vgchange Command Examples in Linux

by Deepika

vgchange is a command-line utility for modifying the attributes of a Logical Volume Manager (LVM) volume group. 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 vgchange, you can activate or deactivate a volume group, change its access mode, or modify its physical volume attributes. Some of the common use cases for vgchange include:

  • Activating a volume group: When a volume group is activated, its logical volumes become available to the system. This is useful when you want to access the data stored on the logical volumes.
  • Deactivating a volume group: When a volume group is deactivated, its logical volumes become unavailable to the system. This is useful when you want to perform maintenance on the volume group or its physical volumes.
  • Changing the access mode: The access mode determines how many systems can access a volume group at the same time. You can set the access mode to read-only, which allows multiple systems to read data from the volume group but prevents any system from modifying the data. Alternatively, you can set the access mode to read-write, which allows multiple systems to read and modify the data.
  • Modifying physical volume attributes: You can use vgchange to change the attributes of the physical volumes in a volume group, such as their size or location.

vgchange Command Examples

1. Change the activation status of logical volumes in all volume groups:

# sudo vgchange --activate y|n

2. Change the activation status of logical volumes in the specified volume group (determined with `vgscan`):

# sudo vgchange --activate y|n volume_group}

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. goldeneye.py Command Examples in Linux
  2. startx Command Examples in Linux
  3. git cherry-pick: Apply the changes introduced by existing commits to the current branch
  4. gnomon Command Examples
  5. cotton: Markdown test specification runner
  6. fortune: Print a random quotation (fortune-cookie style)
  7. man Command Examples in Linux
  8. ctr: command not found
  9. Beginners Guide to User and Group Administration in Linux
  10. Linux OS Service ‘yppasswdd’

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright