After some search I assume lvm2 restriping, as in take all extents of an active LV and redistribute them evenly across all current PVs in the VG, is not possible?
For example:
- 1 Volume Group with 6 Physical Volumes HDD-based and 1 Physical Volume SSD-based.
- A new LV is created exclusively on the SSD PV, using lvcreate options, to cope with high write IOPS.
- Later, IOPS decline and the LV hogs valuable SSD space, so it shall be moved to the 6 Physical Volumes, striped to keep up with medium write IOPS.
(having a mix of SSD and HDD in the same VG is basically a fun thing to do, because pvmove can move LVs online from SSD to HDD and back, but unfortunately it can't stripe while moving)
The offline case is straight forward: create a new striped LV across the HDDs, dd all content from old to new, rename, online again. But is there a way to do this online?
Closest thing I could come up with is write a bash script running pvmove to scatter the extents, but that wouldn't be the same (since extent size is a whopping 4 MiB opposed to typical stripe size of 64 KiB).
Since you clarified your setup I would once again have gone through the md-layer.
Optional: umount md-device, mount HD-LV instead.
But: md-raid1 mirroring is way faster than pvmove - and will lead to the new layout almost without service interruption.
I'm afraid your best approach would be to do a full dump of the LVs within the VG; destroy the VG; recreate the VG with the new striping parameters;recreate the LVs; restore the LVs from the dump.