• 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

CentOS / RHEL : Move a Physical Volume from an existing Volume Group to another Volume Group

by admin

This post describes how to move a Physical Volume from an existing Volume Group to another existing Volume Group. This facilitates the move of data in the PV to the new VG without doing any manual migration.

Before moving a PV, you should make sure that the Logical Volumes created on top of such PVs does not share physical extents with other PVs. You can find the extent and device of an LV using the command given below;

# lvdisplay -m

Steps involved

1. Unmount the directory .

# umount /data01

2. Deactivate the active LVs on the device.

# lvchange -a n /dev/data_vg/lv_data01

3. Split the VG to a new temp VG and rescan the PVs

# vgsplit data_vg tempvg PV
# pvscan

The pvscan command will list the available PVs and their VGs.

4. Merge the tempvg to the destination VG

# vgmerge dest_vg tempvg
# pvscan

5. After everything is listed correctly in the pvscan command, activate the LVs.

# lvscan
# lvchange -a n /dev/dest_vg/lv_data01

6. Mount the LVs correctly.

# mount -t [filesystem_type] /device /dir

Filed Under: Linux

Some more articles you might also be interested in …

  1. dkms Command Examples in Linux
  2. csv2tsv: Convert CSV (comma-separated) text to TSV (tab-separated) format
  3. route Command Examples in Linux
  4. jrnl Command Examples
  5. systemctl: command not found
  6. “git feature” Command Examples
  7. “go list” Command Examples
  8. Time to live exceeded ping error
  9. ctest: CMake test driver program
  10. deborphan Command Examples in Linux

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