This question already has an answer here:

I have 3 drives currently set up in RAID 5 via mdadm. I just realized that I goofed and forgot to format them with LVM- is it possible to do this after RAID array creation without losing data?

marked as duplicate by Gilles, Romeo Ninov, Jeff Schaller, schily, Thomas Jul 1 '18 at 17:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Do you have a spare disk to hold the data temporarily while you add in the LVM layer? – roaima Jul 1 '18 at 7:40

If there is already data on the file system, then I don't see an easy way (except backup, do task, copy back).

With LVM and Raid there are two ways available: LVM built in raid, and LVM on top of mdadm. Both variants use the kernels device-mapper based raid features. Second variant offers more flexibility in some situations.

You can add your existing mdadm device as LVM physical volume, without having it to re-sync the raid. After finalizing the LVM logical vokumes and volume group configurations create the filesystem on the LVM volumes. The filesystem will have to be done newly when doing that changes.

  • If you add the mdadm device as an LVM physical volume, that will erase the data on it. You'd have to have copied the data first. You write “without having it to re-sync the raid”, which seems to imply that you'd have some kind of performance gain, but you won't. – Gilles Jul 1 '18 at 8:23
  • raid is done on block level, and the block level would not have to be touched. But the filesystem holding the actual data has to be re-done. There would not be any gain in performance, but raid setup can stay as it is. – hargut Jul 1 '18 at 10:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.