Friday, December 17, 2010

solaris 10, mount those automounts, please?

Solaris and failing mounts get me depressed sometimes. After you've rebooted a machine your nice UDP NFS mounts just don't go or you've made a change in one of your auto defs and your brain is addled because you work with so many variants of Solaris it just isn't funny anymore.

Solaris 8 and 9 were pretty easy. To restart the service (which wasn't one) after you've mucked about in /etc/auto_master &c.:
# /etc/init.d/autofs stop; /etc/init.d/autofs start

Solaris 10 is different. The init script is no longer there, and autofs has become a service. To figure out if is running and to (re)start it after doing what you need to do, follow this sequence:
# svcs | grep auto
legacy_run     14:14:53 lrc:/etc/rc2_d/S72autoinstall
online          9:51:27 svc:/system/filesystem/autofs:default
# svcadm -v restart svc:/system/filesystem/autofs:default
Action restart set for svc:/system/filesystem/autofs:default.
cd to your newly mounted dirs and away you go.

No comments: