Thanks Ian and Dave for the comments.

CentOS seems to default to XFS these days but I’m not sure if there is any 
benefit in this case compared to ext4. Wouldn’t Linux do caching internally 
before committing to disk, even if KVM layer is always synchronous? I don’t 
know enough about Linux file systems, to know how they do journaling and 
metadata writes. I’m thinking a snapshot taken in the middle of a write would 
require fsck after starting up from the snapshot, but hopefully not an 
extensive one as all the journaling and sync writes would minimize the need.

I’m definitely testing LX zones at some point and hopefully moving to those if 
applications allow.

-Perttu

On 17 Jun 2015 at 13:20:38, David Finster ([email protected]) 
wrote:

Hi Perttu

We don’t run any Linux inside KVMs, but we do run a fair amount of Windows. In 
general, your right in that running ZFS inside a KVM isn’t going to get you any 
benefit and would probably be detrimental. It is worth noting that all writes 
from inside a KVM are considered synchronous anyway as far as the ‘zones’ pool 
is concerned. Any writes that your guest does will be immediately committed to 
some disk (hence the importance of an SLOG).

ZFS snapshots are consistent when created, but I guess there is the potential 
for some application inside the VM to have writes outstanding when a snapshot 
is taken (through queued IO?). If that were the case, then you would need some 
mechanism of notifying the application that it’s about to be snapped to be 
completely safe.

That being said, anything that uses a proper transaction log should be fine. 
I’ve done snapshots of SQL and Exchange servers and migrations/test emergency 
restores have been fine. Doing a snapshot of a live VM and then bringing it up 
on another host is similar to it experiencing a power failure, which is what 
the transaction logs are designed to handle. 

As Ian mentioned, you might also be better off giving LX zones a go - they are 
much friendlier to the host and no additional file systems are involved. 

- Dave

On 17 Jun 2015, at 8:00 PM, Perttu <[email protected]> wrote:

Hello SmartOS community, long time follower, first time poster here.

What do you guys think are best practices regarding file systems in KVM Linux 
guests?

Is it advisable to use ZFS inside guests? Wouldn’t it use double the memory for 
the same data?

Or would using something like XFS or ext4 be better and perhaps tuning them to 
be more synchronous if crash resiliency is wanted?

My main concern is data integrity if I snapshot and send the guest regularly to 
another host for disaster recovery. Performance is also important but I do have 
a slog device (S3700).

Cheers,
Perttu
smartos-discuss | Archives  | Modify Your Subscription          
smartos-discuss | Archives  | Modify Your Subscription  


-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to