• 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. gnome-calculator Command Examples in Linux
  2. pstree: command not found
  3. emerge Command Examples in Gentoo Linux
  4. chsh Command Examples in Linux
  5. How to Configure YUM to connect to Oracle Public Repository in Oracle Enterprise Linux
  6. zcat Command Examples in Linux
  7. What are DNS Nameserver Types in Linux
  8. How to troubleshoot NFS transfer latency issues using “nfsiostat” in CentOS / RHEL
  9. CentOS / RHEL 7 : How to reinstall GRUB2 from rescue mode
  10. How to Create a New /boot Partition in CentOS / RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright