I'm testing LVM configurations for the purpose of building a home NAS with Ubuntu Server 16.04 LTS.
I first added three 20GB disks to my machine (sdb, sdc, sdd), created three physical volumes grouped in one volume group and finally created a RAID5 logical volume that spans across the three physical volumes. I used the following commands:

sudo pvcreate /dev/sdb /dev/sdc /dev/sdd
sudo vgcreate data /dev/sdb /dev/sdc /dev/sdd
sudo lvcreate --type raid5 --stripes 2 --size 15G --name test1 data

Then I added a fourth 20GB disk (sde), created a physical volume on it and added it to the data volume group:

sudo pvcreate /dev/sde
sudo vgextend data /dev/sde

How do I force the existing test1 logical volume to span across the four physical volumes and not only the first three?


Presumably this would do the trick:

sudo lvconvert --type raid5 --stripes 3 data/test1
  • Thanks for your answer. I get the following message when running the command: Using default stripesize 64.00 KiB. Converting the segment type for data/test1 from raid5 to raid5 is not yet supported. – Chris May 4 '17 at 16:07
  • I also tried with a recent version of LVM, same issue. I guess I will go for a mdadm RAID5 instead. – Chris May 5 '17 at 9:07
  • Yes, I hadn’t tried, but that “conversion” isn’t supported :-(. I get the impression you can only increase RAID levels but that’s just my first impression... It might be possible to switch to linear and back. – Stephen Kitt May 5 '17 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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