[linux-lvm] LVM Cache Configuration issues

Marc Caubet mcaubet at pic.es
Mon Oct 19 13:06:02 UTC 2015


I am testing LVM Cache but I am completely concerned about obtained iozone
results which are worse than without using an SSD card, so my guess is that
I am doing something wrong.

We have a machine with 2 storage devices sda (LSI Controller 1:
RAID6(16+2)+RAID6(16+2)) & sdb (LSI Controller 2: RAID6(16+2)+RAID6(16+2)),
6TB Disks. Hence, we have a ~384TB (sda = 192TB + sdb = 192TB)

On the other hand, we purchased a 400GB SSD card, which is shown as
/dev/nvme0n1. I created 2 partitions 356.61 GiB and 16.00 GiB. I guess this
shouldn't be necessary but I created a 16GiB partition for cache metadata.

vgcreate dcvg_a /dev/sda /dev/sdb
lvcreate -i 2 -I8192 -n dcpool -l 100%PVS -v dcvg_a /dev/sda /dev/sdb
lvcreate -n cache0meta -l 100%PVS dcvg_a /dev/nvme0n1p1
lvcreate -n cache0 -l 100%PVS dcvg_a /dev/nvme0n1p2
lvconvert --type cache-pool --poolmetadata dcvg_a/cache0meta dcvg_a/cache0

I also tried with a single SSD partition:

vgcreate dcvg_a /dev/sda /dev/sdb
lvcreate -n dcpool -l 100%PVS dcvg_a
lvcreate --type cache -l 100%PVS -n cache0 dcvg_a/dcpool /dev/nvme0n1

So here are my questions:
- I guess both methods are the same, isn't it? The main difference is to
define or not a specific/custom partition for the pool metadata.
- Are they correct and which method is the recommended with 1 SSD? Is there
any "this is the best" recommended setup?
- Default mode is 'writethrough' which should be safer, but I do not see
any improvement of performance on reads and neither on writes (I used
iozone). Instead of this, performance becomes really bad. Why?
- I would like to set up 'writeback', but for a single SSD (so no RAID1 for
SSD) which are the risks? I can expect that current data being written will
be lost, but no data corruption can be found in the Origin LV, isn't it?
- writethrough / writeback caches can be hot-removed from the LVM? As I can
see, it seems so.
- Any suggestions?

Thanks a lot for your help,
Marc Caubet Serrabou
PIC (Port d'Informació Científica)
Campus UAB, Edificio D
E-08193 Bellaterra, Barcelona
Tel: +34 93 581 33 22
Fax: +34 93 581 41 10
Avis - Aviso - Legal Notice: http://www.ifae.es/legal.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20151019/d23e88c9/attachment.htm>

More information about the linux-lvm mailing list