Re: newfs TRIM flag device support

From: Ordinary Bit <ordinarybit_at_proton.me>
Date: Fri, 16 Feb 2024 04:08:09 UTC
Hi!

On Friday, 16 February 2024 at 11:41, Mark Millard <marklmi@yahoo.com> wrote:

> [Only replying to lists I subscribe to.]
> 
> On Feb 15, 2024, at 19:19, Ordinary Bit ordinarybit@proton.me wrote:
> 
> > I'm reading the newfs manual https://man.freebsd.org/cgi/man.cgi?newfs(8) to be able to know about the TRIM flag. In the manual under -t parameter, it mentioned about "underlying device support", what exactly is this device?
> 
> 
> 2 contrasting examples:
> 
> 
> Example 0: Optane NVMe media (PCIe card or U.2, for example)
> 
> Optane has no need of TRIM and, so, never supports TRIM.
> 
> 
> Example 1: microsd card media usage
> 
> A microsd card in the normal type of microsd card slot on
> Small Board Computers (normally) supports TRIM. Take the
> same card and put it in a USB reader/writer and use it
> via USB on the same system: no TRIM is supported by
> FreeBSD over USB.
>

So you mean to say that if I have a Rasperry Pi 3 or 4 now and then have my FreeBSD installed in a microSD card (for example, SanDisk Extreme card) with UFS/FFS filesytem in it with TRIM enabled parameter then is it going to recognize it? How to verify?

> 
> FYI:
> 
> When the file system has TRIM enabled, FreeBSD put out a
> notice if TRIM will not actually be used in the actual
> context in use.
>

Ok, got it. How to check this as well?

BR,
orbit