This basically says that there is a /media directory, and automount will mount the “-media” map there, and everything that gets mounted there will have the “nosuid” mount option, for security reasons. The main configuration file for autofs(5) is /etc/auto_master you need to uncomment this line: Note that at the time of this writing, this is only available in FreeBSD 11-CURRENT. The kernel driver will get loaded automatically, you can see it in kldstat(8) output. Setting it up is fairly simple: you obviously need to have autofs(5) enabled in /etc/rc.conf:Īnd you need to have the autofs(5) daemons running – just like other deamons in FreeBSD those will get started at system bootup if autofs_enable was set otherwise you need to start them by hand: It’s a completely independent implementation, it’s just that OS X is the other operating system I use.Īutomounting requires cooperation of four things: the kernel filesystem, autofs.ko, which is responsible, among other things, for “pausing” the application until the filesystem is actually there the automountd(8) daemon, which is the component that retrieves configuration information from maps (this includes fetching it from remote sources, such as LDAP) and actually mounts the filesystems the automount(8) utility for various administrative purposes and then the autounmountd(8) daemon to, well, unmount the filesystems mounted by automountd(8) after a timeout. It’s a mechanism similar to ones available in other systems, in particular to OS X. The application trying to access the filesystem doesn’t even notice this event, apart from a slight delay on first access. In other words, filesystems get mounted when they are first accessed, and then unmounted after some time passes. The purpose of autofs(5) is to mount filesystems on access, in a way that’s transparent to the application. (And it shows some related mechanisms as a bonus.) autofs(5) Basics The article demonstrates how modular the automounter is, and how easy it is to adopt to any mount-related situation you might have, using recently added removable media support as an example. But there is no document that shows how it works inside, from the advanced system administrator or a power user point of view. Like any proper FreeBSD Foundation sponsored project, it included the usual kind of documentation – man pages and the Handbook chapter. My big project for 2014 was the new FreeBSD automounter. This next FreeBSD From the Trenches story come to us from Edward Tomasz Napierała who shares his work on the new FreeBSD automounter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |