Shared LVM as an alternative to ceph

Dec 18, 2024
127
86
28
Saxony, Germany
www.ellerhold.de
We just got quoted a 3x increase in VMware license costs and Im tasked to find alternatives (fast). Weve already got 3 PVE clusters with ceph in production so we know this part relativly well.

Im trying to explore a third alternative: reusing our existing servers and 3-tier-storage architecture. Shared (thick) LVM was proposed. We started with PVE in the 8.x times, snapshots werent a thing back then. And no thin provisioning (or so we thought) for shared LVM storages.

PVE 9.3 now has Snapshots as volume chains in production for thick LVM storage types. It uses qcow2 instead of raw for the vDisks. qcow2 is roughly slower (in terms of IOPS) compared to a raw LV on LVM - especially if snapshots are actually used.
Thin provision can be enabled on our (SAS) storages. The cheap ones dont detect zeros realiably but a TRIM works to keep the physical space needs down. Now Im asking if this is viable as a stop-gap solution to the exorbitant broadcom pricing or even a long-term solution.
  • Advantages over ceph 3/2 replication:
    • A raid 6 pool needs less disk than a 3/2 ceph replicated pool -> less hardware intensive
    • no network latency in the write path -> higher IOPS
    • fast rollout because the HW is already bought
    • LVM can be done with 2 nodes + qdevice, ceph needs 3 nodes minimum
  • Roughly the same
    • Both have HA
    • Both have Snapshots (LVM via qcow2 volume chains)
    • Both have thin provisioning (LVM via the capabilities of the storage)
  • Disadvantages
    • Dual Controller external storage is less resilient that a 3/2 replicated pool
    • Cant monitor the fill ratio of the storage in PVE, have to go to the storage controller itself.
    • Space reclamation only works reliably with UNMAP / TRIM. "Just deleting a LV" leaves the space occupied in the storage raid. New data will use up these blocks, but monitoring is wrong until it is fully used.
Did I miss anything?
 
Last edited:
fourth alternative, make the application itself HA, not the VMs.
Use PVE-zsync for maintenance.
In principle a good idea (I also prefer application-level HA) but I'm not sure whether this would work for OPs usecase.
First I might be wrong but AFIK you can't use SANs as shared storage together with zfs (which is needed for pve-zsync and storage replication).
Second if you use local storage your expensive storage hardware will just collecting dust.

Unfortunely I'm not sure whether I understood OP correctly whether they use a SAN or a storage controller inside their servers. If they have a storage controller inside their servers then zfs would be a viable alternative with the usual caveats (asynchronous synchronization thus minimal dataloss in case of errors, you need to be careful with HW raid etc pp).

So it all boils down to following question @EllerholdAG Do you need to reuse existing dedicated shared storage hardware like a FC-attached SAN? Or are we talking about ssds/hdds already intalled inside the server together with SAS-RAID-Controllers? If we are talking about HW-Raid-Controllers there are additional things to consider (are you using the battery cache at the moment? Can the controllers be configured/flashed to HBA mode? Are you using HDDs or SSDs).

  • Cant monitor the fill ratio of the storage in PVE, have to go to the storage controller itself.

Is this really a problem? I would expect that you will use a regular monitoring tool (like Zabbix, Prometheus or some nagios (icinga,checkmk) variant) to monitor anything. Then it should be trivial to use your monitoring tool for this if your storage hardware provides an interface for collecting the data (e.G. snmp or nrpe). If you use LVMs together with HW RAID controllers following plugins might be useful for the nagios ecosystem or prometheus:
https://exchange.nagios.org/directo...1-RGxBPNxBScZpPuvA2xMlAV04966HBteW9QG_YAwlklA
https://github.com/hansmi/prometheus-lvm-exporter

Most likely it will also be possible to do something similiar for Zabbix although my google-foo wasn't good enough for a "ready-to-use" solution ;)
 
Application-level HA would be a dream but sadly this is not possible.

Weve got some SAS and some FC storage and simple external HBAs in our servers. ZFS is out, shared LVM is our only option. Dual Controller storages remove the SPOF hurdle.

We did some tests today: our cheap Infortrend ESDS can do thin provisioning, but it is writing zeros as actually zeros to disk. This means each snapshot reserves 100% of the disk size as physical space. And you need to trim after each migration. The better storages (like DELL ME4024 / ME4012) detected zeros and wont write them to disk. This is much better!

Monitoring is a problem: the Infortrend does not report the actual used storage via SNMP. Youd have to use the CLI tool with the admin credentials for that. Were in the process of figuring out on how to detect that properly...
 
  • Like
Reactions: SBMe and Johannes S
no network latency in the write path -> higher IOPS
This isnt true. at BEST if offers near similar performance, but on a busy hypervisor cluster ceph would wipe the floor with one parity RAID lun. remember, you only have a single IO queue per subrank.

Both have HA
True but misleading. ceph has HA at the host failure domain. a raid volume doesnt- its top failure domain is disk. in other words, ceph can lose an ENTIRE osd server and keep ticking. A RAID lun is a spof. This can be mitigated to an extent with a dual controller storage solution but if you already have one of those the discussion is probably moot unless you already decided to replace it. On that note, are you actually considering ceph? if not, the discussion should probably be whether you use LVM Thick or try one of the lvm thin solutions that are being developed.

Lastly- be careful thin provisioning on the storage. If guest trim directives arent respected you can overrun your storage.
 
Last edited:
On the space-reclamation point: 9.3 added Discard Removed Volumes (on-volume-remove discard=1). It sends a discard for the LV before the volume is removed, so a thin LUN can get the space back. PVE refuses the option if a backing device of the VG doesn't support discard, which is a quick way to see which of your arrays pass discard through.

A few volume-chain details that are easy to miss:

- The option is enabled per storage (Allow Snapshots as Volume-Chain) and only applies to newly created volumes, so switch it on before you import the VMware disks.
- Once the storage holds a qcow2 volume you can't turn it off. I'd try it on a separate test storage first.
- Each snapshot appears as the full volume size on the PVE side. Actual use on the array is smaller only if the array supports thin provisioning and discard.

After growing an iSCSI LUN, 9.3 no longer does a full rescan automatically. Run iscsiadm -m session --rescan on each node, same as for FC.

I wrote this up from the release notes and storage docs here: https://ngnext.tech/knowledge/proxmox-ve-9-3-san-snapshots-upgrade-checklist (my own write-up; I haven't run 9.3 on a SAN myself).