From the course: Ubuntu Linux: Storage Management

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Migrating and replace a physical volume

Migrating and replace a physical volume

From the course: Ubuntu Linux: Storage Management

Start my 1-month free trial

Migrating and replace a physical volume

- [Instructor] Once we have a volume group with physical volumes in it, we can retire a disk and move it's data to a new one. To do that, we need to add a new drive and create a partition and a physical volume on it. We know how to do these things already. Then, we need to add it to the volume group, and we know how to do that too, but now instead of extending the logical volume to consume this new space, we need to tell LVM to move the data from our old drive somewhere else in the pool. For that, we can use the pvmove command. We have two options here. We can either tell pvmove to move all of the extents from the old physical volume to the new physical volume, or we can specify the old physical volume and LVM will just take care of moving extents off of the old physical volume, and figure out where to put them across the volume group. The pvmove command takes a very long time to move data between devices, and that's why I'm not going through it interactively here, and if you need to…

Contents