cancel
Showing results for 
Search instead for 
Did you mean: 
ricardodacosta
Moderator
Moderator
  • 8,725 Views

Halloween tip of the day: Using autofs with the ghost option

Adding –ghost at the end of your definition in /etc/auto.master or in /etc/auto.master.d/ definitions, tells the automounter to create “ghost” versions (i.e. empty directories) of all the mount points listed in the configuration file regardless whether any of the file systems are actually mounted or not.

This is very convenient and highly recommended, because it will show you the available auto-mountable file systems as existing directories, even when their file systems aren’t currently mounted.

Without the –ghost option, you’ll have to remember the names of the directories. As soon as you try to access one of them, the directory will be created and the file system will be mounted. When the file system gets unmounted again, the directory is destroyed too, unless the –ghost option was used. 

Example 

/home/guests /etc/auto.guests --ghost
Labels (2)
1 Reply
  • 7,125 Views

Hi there,

Thank you for this post. I have read that --ghost is a deprecated option and should be used with causion due to possible performance issues when using large directories:

[no]browseThis is an autofs specific option that is a pseudo mount option and so is given without a leading dash. Use of the browse option pre-creates mount point directories for indirect mount maps so the map keys can be seen in a directory listing without being mounted. Use of this option can cause performance problem if the indirect map is large so it should be used with caution. The internal program default is to enable browse mode for indirect mounts but the default installed configuration overrides this by setting BROWSE_MODE to "no" because of the potential performance problem. This option does the same as the deprecated --ghost option, the browse option is preferred because it is used by other autofs implementations.

Do you know if --ghost is indeed the same as BROWSE_MODE yes?

Regards,

Mervin

0 Kudos
Join the discussion
You must log in to join this conversation.