Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


KVM: RAW or QCOW2?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

KVM: RAW or QCOW2?

I want to run a KVM node for personal use. I previously use logical volumes but now want to try other storage types. Which one out of these 2 is better? What are the other pros & cons?

Comments

  • MaouniqueMaounique Host Rep, Veteran

    For "thin provisioning" go with qcow2. It can be converted in many formats, if needed.
    It is a question of compatibility and convenience vs sheer power and stability, but imo, in this case, the gains with raw are far from compensating the losses in the other chapters, but to each their own.

    Thanked by 1vpslegend
  • MuZoMuZo Member

    Qcow2 has more features

    Thanked by 1vpslegend
  • @Maounique said:
    For "thin provisioning" go with qcow2. It can be converted in many formats, if needed.
    It is a question of compatibility and convenience vs sheer power and stability, but imo, in this case, the gains with raw are far from compensating the losses in the other chapters, but to each their own.

    Purpose is not thin provisioning but a combination of performance & stability.

  • Qcow2 for snapshot support (In proxmox at least, not sure about with KVM i've not tried snapshotting on my ubuntu KVM host yet.)

    Thanked by 1vpslegend
  • What's wrong with logical volumes? If it's for personal use I am not sure how much you'd benefit from the extra features, such as snapshotting, with Qcow2. Performance wise sticking to logical volumes would be your best choice.

    Thanked by 1vpslegend
  • smansman Member
    edited March 2015

    @dragon2611 said:
    Qcow2 for snapshot support (In proxmox at least, not sure about with KVM i've not tried snapshotting on my ubuntu KVM host yet.)

    I think you can snapshot with RAW as long as you are using LVM which you should be for KVM hosts. You may have to shut down the guest first with RAW though. Not 100% sure.

    Everything I have read says RAW is the best. That is what I use on top of LVM.

    Thanked by 1vpslegend
  • perennateperennate Member, Host Rep
    edited March 2015

    qcow2 has better snapshot support (with redirect-on-write and such), raw is of course just storing the bytes so doesn't have any special support at all. qcow2 performance is close to raw with the newer versions, and both are pretty much equally stable, but if you don't need the qcow2 features at all then I suppose you might as well go with raw (although lvm partition gives even better performance).

    sman said: I think you can snapshot with RAW as long as you are using LVM which you should be for KVM hosts. You may have to shut down the guest first with RAW though. Not 100% sure.

    Hm, raw image generally implies you would store the disk in a raw image file, qcow2 is an alternative file format that has some features which you can't have with just a raw file of disk bytes. If you use dedicated lvm partition for the VM, then the raw/qcow2 distinction is irrelevant.

    Thanked by 1vpslegend
  • pechspilzpechspilz Member
    edited March 2015

    @sman said:
    I think you can snapshot with RAW as long as you are using LVM which you should be for KVM hosts. You may have to shut down the guest first with RAW though. Not 100% sure.

    You just have to suspend the KVM VM for like a second, because that's how quick a LVM snapshot is. LVM + RAW is (r)awesome.

    Thanked by 1vpslegend
  • perennateperennate Member, Host Rep

    pechspilz said: You just have to suspend the KVM VM for like a second, because that's how quick a LVM snapshot is. LVM + RAW is (r)awesome.

    Online snapshots with qcow2 are possible too.

    Thanked by 1vpslegend
  • Online snapshots are very useful if you want to try something out or upgrade a piece of software and need to be able to rollback if it all goes horribly wrong.. It's usually a lot quicker to rollback a snapshot than to restore a full image backup.

    I used to use them when upgrading my zimbra VM (don't run it anymore)

  • XsltelXsltel Member, Host Rep

    hmmm, seems like snapshot feature is for lazy people from what I read. I mean why would I roll back a broken VPS. why not trying to fix the problem instead of rolling back you will increase your knowledge and earn more experince.

    @OP stick to LVM with native aio it offers a great I/O performance.

  • @XSLTel said:
    hmmm, seems like snapshot feature is for lazy people from what I read. I mean why would I roll back a broken VPS. why not trying to fix the problem instead of rolling back you will increase your knowledge and earn more experince.

    OP stick to LVM with native aio it offers a great I/O performance.

    Time constraints for one, using snapshots allows you to roll back the VM to a working state quickly.

    It's usually also possible to clone a machine from a snapshot which means you could create a copy of the broken state (if you snapshotted it before rolling back) giving you time to fix/find the root cause without having to rush to try and get the application back up and running.

    Thanked by 1Maounique
  • MaouniqueMaounique Host Rep, Veteran

    If the updates break, you are facing extensive downtime and probably inherit strange silent failures very hard to troubleshoot, for instance. Not to mention if you got hacked and need to be back online asap (back-up purposes).

    Thanked by 1netomx
  • XsltelXsltel Member, Host Rep

    still won't worth the I/O tradeoff. anyway if you know how to deal with LVM. you can use LVM built in snapshot feature.
    I've tried on one of running KVM and its actually works without the need to shutdown the VM .

Sign In or Register to comment.