Linux VMS with virtio-scsi Driver are randomly crashing

adoII

Renowned Member
Jan 28, 2010
174
17
83
Hi,

I am using a Cluster with proxmox 3.4.9
The kernel on the proxmox hosts is 2.6.32-37-pve

I store the vm images in a ceph-hammer cluster

Recently I changed some Linux Machines to virtio-scsi driver from pure virtio driver so I can use the fstrim feature from time to time on the vms.

Now I notice the virtio-scsi vms are crashing randomly, maybe once in a week while the virtio vms are rock-solid and stable

In the crashed machines I can see nothing. The console is black and they are frozen. I also cannot reproduce the issue, not even under high load.

The vms with virtio are running 3.16.0-0.bpo.4-amd64 on debian wheezy. This kernel is needed for trim support

Any ideas what might go on or how I can debug that problem ?
 
What do you have to do so that proxmox ve provides a virtio-scsi device to the guest? I can only get my freebsd guests to see the virtio block devices not anything using the virtio scsi driver.
 
But you can restart them just fine?

http://ceph.com/docs/master/rbd/qemu-rbd/#enabling-discard-trim States that virtio isn't supported, outdated information?

All are running the wheezy 3.16 kernel? Have you tested it also on an newer kernel/dirstro?

Edit:
Look at the options tab of your VM, there is an "SCSI Controller Typ" option.

2015-08-27-090718_813x640_scrot.png
 
Last edited:
Nice. I set the disk to scsi0 and the scsi controller type in Options to virtio. FreeBSD picks it up as a scsi disk, and the "discard" feature works splendidly. The ZFS backing volumes have started to shrink, making very efficient usage of the disk resources. I'm running 4.0 beta, btw.

I'll see if I get any random crashes like adoII has seen and report back here. So far seems good while stress testing a large remote data copy.
 
Hi,


I am using a Cluster with proxmox 3.4.9
The kernel on the proxmox hosts is 2.6.32-37-pve


I store the vm images in a ceph-hammer cluster


Recently I changed some Linux Machines to virtio-scsi driver from pure virtio driver so I can use the fstrim feature from time to time on the vms.


Now I notice the virtio-scsi vms are crashing randomly, maybe once in a week while the virtio vms are rock-solid and stable


In the crashed machines I can see nothing. The console is black and they are frozen. I also cannot reproduce the issue, not even under high load.


The vms with virtio are running 3.16.0-0.bpo.4-amd64 on debian wheezy. This kernel is needed for trim support


Any ideas what might go on or how I can debug that problem ?


Are you sure that your ceph cluster is not overloaded when you do fstrim in guest ?


Please note, than fstrim in guest, is going to write zeroes in ceph cluster to reclaim space. So it can be write intensive.


They are a new option in ceph (but I think it's not yet in hammer)
https://github.com/xiaoxichen/ceph/commit/e7812b8416012141cf8faef577e7b27e1b29d5e3
+OPTION(rbd_skip_partial_discard, OPT_BOOL, false) // when trying to discard a range inside an object, set to true to skip zeroing the range.


to simply reclaim space on ceph cluster, without writing zeroes. (less secure but faster)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!