I would like to list some cases where I feel files are better than LVMs for virtual machines and why.
I have seen numerous posts on this forum about the use of clustered filesystems (GFS, GFS2, OC2FS, etc.) either standalone or on top of DRBD. For all of them the answer is basically that LVM + DRBD is the "best" option. I fully understand the reasons (some of which are not technical) for this approach by the Proxmox team and do not disagree with many.
However, for many uses, LVM is vastly inferior to the use of files for VMs. Here are some significant reasons why
In summary, most of the issues have to deal with efficiency and time. LVM is very inefficient and slow in many regards.
I hope the Proxmox team will reconsider the idea of having at least one possible filesystem that you could put on top of DRBD instead of LVM. It would really open up some options with huge implications. I realize there are pros/cons to anything, but for many, a clustered (or at least a concurrent rw) filesystem on top of DRBD would be a vastly superior for speed of maintenance and flexible options. If there is already a filesystem that you can easily put on top of DRBD for shared node access on Proxmox 2, please let me know. Cheers!
I have seen numerous posts on this forum about the use of clustered filesystems (GFS, GFS2, OC2FS, etc.) either standalone or on top of DRBD. For all of them the answer is basically that LVM + DRBD is the "best" option. I fully understand the reasons (some of which are not technical) for this approach by the Proxmox team and do not disagree with many.
However, for many uses, LVM is vastly inferior to the use of files for VMs. Here are some significant reasons why
- No sparse files / holes! This is the absolute biggest issue with LVM. It is the base for most of the other issues I will list below (virtual disks are often 50% or less in use. LVM requires full allocation of the space. This doesn't seem too bad until you consider the items below)
- Every backup operation will spend most of its time on empty space. On larger KVMs, this can be HOURS multiplied by the number of machines. In some cases, it is the difference of being able to finish all backups in one night or not.
- Every restore operation will spend most of its time on wasted space. For disaster recovery, hours can be critical. Imagine a machine with only 8GB in use but you have to wait for 80GB to transfer. That's 10x too long!
- All this extra time copying empty disk space means twice the wear and tear on your disks. This means more cost replacing hardware, and more time wasted maintaining it, more heat, more electricity, etc..
- Flexibility to use other VM types without conversion and with only 1 operation instead of 2. An example would be using the VMWare conversion tool in one step to deposit a VMDK straight to the Proxmox where it can be mounted immediately, instead of going through a second lengthy operation. There are many cases where qemu-img or dd + registry patching simply do not succeed but third party tools that produce VMDK or other files do. Again, this flexibilty can be a life-saver and a time-saver (which is also a cost saver).
- Flexible backup options. With files you can simply sparse copy a .raw file (e.g. take an extra DRBD node offline temporarily like a "snapshot") and put it on a volume usable by proxmox (e.g. /var/lib/vz/dump). This has 2 huge benefits. 1) In a disaster, you can simply move the file to the proper "images" folder (which takes less than 1 second) and fire it up! 2) The backup can also be used to restore individual files by loop mounting the raw file directly. This is not possible with the Proxmox backups because they are in a .tar and can require hours to restore for larger disks, not seconds. Having to untar also means you need ~2x the space.
- Complexity. Let's be honest....LVM groups, volumes, extents, etc. can be every bit as complicated to deal with as a filesystem.
- LVM snapshots are known to be slow. This only adds to all the problems relating to sparsity.
In summary, most of the issues have to deal with efficiency and time. LVM is very inefficient and slow in many regards.
I hope the Proxmox team will reconsider the idea of having at least one possible filesystem that you could put on top of DRBD instead of LVM. It would really open up some options with huge implications. I realize there are pros/cons to anything, but for many, a clustered (or at least a concurrent rw) filesystem on top of DRBD would be a vastly superior for speed of maintenance and flexible options. If there is already a filesystem that you can easily put on top of DRBD for shared node access on Proxmox 2, please let me know. Cheers!