• 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

vgchange: command not found

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.

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

vgchange: 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

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 (determine 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. extundelete: command not found
  2. “Warning: Missing charsets in String to FontSet conversion” – how to resolve the xclock warning message
  3. How to add header and trailer line to a file in Linux
  4. CentOS / RHEL 6 : How to completely remove device mapper multipath (dm-multipath)
  5. How to use fdisk to partition a disk in Linux
  6. How to Disable Docker Process and docker0 Interface on CentOS/RHEL
  7. ctr: command not found
  8. How to configure resource groups for MySQL Server running on Linux
  9. treetime: command not found
  10. Oracle Database Environment Variables and Their Functions

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