Skip to content

mountpoints: OpenBSD: mount(8) -v for more options and disklabel(8) UID#92

Merged
corporate-gadfly merged 1 commit intoOpenVoxProject:mainfrom
klemensn:openbsd-mountpoints
Mar 12, 2026
Merged

mountpoints: OpenBSD: mount(8) -v for more options and disklabel(8) UID#92
corporate-gadfly merged 1 commit intoOpenVoxProject:mainfrom
klemensn:openbsd-mountpoints

Conversation

@klemensn
Copy link
Contributor

@klemensn klemensn commented Mar 1, 2026

  • mountpoints: OpenBSD: split around parentheses, use descriptive variables
  • mountpoints: OpenBSD: mount(8) -v for more options and disklabel(8) UID

Two easy improvements upon #84.

@klemensn
Copy link
Contributor Author

klemensn commented Mar 1, 2026

@buzzdeee FYI

@bastelfreak bastelfreak added the enhancement New feature or request label Mar 1, 2026
@corporate-gadfly
Copy link
Contributor

@klemensn To make tests pass, does it make sense to update the test to the following?

diff --git a/spec/facter/resolvers/openbsd/mountpoints_spec.rb b/spec/facter/resolvers/openbsd/mountpoints_spec.rb
index db223425e..d22079e0a 100644
--- a/spec/facter/resolvers/openbsd/mountpoints_spec.rb
+++ b/spec/facter/resolvers/openbsd/mountpoints_spec.rb
@@ -16,7 +16,7 @@ describe Facter::Resolvers::Openbsd::Mountpoints do
 
   before do
     allow(Facter::Core::Execution).to receive(:execute)
-      .with('mount', logger: an_instance_of(Facter::Log))
+      .with('mount -v', logger: an_instance_of(Facter::Log))
       .and_return(load_fixture('openbsd_filesystems').read)
     allow(Facter::Core::Execution).to receive(:execute)
       .with('df -P', logger: an_instance_of(Facter::Log))

@klemensn
Copy link
Contributor Author

@klemensn To make tests pass, does it make sense to update the test to the following?

Looks reasonable, I simply don't know (yet) how these tests work, hence why I haven't been able to fix them.

I can update the Pr in a few hours, but anyone from the project with permissions to do so here on GitHub is free to go ahead with that now.

@klemensn klemensn force-pushed the openbsd-mountpoints branch from c2698ae to c59c84d Compare March 10, 2026 19:01
@klemensn
Copy link
Contributor Author

@klemensn To make tests pass, does it make sense to update the test to the following?

That worked, thanks.

@corporate-gadfly
Copy link
Contributor

We usually prefer a single commit, so a rebase and squash would be wonderful @klemensn .

"Verbose mode" yields makes some options always appear, e.g.
`rw` rather than lack of `read-only` or informational timestamps,
as well as a disk's unique identifier, iff available.

Example `mount` and `facter mountpoints` output changes due to `-v`:
```
-/dev/sd1a on / type ffs (local, noatime)
+/dev/sd1a (2b22b08ec9273d80.a) on / type ffs (rw, local, ctime=Sat Feb 21 13:52:57 2026)
```
```
 {
   available => "663.01 MiB",
   available_bytes => 695216128,
   capacity => "27.91%",
   device => "/dev/sd1a",
+  duid => "2b22b08ec9273d80.a",
   filesystem => "ffs",
   options => [
+    "rw",
     "local",
     "noatime",
+    "ctime=Sun Mar  1 16:49:49 2026"
   ],
   size => "988.19 MiB",
   size_bytes => 1036187648,
   used => "275.77 MiB",
   used_bytes => 289163264
 }
```

With DUID not available, e.g. after remounting in certain ways:
```
-/dev/sd1a on / type ffs (local, noatime)
+/dev/sd1a on / type ffs (rw, local, noatime, ctime=Sun Mar  1 16:31:04 2026)
```
```
 {
   available => "663.01 MiB",
   available_bytes => 695216128,
   capacity => "27.91%",
   device => "/dev/sd1a",
   filesystem => "ffs",
   options => [
+    "rw",
     "local",
     "noatime",
+    "ctime=Sun Mar  1 16:49:49 2026"
   ],
   size => "988.19 MiB",
   size_bytes => 1036187648,
   used => "275.77 MiB",
   used_bytes => 289163264
 }
```

This makes it easier to:
- compare and ensure options
- manage fstab(5) using stable DUIDs
  (device numbers roam due to attach order, softraid(4)/vnd(4), etc.)
@klemensn klemensn force-pushed the openbsd-mountpoints branch from c59c84d to a64f6c7 Compare March 11, 2026 08:27
@corporate-gadfly corporate-gadfly merged commit 5de5947 into OpenVoxProject:main Mar 12, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants