Why automount inside a container hosted on Red Hat Enterprise Linux 7 is not working ?

Solution Unverified - Updated -

Issue

  • Why automount inside a container hosted on Red Hat Enterprise Linux 7 is not working ?
  • Why autofs directories are not getting mounted automatically in LXC container ?
# echo '* -fstype=nfs 192.168.0.1:/vol/home_shared/&' > /etc/auto.home
# echo "/home /etc/auto.home" >> /etc/auto.master
# systemctl enable autofs.service
# systemctl start autofs.service
# cd /home/user    <------- hangs

Environment

  • Red Hat Enterprise Linux 7.1
  • Docker 1.8
  • lxc container using libvirt-lxc plugin

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.