PDA

View Full Version : SLES 12 SP2 fstrim returns operation not supported



sreej1989
22-Feb-2017, 21:32
A simple fstrim on a thin-provisioned drive is returning "Not Supported" error on my machine SLES12 SP2. The drive in question supports SCSI UNMAP requests but the kernel logs reveal that it is actually sending WRITE_SAME(16) instead. Is this configurable by any means? I tried XFS and ext3. A lot of online documentation states that it is supposed to send UNMAP request. I'm trying to trace the request to understand more but any help would be appreciated!

Logs when fstrim is invoked:

http://i.imgur.com/vdBIOpJ.png

Automatic Reply
27-Feb-2017, 06:30
sreej1989,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

These forums are peer-to-peer, best effort, volunteer run and that if your issue
is urgent or not getting a response, you might try one of the following options:

- Visit http://www.suse.com/support and search the knowledgebase and/or check all
the other support options available.
- Open a service request: https://www.suse.com/support
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.suse.com)

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.suse.com/faq.php

If this is a reply to a duplicate posting or otherwise posted in error, please
ignore and accept our apologies and rest assured we will issue a stern reprimand
to our posting bot..

Good luck!

Your SUSE Forums Team
http://forums.suse.com

KBOYLE
09-Mar-2017, 22:10
A simple fstrim on a thin-provisioned drive is returning "Not Supported" error on my machine SLES12 SP2. The drive in question supports SCSI UNMAP requests but the kernel logs reveal that it is actually sending WRITE_SAME(16) instead. Is this configurable by any means? I tried XFS and ext3. A lot of online documentation states that it is supposed to send UNMAP request. I'm trying to trace the request to understand more but any help would be appreciated!

I see that no one has provided a solution. I'm sorry I don't have one either but I have found some information that may help.

The man page says:

fstrim is used on a mounted filesystem to discard (or "trim") blocks which are not in use by the filesystem. This is useful for solid-state drives (SSDs) and thinly-provisioned storage.

You say:

A simple fstrim on a thin-provisioned drive is returning "Not Supported"
I suspect the manner in which blocks are trimmed may differ depending upon whether the object is an SSD or thinly-provisioned storage. Is sdb an SSD?

I found a few articles that may shed some light:

What is WRITE_SAME? Green Eggs and Ham! (http://blog.fosketts.net/2011/01/05/write_same-green-eggs-ham/)
Wikipedia: Trim (computing) (https://en.wikipedia.org/wiki/Trim_(computing))
Solid State Drives (https://wiki.archlinux.org/index.php/Solid_State_Drives)

How, or even whether TRIM is supported, depends on the drive, the interface, motherboard chipset, file system, and perhaps other factors.

I hope you find the answers you are looking for.