Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I read quite a lot of advice to switch from file-image VM storage, to partition/LVM volume based.

The claim is that partition/LVM are much faster then image files.

The downside in my opinion, is that one no longer have the whole VM in a single, easy to copy and migrate file.

Can anyone advice on this, especially if there indeed any difference in new versions of Xen, and if there are any IO benchmarks to support it?

Thanks!

share|improve this question
add comment

3 Answers

up vote 7 down vote accepted

Creating a block level access to virtual machine state, as opposed to a file level access will always be faster because there is a layer of abstraction removed.

I would recommend the LVM approach. Don't forget, you can always backup the LVM volume just like a file. There isn't much difference between the two. LVM is also quite flexible in terms of relocating the data.

Just because the abstract notion of a file doesn't exist anymore doesn't mean it is bad. The performance gains may be considerable, and with a little bit of broad thinking you can plumb your infrastructure just like it was a file.

I often make a partition for QEmu virtual machines. Then I can use dd to save and restore it. One file system (the virtual machines) running down to block level is better than a file in a filesystem with a filesystem atop.

Good luck

share|improve this answer
    
Thanks for the explanation :) –  SyRenity Jul 18 '09 at 18:59
add comment

I'll just add to all the answers above, by reminding you that LVM has a somewhat easy to use snapshot mechanism. This makes it pretty easy to backup or clone running VM's by simply making a snapshot, cloning or backing the VM up, and removing the snapshot. All without downtime.

share|improve this answer
    
+1 for snapshots. I think that functionality gets missed alot! –  Aiden Bell Jul 17 '09 at 19:39
add comment

There are a few (I came across maybe two of them) benchmarks of file image vs. LVM partitions on the net (it's not that hard to google them). Although somewhat dated, it would seem that LVM is usually faster (if by a tiny margin). That was enough for me, so I went with LVM schema. As far as the copying goes, you still can mount the LVM logical volume, targzip it and transfer it to another location. It's not that much harder. And LVM makes it much easier to expand your server storage.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.