# fstrim returns operation not supported

**URL:** <https://forums.suse.com/t/fstrim-returns-operation-not-supported/29402>\
**Category:** SLES Hardware\
**Created:** [February 22, 2017, 10:32pm UTC](https://forums.suse.com/t/fstrim-returns-operation-not-supported/29402 "2017-02-22T22:32:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreej1989](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sreej1989](https://forums.suse.com/u/sreej1989)\
**Post date:** [February 22, 2017, 10:32pm UTC](https://forums.suse.com/t/fstrim-returns-operation-not-supported/29402/1 "2017-02-22T22:32:19Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Automatic\_Reply](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Automatic\_Reply](https://forums.suse.com/u/Automatic_Reply)\
**Post date:** [February 27, 2017, 7:30am UTC](https://forums.suse.com/t/fstrim-returns-operation-not-supported/29402/2 "2017-02-27T07:30:44Z")

</div>

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](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](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](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](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](http://forums.suse.com)

---

<div class="post-metadata">

**Author:** ![KEVIN1](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@KEVIN1](https://forums.suse.com/u/KEVIN1)\
**Post date:** [March 9, 2017, 11:10pm UTC](https://forums.suse.com/t/fstrim-returns-operation-not-supported/29402/3 "2017-03-09T23:10:22Z")

</div>

> [@sreej1989;36703](#):
>
> 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:  
[LIST]  
[_][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)  
[/LIST]  
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.
