[pve-devel] Fwd: Re: recommanded cache setting for rbd image

Alexandre DERUMIER aderumier at odiso.com
Tue Nov 6 08:39:02 CET 2012


Yes, it's safe, in the meaning of "you can break your filesystem".

But you can loose last x seconds of writes if case of powerfailure.

also, you need a linux kernel > 2.6.37, or barrier=1 in your fstab for kernel < 2.6.37

and for windows, you really need lasts virtio driver, which can handle writeback correctly.


(Note that cache=none is the same behaviour, you don't have cache on your host, but you always have cache on your disks).

If you really don't want to loose any write, go to cache=directsync or cache=writethrough, a fsync is done for each write. (so you are sure that all caches (host,disk,raid controller) are flushed for each write)




----- Mail original ----- 

De: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag> 
À: pve-devel at pve.proxmox.com 
Envoyé: Mardi 6 Novembre 2012 08:33:53 
Objet: [pve-devel] Fwd: Re: recommanded cache setting for rbd image 

Hello list, 

inktank recommands using writeback mode for rbd by default. As it is 
safe like a normal harddisk with it's cache. 

What do you think? 

Greets 
Stefan 


> Hello list, 
> 
> right now i'm testing rbd block devices with kvm using Default cache (no 
> cache). 
> 
> Is there any recommanded value for RBD? (i don't wanna loose data) 

It acts like a well-behaved disk cache (i.e. it respects 
flushes/barriers from the guest), so it's no more likely to cause data 
loss than a local hard disk in the event of an unexpected shutdown. 

I recommend running it in writeback mode (the default when rbd cache = 
true). The best cache size will depend on your workload and hardware. 

_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list