How to transfer data from a conventional standard partition to an LVM-based partition on a non-root filesystem?

Hello all,

Is it feasible to convert a non-LVM partition into an LVM-managed volume while preserving all existing data and avoiding any interruption to running services?

The filesystem is currently residing on a conventional standard partition that does not support resizing, making it necessary to migrate it over to an LVM-managed volume for greater flexibility.

Thanks, Julia :folded_hands:

Hello,

Before proceeding, ensure that a full backup of all data has been taken and that these steps have been tested on a non-production test system first.

There is no direct or risk-free method to convert a standard partition to LVM in place. The recommended approach is to manually migrate the data by following the steps below:

Create a new Logical Volume (LV) and format it with the appropriate filesystem. Refer to the AlmaLinux / CentOS documentation on creating LVM volumes for guidance. The size of the new LV must be equal to or larger than the existing filesystem.

Create a temporary mount point and mount the newly created LV to it.

Take a complete backup of the existing filesystem using a suitable utility such as cp, rsync, dd, dump, or any other preferred backup tool.

Restore the backed-up data onto the newly created LV.

Update the /etc/fstab file to reflect the new LVM volume and ensure it mounts automatically at the correct mount point on the next reboot.

Cheers, Jenn :star: