goneri / bsd-cloud-image.org

4 stars 1 forks source link

Trim disabled in FreeBSD 14.0 UFS #8

Closed oneumyvakin closed 2 months ago

oneumyvakin commented 3 months ago

Is it possible to enable trim on /dev/da0p4 on building image?

 tunefs -p /dev/da0p4
tunefs: POSIX.1e ACLs: (-a)                                disabled
tunefs: NFSv4 ACLs: (-N)                                   disabled
tunefs: MAC multilabel: (-l)                               disabled
tunefs: soft updates: (-n)                                 enabled
tunefs: soft update journaling: (-j)                       disabled
tunefs: gjournal: (-J)                                     disabled
tunefs: trim: (-t)                                         disabled
tunefs: maximum blocks per file in a cylinder group: (-e)  4096
tunefs: average file size: (-f)                            16384
tunefs: average number of files in a directory: (-s)       64
tunefs: minimum percentage of free space: (-m)             8%
tunefs: space to hold for metadata blocks: (-k)            4952
tunefs: optimization preference: (-o)                      time
tunefs: volume label: (-L)                                 FreeBSD

Unfortunately it's not possible to enable it in running VM:

# tunefs -t enable /dev/da0p4
tunefs: issue TRIM to the disk set
tunefs: /dev/da0p4: failed to open disk for writing
goneri commented 3 months ago

Sure, what would be the benefit? Saving space?

goneri commented 3 months ago

The script we use to build the image is located here: https://github.com/virt-lightning/freebsd-cloud-images, you can submit a patch

oneumyvakin commented 2 months ago

Thank you I forwarded the issue to https://github.com/virt-lightning/freebsd-cloud-images/issues/8