Estou tentando montar uma partição cifs usando o autofs. Depois de muitos testes e erros, finalmente consegui montá-lo (o principal problema que tive foi que nas instruções, aqui , esta linha no arquivo de mapeamento
"[any_name] -fstype=cifs,[other_options] > ://[remote_server]/[remote_share_name]"
deve ser realmente:
"[remote_share_name] -fstype=cifs,[other_options] ://[remote_server]/"
De qualquer forma, depois de tudo isso, eu sou capaz de montar minha partição cifs usando este comando:
sudo automount -f -d &
Infelizmente, quando uso o serviço autofs real usando o comando abaixo, meu compartilhamento não é montado
sudo /sbin/service autofs restart
Eu olhei os arquivos de log usando depois de configurar o autofs sysconfig para estar no modo de depuração, e veja os seguintes erros:
Dec 18 13:33:51 SRVR_XYZ automount[7986]: autofs stopped
Dec 18 13:46:09 SRVR_XYZ automount[8740]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:46:09 SRVR_XYZ automount[8740]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:46:11 SRVR_XYZ automount[8740]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:46:13 SRVR_XYZ automount[8740]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:46:15 SRVR_XYZ automount[8740]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:46:17 SRVR_XYZ automount[8740]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:46:19 SRVR_XYZ automount[8740]: problem reading master map, maximum wait exceeded
Dec 18 13:46:19 SRVR_XYZ automount[8740]: automount: warning: could not read at least one map source after waiting, continuing ...
Dec 18 13:46:19 SRVR_XYZ automount[8740]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:53:34 SRVR_XYZ automount[9139]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:53:34 SRVR_XYZ automount[9139]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:53:36 SRVR_XYZ automount[9139]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:53:38 SRVR_XYZ automount[9139]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:53:40 SRVR_XYZ automount[9139]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:53:42 SRVR_XYZ automount[9139]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:53:44 SRVR_XYZ automount[9139]: problem reading master map, maximum wait exceeded
Dec 18 13:53:44 SRVR_XYZ automount[9139]: automount: warning: could not read at least one map source after waiting, continuing ...
Dec 18 13:53:44 SRVR_XYZ automount[9139]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:54:18 SRVR_XYZ automount[9250]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:54:18 SRVR_XYZ automount[9250]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:54:20 SRVR_XYZ automount[9250]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:54:22 SRVR_XYZ automount[9250]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:54:24 SRVR_XYZ automount[9250]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:54:26 SRVR_XYZ automount[9250]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Dec 18 13:54:28 SRVR_XYZ automount[9250]: problem reading master map, maximum wait exceeded
Dec 18 13:54:28 SRVR_XYZ automount[9250]: automount: warning: could not read at least one map source after waiting, continuing ...
Dec 18 13:54:28 SRVR_XYZ automount[9250]: lookup_read_master: lookup(file): could not open master map file /etc/auto.master
Eu não tenho ideia do porquê disso. Eu me certifiquei de definir as permissões apropriadas (chmod 640) e propriedade de /etc/auto.master para a conta root.
Não tenho a menor idéia de por que o serviço autofs não pode montar a partição, enquanto ela funciona corretamente quando eu inicio o automout manualmente.
Eu uso:
Automount version 5.0.5-133.el6_9
Linux distro: CentOS release 6.9(Final)
Aqui está como o arquivo /etc/auto.master se parece:
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/misc /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
/net -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/mnt/cifs /etc/auto.cifs-shares --ghost
Agradecemos antecipadamente por sua ajuda.