• 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

pvchange Command Examples in Linux

by admin

pvchange command changes allocation permissions on a physical volume. You might disallow new allocations if you’re making changes on other volumes and intend to delete one immediately thereafter. The UUID of PV can be re-generated with the command pvchange. For example:

# pvchange --uuid [pv-name]

Please make sure to deactivate the VG in question vgchange -an vg-name before changing the UUID. For this we need to unmount the LVs on the VG and logical volumes too will be deactivated. Once the UUID is changed, you could activate the VG with vgchange -ay vg-name.

pvchange Command Examples

1. To ignore or un-ignore metadata areas on this physical volume:

# pvchange --metadataignore 
# pvchange --metadataignore 

2. To enable or disable allocation of physical extents on this physical volume:

# pvchange -x y /dev/sda2
# pvchange --allocatable y /dev/sda2 

3. To generate new random UUID for specified physical volumes:

# pvchange -u /dev/sda2
# pvchange --uuid /dev/sda2 

4. To do the change for all the pvchanges:

# pvchange -a x y
# pvchange --all u 

For more information on pvchange command, refere to its man page:

# man vgchange

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to find which user run a specific command?
  2. CentOS / RHEL : DNS servers in /etc/resolv.conf change after a reboot/network service restart. How to make them permanent
  3. Beginners Guide to SELinux
  4. How To Add/Remove Locale Archive in CentOS/RHEL 5,6
  5. CentOS / RHEL 6 : How to change SNMP log level
  6. CentOS / RHEL : How to mount filesystems using UUID
  7. CentOS / RHEL : How to configure alias (virtual interface) of bond interface (bondx:y)
  8. How to Configure firewalld Logging in CentOS/RHEL 8
  9. Intel I219-LM Centos 6 network failed to start
  10. df Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright