Automounting disks is magic. Autodetecting what to automount is magic-er.
Last weekend I set up my pogoplug as an NFS server, and installed and configured autofs to look for specific directories on the pogoplug. This weekend, I revisited that configuration and learned I was working too hard.
In /etc/auto.master, the entry "/net -hosts" says, "When I type 'ls /net/foo', do these steps:"
- look for a host named 'foo.com' ,
- ask foo.com what filesystems it's exporting
- mount them under /net/foo.com
- now do the 'ls'
No modifying /etc/auto.misc every time you want to automount a new machine: the machine just appears. There is an /etc/auto.net, but it's a script that autofs uses to ask a remote host what it's exporting.
Using remote filesystems could be even easier and more transparent (I could, for example, imagine having upstart manage the whole process, and having autofs be installed by default) but not much.
1 comment:
Huh?
Post a Comment