Discussion:
[linux-lvm] Thin provisioned LV + raid5?
Vasil Valchev
2014-01-25 21:26:43 UTC
Permalink
Hello,

I want to create a thin pool that will be used for storing virtual machines
(inside separate thin volumes).
The thing is I can't find if that thin pool can be at the same time --type
raid5 (or similar) at the same time?

Would something like this be possible:

lvcreate -T virtvg/virtpool -L 500G --type raid5

Or maybe the whole approach is wrong?
What I want to do in the end is a thin pool/volumes that are replicated in
some way - ideally raid5, if not - mirrored.

Is this implemented and supported in LVM, or is hardware raid recommended
to handle the redundancy in thin provisioned storage?


Regards,
Vasil
Marian Csontos
2014-01-27 08:51:20 UTC
Permalink
Post by Vasil Valchev
Hello,
I want to create a thin pool that will be used for storing virtual machines
(inside separate thin volumes).
The thing is I can't find if that thin pool can be at the same time --type
raid5 (or similar) at the same time?
lvcreate -T virtvg/virtpool -L 500G --type raid5
Or maybe the whole approach is wrong?
What I want to do in the end is a thin pool/volumes that are replicated in
some way - ideally raid5, if not - mirrored.
Is this implemented and supported in LVM, or is hardware raid recommended
to handle the redundancy in thin provisioned storage?
Hi Vasil, you have to first create the RAID5 volume first and then
convert to pool using lvconvert.

Also if you want redundancy for data, you will likely want redundancy
for metadata as well. RAID1 is recommended.

lvcreate -n meta --type raid1 -m 1 -L 256M virtvg
# ^ adjust number of legs (-m N)
# ^ you may want to adjust size of metadata volume, depends if you plan
to further grow your pool in close future as metadata resize is still
not fully working, but will soon. If my math is correct 256M should be
enough for up to 2TB - see --poolmetadatasize.

lvcreate -n virtpool --type raid5 -i 3 -L 500G virtvg
# ^ adjust number of stripes (-i N)

lvconvert --thinpool vg/virtpool -c 64k --poolmetadata meta
# ^ adjust chunksize - if you want snapshots use smaller chunks, if you
want to use only thin-provisioning use larger chunks. if both you have
to compromise. Too small chunks may affect performance if you have many
VMs issueing many concurrent writes.

-- Marian
Post by Vasil Valchev
Regards,
Vasil
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Loading...