Storage, gets cached in RAM instead of writing to disk

monkieking

New Member
Feb 10, 2016
2
0
1
34
Hello,

Let me start by saying that I'm pretty new to all of this:)

The problem:
I've added a disk to a VM running openmediavault and then shared a test folder using NFS.
When I'm adding something to the shared folder it gets cached to the RAM for the VM instead of actually writing it to the disk.

I can see the original contents on the disk in OMV but if I create a new file in proxmox on the disk, i.e. touch testfile, I cannot see it in OMV. The same goes if I create/add a file in OMV.

Am I missing some kind of setting to get this to work?

My configure for the disk below:
Code:
virtio0: /dev/disk/by-id/md-uuid-8dc1c44f:0ce6e1f3:f83efd32:7761571d,size=1953382464K

If you need any more information, please let me know. I'm sort of lost here:confused:

Hope anyone can help me.

Thanks,
Monkieking
 
does it flush to disk, if you launch "sync" command ?

maybe your storage have an agressive cache

I got it to write to the disk by adding this paramter to *.conf: cache=directsync.
The whole config for the disk is now:
Code:
virtio0: /dev/disk/by-id/md-uuid-8dc1c44f:0ce6e1f3:f83efd32:7761571d,cache=directsync,size=1953382464K

However, it still gets cached to the RAM and does not flush it by using the "sync" command. See attached.Screen Shot 2016-02-10 at 02.47.23.png

What might be causing this or/and how can I troubleshoot it?

Thank you!