Re: tunefs(8) changes don't stick

From: Kevin Oberman <rkoberman_at_gmail.com>
Date: Mon, 18 Oct 2021 22:43:32 UTC
On Mon, Oct 18, 2021 at 2:01 PM Kevin Oberman <rkoberman@gmail.com> wrote:

> On Mon, Oct 18, 2021 at 12:55 PM Graham Perrin <grahamperrin@gmail.com>
> wrote:
>
>> On 18/10/2021 20:30, Kevin Oberman wrote:
>>
>> …
>> > # tunefs -p /dev/nvd0p3
>> > 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
>>
>> …
>>
>> Probably an obvious question (sorry), are the changes made in single
>> user mode?
>>
>> If you attempt to enable soft update journaling, does it succeed (at the
>> time of the attempt)?
>>
> All changes are made in single-user mode. Other than foot-shooting mode, I
> don't think that you can do much with tunefs(8) unless it's read-only. I
> may not have mentioned this, but nvd0p3 is my root. Against better
> judgement, root, usr, and var are all on this partition. Also, though I
> would not think it relevant, it is EFI boot.
>
> The system is a slightly over one year old Lenovo L-15 (Intel) running
> 13-STABLE/13-n246941-20f96f21556. The SSD is an NVMe PCIe Gen3x4 M.2 512GB
> from Sabrent. It was added to the system three months ago. I thought I had
> TRIM enabled, but discovered it was not last week when I tried changing the
> volume label. Don't care much about the label, but I really want TRIM.
>
> I enabled SUJ. It failed until I deleted the old /.sujournal file left
> over from the initial install. It then succeeded. When I set the volume to
> rw, it was gone as was TRIM. No .sujournal was created.
> --
> Kevin Oberman, Part time kid herder and retired Network Engineer
> E-mail: rkoberman@gmail.com
> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
>
I suspect that this problem is Bug 113912
<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=113912>. While that bug
only references -L, I suspect that it applies to any tunefs(8) modification
to the root partition. While I suspect that enabling foot-shooting mode
might work around it, I think it's a serious issue.

The bug was originally submitted in 2007 and had never been touched since
other than a sweep of pre-2014 bug reports. At least documentation of the
bug should be done in the man page. With the default install to a single
partition, this could be biting a lot of people without being noticed.

I'll boot from my newest 13-RELEASE thumb drive and see if that works
around it. (My bet is "YES", dollars to donuts.)
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683