Page MenuHomeFreeBSD

Add -media autofs map.
AbandonedPublic

Authored by trasz on Nov 22 2014, 5:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 5:48 AM
Unknown Object (File)
Thu, Nov 21, 5:47 AM
Unknown Object (File)
Wed, Nov 6, 6:44 PM
Unknown Object (File)
Fri, Nov 1, 11:34 AM
Unknown Object (File)
Oct 15 2024, 10:02 PM
Unknown Object (File)
Sep 30 2024, 11:32 PM
Unknown Object (File)
Sep 27 2024, 12:07 AM
Unknown Object (File)
Sep 23 2024, 9:50 AM
Subscribers

Details

Reviewers
emaste
Group Reviewers
Doc Committers
Summary

This adds -media autofs map. It's supposed to be used with removable
media. Note that there is a known deficiency in that it never removes
obsolete nodes; it will be addressed later.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

trasz retitled this revision from to Add -media autofs map..
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)
wblock added inline comments.
usr.sbin/autofs/auto_master.5
215–216

This and the next two notes reword the entries in this list to avoid the passive and repeated "This map" and nonspecific "It".

Query the remote NFS server and map exported volumes, which are traditionally mounted on
.Pa /net .
Files on a remote NFS server are typically accessed through the
.Pa /net/nfs-server-ip/share-name/
directory without needing any additional configuration.

225

.It Li -media
Query devices that are not yet mounted, but contain valid filesystems.
Generally used for access to files on removable media.

226

Prevent
.Xr automountd 8
from mounting anything on the mountpoint.

usr.sbin/autofs/auto_master.5
215–216

Hm, but it's not the volumes that are mounted on /net, it's the map - volumes are somewhere underneath it. What do you think about the updated patch?

usr.sbin/autofs/auto_master.5
220

Phabricator might not be showing the actual diff, so bear with me. I see

This map is traditionally mounted on
.Pa /net ,

Does "traditionally" mean "by default", or "what most people do"? I suspect it is the first, so this can be split out of the too-long following sentence:

By default, this map is mounted on
.Pa /net .
Access to files on a remote NFS server is provided through the
.Pa /net/nfs-server-ip/share-name/
directory without any additional configuration.

nfs-server-ip and share-name need markup to show they are not literal, although I have not yet found out what to use.

etc/auto_master
6–8

It's not commented in the version in this review though?

etc/autofs/special_media
17

Ugh. I'd make the comment a bit stronger with an XXX as you did below - e.g.

XXX this should use kern.geom.conftxt, but it lacks access counts.

Looking for hexagon in the dot output makes me feel really icky.

That said, you could simplify slightly with

sysctl ... | sed -n 's/^.*hexagon,label=/../p'

i.e. -n and /p modifier

35

can you expand on the comment

usr.sbin/autofs/auto_master.5
220

"Traditionally" here means "what our ancestors used to do". It's not mounted anywhere by default - it's commented out - but by removing a single "#" you can mount it where it used to be on Solaris and most other UNIX systems. And OS X.

Rewrite to use fstyp(8).

etc/auto_master
7

Double "the".

The doc changes look good to me. I still would prefer that nfs-server-ip and share-name are shown as non-literal values. The only way I know to do that would be rewriting that section to split up the path as shown below. Is it worth that? I'm not sure.

Access to files on a remote NFS server is provided through the
.Pa /net
directory.
Inside that directory are subdirectories for each NFS server IP address (WB: or host name?)
and the exported directories.
For example, files in the
.Pa artwork
directory on the NFS server at 192.168.1.202 will appear in the
.Pa /net/192.168.1.202/artwork
directory without any additional configuration.

usr.sbin/autofs/auto_master.5
220

Courtesy of Ingo Schwarze:

.Pf /net/ Ar nfs-server-ip Ns / Ns Ar share-name Ns /

That shows the full path, but makes it more obvious that nfs-server-ip and share-name are not literal values.

Next to Warren's comments this looks OK to me..

This was committed some time ago; the last missing nit from wblock@ is included in a new review at https://reviews.freebsd.org/D1447; how do I close this one?

Quoting https://wiki.freebsd.org/CodeReview :

Do this by scrolling down to the bottom of the review page, select the Close option from the Action dropdown menu just above the Comment field, and click Submit. The Close option will not be visible unless the review is in the Approved state.

You can close a revision (in any state) from the command line with the following:

arc close-revision DXXX

Committed some time ago; can't close because it's not quite approved.