2018-05-09 11:25 GMT+02:00 Phil Regnauld <
regn...@gmail.com>:
> Ansgar Jazdzewski (a.jazdzewski) writes:
>>
>> not 100% shure but you bypass the kernel pagecache for the RBD volume
>> so you get rit of one potential caus and also can test if it will work
>> that way.
>>
>> remember to enable the rbd client cach in the ceph.conf
>
> Will check - will it help writes ?
>
> Also, how do you use CEPH ? With userspace access ? I saw there are
> some discussions about it not being fully implemented. Or does it work ?
> And if so, what is the proper way to enable it ?
all you basicaly have to do is:
gnt-cluster modify -D rbd:access=userspace
ceph.conf
...
[client]
rbd cache = true
rbd cache writethrough until flush = true
...
https://ceph.com/geen-categorie/ceph-validate-that-the-rbd-cache-is-active/
>
>> > Hmm, not quite sure that would help here.
>>
>> this was just me trying to say that i can add some options to ganeti
>> to adopt ganeti so it make use of kvm-setting you like to have added
>
> One that doesn't corrupt data :)
>
> Joke aside, I'll think about it - but I'm curious as to why caching
> methods other than "none" are disabled on shared storage (cf. mentions
> of risk of data loss during live migration).
i "patched" the pythoncode in our installation to allow cachmodes with
rbd - as fast as i know the most kvm-management systems use writeback
as default
diff --git a/lib/hypervisor/hv_kvm/__init__.py
b/lib/hypervisor/hv_kvm/__init__.py
index 8d8ad6f..3a615d7 100644
--- a/lib/hypervisor/hv_kvm/__init__.py
+++ b/lib/hypervisor/hv_kvm/__init__.py
@@ -914,9 +914,9 @@ class KVMHypervisor(hv_base.BaseHypervisor):
if cpus == constants.CPU_PINNING_OFF:
# we checked this at import time
# pylint: disable=E1101
- target_process.set_cpu_affinity(range(psutil.cpu_count()))
+ target_process.cpu_affinity(range(psutil.cpu_count()))
else:
- target_process.set_cpu_affinity(cpus)
+ target_process.cpu_affinity(cpus)
@classmethod
def _AssignCpuAffinity(cls, cpu_mask, process_id, thread_dict):
@@ -1123,14 +1123,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
# Cache mode
disk_cache = up_hvp[constants.HV_DISK_CACHE]
for cfdev, link_name, uri in kvm_disks:
- if cfdev.dev_type in constants.DTS_EXT_MIRROR:
- if disk_cache != "none":
- # TODO: make this a hard error, instead of a silent overwrite
- logging.warning("KVM: overriding disk_cache setting '%s' with 'none'"
- " to prevent shared storage corruption on migration",
- disk_cache)
- cache_val = ",cache=none"
- elif disk_cache != constants.HT_CACHE_DEFAULT:
+ if disk_cache != constants.HT_CACHE_DEFAULT:
cache_val = ",cache=%s" % disk_cache
else:
cache_val = ""
> Cheers,
> Phil
Have a nice one,
Ansgar