やるきなし

2015/01/15 18:24 / Debian GNU/Linux jessie (testing) autofs w/-hosts

jessie だと automount の -hosts (cd /net/hostname/ とすると自動で NFS mount してくれるあれ)の挙動がおかしい.バグレポートは https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741064のとおり(Severity: important).

[/etc/auto.master]
/net    -hosts
としておけば通常は動作してくれるところが,
automount[XXX]: get_exports: lookup(hosts): exports lookup failed for HOSTNAME
automount[XXX]: key "HOSTNAME" not found in map source(s).
という感じの syslog を吐いて,うまく動かない.ということで, とりあえず上記バグレポートにある workaround である
[/etc/auto.master]
/net    /etc/auto.net
を使うことにする(/etc/auto.net は autofs インストール時に配置される). 実際はこういった情報(/net -hosts)は LDAP で +auto.master で配っていて,LDAP 側を修正したくないので,
[/etc/auto.master]
/net    /etc/auto.net
+auto.master
という感じで LDAP の前に /net のエントリを書いておくとこちらが優先されるらしい.

Related articles