Convert Linux raid10 to raid1 PV

· 1 min read Bits & Bytes

To convert a Linux physical volume stored on a softraid with level 10 (a wrong 2 disk setup which accidently uses raid10) to a clean raid1 mirroring setup some simple LVM commands come to the rescue.

  1. Create second md device

  2. Create PV on second md device

  3. Add PV to existing volume group

  4. Move extends to the new PV

  5. Fail and remove devices from old md device

  6. Add device to new md device

  7. Finally rename md device

Renaming the mddevice (see also http://www.jross.org/recreation/computers/linux/rename-a-linux-md-device/).