0

I have an existing logical volume and I want to extend it with newly added physical volume (from separate disk) in the volume group. Before extending the logical volume, is it required to make filesystem for the physical volume or not?

I know the logical volume itself has a filesystem, but I don't exactly understand how the extending process works in practice.

1
  • Note that by using a LVM with two physical disks, the probability of a catastrophic data loss doubles. If one drive fails, you probably also loose most of the data on the second drive. [unix.stackexchange.com/questions/32452/… Feb 17, 2022 at 19:08

1 Answer 1

0

You have to add the physical volume to the correct volume group. If there is a filesystem present, this action will erase it, and I think this generates an error, IIRC.

Once the physical volume is in place, vgs (at an lvm prompt) will show the amount of space available. If it does show at this time, you can use lvextend to extend the logical volume.

Then you have to extend the filesystem. The command to do this depends on the filesystem.

And you should check the result for errors. fsck will work in most instances.

1
  • Thanks! Makes a lot more sense now.
    – LostHat
    Feb 17, 2022 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .