Assuming the new disk is /dev/sdb
, the following is the approach. Make sure you fully understand each of these commands before doing anything:
Create a new physical volume with the disk:
pvcreate /dev/sdb
Add the volume to your volume group:
vgextend <vg> /dev/sdb
Move anything from the 8GB disk to the 20GB (assuming it is /dev/sda
)
pvmove /dev/sda /dev/sdb
Remove the 8GB from the volume group:
vgreduce <vg> /dev/sda
Stop /dev/sda being a lvm physical volume:
pvremove /dev/sda
Then you can take it out of the box...
Use the pvdisplay -m
commands to confirm what is on each disk:
pvdisplay -m /dev/sda
pvdisplay -m /dev/sdb
You want to be certain nothing is left on the disk you remove.