on a Linux or Solaris server, using automount/autofs, how do i create/populate a directory with automount entries without mounting them ?
For example, i have /data yp:auto.data
and /data/ subdirectories are only created after the first access. This is not persistent across reboot on Linux.
Is there a way to populate my /data without mounting all the disks ? So that users/applications see /data/disk1..N even if they are not mounted.
On Solaris, that's the default mode, and you need to specify
-nobrowse
in automount maps to disable it. (For instance, we have our source code workspaces browsable, but home directories under auto_home are not, since no one wants to wait for 30,000 subdirs to load when trying to save a file in their home directory using a GUI file selection dialog, especially not in GUI's that stat each one, causing a mount, just to determine whether to display a folder or file icon.)For more details see the Browsing section of the automount(1m) man page and the autofs browsability sections of the System Administration Guide.