This is an old revision of the document!
sudo cryptsetup luksHeaderBackup /dev/mapper/vg_data2-lv_home --header-backup-file /path/to/backup/header.img sudo cryptsetup luksErase /dev/sdb1 sudo cryptsetup luksHeaderRestore /dev/sdb1 --header-backup-file /path/to/backup/header.img
Make sure that no users are accessing files on the active volumes in the volume group, then unmount the logical volumes. Use the -a n argument of the vgchange command to mark the volume group as inactive, which prevents any further activity on the volume group. Use the vgexport command to export the volume group. This prevents it from being accessed by the system from which you are removing it. After you export the volume group, the physical volume will show up as being in an exported volume group when you execute the pvscan command, as in the following example. [root@tng3-1]# pvscan
PV /dev/sda1 is in exported VG myvg [17.15 GB / 7.15 GB free] PV /dev/sdc1 is in exported VG myvg [17.15 GB / 15.15 GB free] PV /dev/sdd1 is in exported VG myvg [17.15 GB / 15.15 GB free] ...
Show more Copy to Clipboard When the system is next shut down, you can unplug the disks that constitute the volume group and connect them to the new system. When the disks are plugged into the new system, use the vgimport command to import the volume group, making it accessible to the new system. Activate the volume group with the -a y argument of the vgchange command. Mount the file system to make it available for use. Previous
https://askubuntu.com/questions/529843/move-raid-1-array-to-new-system/529845#answers-header