Forum Stats

  • 3,814,644 Users
  • 2,258,895 Discussions
  • 7,892,792 Comments

Discussions

Oracle VM support TRIM and UNMAP SCSI commands

spavlikov
spavlikov Member Posts: 8 Blue Ribbon
edited Aug 3, 2017 9:58AM in Oracle VM

Hello,

does Oracle VM support TRIM and UNMAP SCSI commands?

Answers

  • user1764887
    user1764887 Member Posts: 5 Red Ribbon
    edited Aug 3, 2017 9:58AM

    UPDATE: I've been successfully able to perform fstrim -v inside the vm server on a btrfs filesystem. will test if it works on other fs that are supposed to support discard, like ext4 (update: it works on ext4 too).

    what I did was to kpartx -av the img file, mount the dev mapper loopNpM partition, fstrim the fs (all from inside vm server)

    i hope it's more than obvious you must do this with the corresponding vm powered off or with the disk detached (xm block-detach)

    ________________

    even if it would, I believe it would be unsupported.

    they mention creating sparse virtual disks (start with zero size and grow) but there is nothing in the documentation about shrinking or compacting or discard.

    "lsblk -D" inside a linux vm shows the discard feature is not available.

    besides, latest ovm 3.4.3 ships with EOL xen version 4.4 (also not even receiving security updates) which is quite a bit behind latest xen stable release (4.9)

    what I did observe though is that when you power on a vm, it maps it's virtual disk raw img file to a loop device. when you "lsblk -D" that loop device inside the vm server, it shows discard available. after mounting that loop locally on vm server and attempting to fstrim whatever fs is inside, fstrim fails with an error message.

    there's another question here that has the same answer, it is unavailable. Oracle VM Server and Manager How to shrinking the disk!

    maybe a major next release will come based on a much newer xen release, but until then if you need to start _now_ in production with shrinking/discard/scsi_unmap/trim capabilities, oracle vm server is not the answer.

  • Daniel Dorado - Oracle
    Daniel Dorado - Oracle Member Posts: 3 Employee

    Is scsi unmap/fstrim supported in Oracle Linux Virtualization Manager (OLVM) ?