Index: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml =================================================================== --- head/en_US.ISO8859-1/books/handbook/disks/chapter.xml +++ head/en_US.ISO8859-1/books/handbook/disks/chapter.xml @@ -508,6 +508,68 @@ da0: <STECH Simple Drive 1.04> s/n WD-WXE508CAN263 detached (da0:umass-sim0:0:0:0): Periph destroyed + + + Automounting Removable Media + + + &man.autofs.5; supports automatic mounting of + removable media starting with &os; 10.2-RELEASE. + + + USB devices can be automatically + mounted by uncommenting this line in + /etc/auto_master: + + /media -media -nosuid + + Then add these lines to + /etc/devd.conf: + + notify 100 { + match "system" "GEOM"; + match "subsystem" "DEV"; + action "/usr/sbin/automount -c"; +}; + + + Reload the configuration if &man.autofs.5; + and &man.devd.8; are already running: + + &prompt.root; service automount reload +&prompt.root; service devd restart + + &man.autofs.5; can be set to start at boot by adding this + line to /etc/rc.conf: + + autofs_enable="YES" + + &man.autofs.5; requires &man.devd.8; to be enabled, as it + is by default. + + Start the services immediately with: + + &prompt.root; service automount start +&prompt.root; service automountd start +&prompt.root; service autounmountd start +&prompt.root; service devd start + + Each file system that can be automatically mounted appears + as a directory in /media/. The directory + is named after the file system label. If the label is + missing, the directory is named after the device node. + + The file system is transparently mounted on the first + access, and unmounted after a period of inactivity. + Automounted drives can also be unmounted manually: + + &prompt.root; automount -fu + + This mechanism is typically used for memory cards and + USB memory sticks. It can be used with + any block device, including optical drives or + iSCSI LUNs. +