Date: Fri, 3 Sep 2021 13:09:29 -0400 From: "Derek (freebsd lists)" <482254ac@razorfever.net> To: freebsd-questions@freebsd.org Subject: Re: FreeBSD 12.2-RELEASE-p9 trim: open failed: /dev/ada0: Operation not permitted Message-ID: <47d0f250-a47c-bbe0-2875-4f42f4464fcc@chezmarcotte.ca> In-Reply-To: <dda0a570-53bc-7676-9f38-67bcd7a6f8bb@holgerdanske.com> References: <dda0a570-53bc-7676-9f38-67bcd7a6f8bb@holgerdanske.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-08-29 10:26 p.m., David Christensen wrote: > I would like to trim the SSD, but trim(8) is not happy: > > 2021-08-29 19:22:36 toor@f1 ~ > # trim -f /dev/ada0 > trim /dev/ada0 offset 0 length 60022480896 > trim: open failed: /dev/ada0: Operation not permitted > I don't know if it's still relevant to the thread, but I feel like what you are encountering here relates to what you are trying to trim. It feels like if you trim the "raw device", the system wouldn't know what is in use, and what isn't. I feel like you should be trying to trim a filesystem on the device, rather than the device itself, as the utility would be able to determine what is currently allocated with the filesystem data. It might be that a raw device could be trimmed, but perhaps there's some safety there to stop it from wiping a device that is backing a mounted filesystem. Something to look at? Derek
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47d0f250-a47c-bbe0-2875-4f42f4464fcc>