Hello,
i have problems with trim on debian 11 guest VM , i used windows server as guest on different VM and its was working for it
i used virtio-scsi and ssd emulation on/off, discard on
underlying storage is NVME drive
pveversion
pve-manager/7.2-4/ca9d43cc (running kernel: 5.15.35-1-pve)
on host:
on guest:
dmesg:
mount on guest
i have problems with trim on debian 11 guest VM , i used windows server as guest on different VM and its was working for it
i used virtio-scsi and ssd emulation on/off, discard on
underlying storage is NVME drive
pveversion
pve-manager/7.2-4/ca9d43cc (running kernel: 5.15.35-1-pve)
Code:
cat 105.conf
agent: 1
boot: order=scsi0;net0
cores: 1
cpu: host
machine: q35
memory: 8192
meta: creation-qemu=6.1.1,ctime=1645484114
name: debian
net0: virtio=CE:4E:D8:4B:55:74,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-105-disk-0,discard=on,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=cbe727c0-419b-4187-93eb-3bd85db3808e
sockets: 1
vmgenid: 142716d5-c991-4322-8bbc-cf5b1fb7e7c6
on host:
Code:
fstrim -av
/boot/efi: 510.5 MiB (535343104 bytes) trimmed on /dev/nvme0n1p2
/: 6.9 GiB (7370207232 bytes) trimmed on /dev/mapper/pve-root
on guest:
Code:
fstrim -av
fstrim: /tmp: the discard operation is not supported
fstrim: /var: the discard operation is not supported
fstrim: /home: the discard operation is not supported
fstrim: /: the discard operation is not supported
Code:
46.128854] sd 0:0:0:0: [sda] tag#64 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 46.128856] sd 0:0:0:0: [sda] tag#64 Sense Key : Illegal Request [current]
[ 46.128857] sd 0:0:0:0: [sda] tag#64 Add. Sense: Invalid field in cdb
[ 46.128858] sd 0:0:0:0: [sda] tag#64 CDB: Unmap/Read sub-channel 42 00 00 00 00 00 00 00 18 00
[ 46.128864] blk_update_request: critical target error, dev sda, sector 20343292 op 0x3:(DISCARD) flags 0x0 phys_seg 1 prio class 0
mount on guest
Code:
mount |grep sda
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/sda8 on /home type ext4 (rw,relatime)
/dev/sda5 on /var type ext4 (rw,relatime)
/dev/sda7 on /tmp type ext4 (rw,relatime)
Last edited: