Using lvm has multiple advantages especially since hard drives can be added, and pooled. But with hard drives aging, they need to be swapped out in order to guarantee proper availability.
Since with lvm, drives become irrelevant, this process is very easy.
First, create the physical volume:
[root@server ~]# pvcreate /dev/sdc1
Now, extend the volume group:
[root@server ~]# vgextend /dev/vg_backup /dev/sdc1
With the volume group extended, the physical extents can be moved:
[root@server ~]# pvmove /dev/sdb1 /dev/sdc1
This process can take a while depending on the drive speeds and sizes.
Once the physical extents are moved, remove the old drive from the volume group:
[root@server ~]# vgreduce /dev/vg_backup /dev/sdb1
The drives are now switched and the old drive can be removed from the system.
Feel free to comment and / or suggest a topic.
Comments
Post a Comment