个人工具

“UbuntuHelp:Autofs”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第2行: 第2行:
 
{{Languages|UbuntuHelp:Autofs}}
 
{{Languages|UbuntuHelp:Autofs}}
 
== Introduction ==
 
== Introduction ==
Automount is the modern way to mount directories over a network. It is far much easier to manage and are more economic in bandwith.
+
Automount is the modern way to mount directories over a network. It is much easier to manage and more economic in bandwidth than static mounts via fstab.
In this howto, installation and configuration of a files based configuration autofs will be presented. It is not used a lot anymore, but [[UbuntuHelp:AutofsLDAP|AutofsLDAP]] is very usefull and based on this one. In small business environement, this howto can be usefull.
+
In this howto, installation and configuration of a files based configuration autofs will be presented. It is not used a lot anymore, but [[UbuntuHelp:AutofsLDAP|AutofsLDAP]] is very useful and based on this one. In small business environment, this howto can be useful ''(why?)[because one could expect some servers and shares/exports that have to be distributed using autofs (preferably via yp)''.  
 
== Installation ==
 
== Installation ==
 
Install the following packages: <code><nowiki>autofs</nowiki></code> (see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]])
 
Install the following packages: <code><nowiki>autofs</nowiki></code> (see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]])
第21行: 第21行:
 
#/net    /etc/auto.net
 
#/net    /etc/auto.net
 
</nowiki></pre>
 
</nowiki></pre>
As you see, by default, all is commented out. Each mount point is associated with another configuration file. Most of them are now useless (now modern desktop have automount feature with hal & co). This would be usefull for light desktop. <code><nowiki>/net</nowiki></code> and <code><nowiki>/smb</nowiki></code> are still usefull.  
+
As you see, by default, all is commented out. Each mount point is associated with another configuration file. Most of them are now useless (now modern desktop have automount feature with hal & co). This would be useful for light desktop. <code><nowiki>/net</nowiki></code> and <code><nowiki>/smb</nowiki></code> are still useful.  
In Unix world, <code><nowiki>/net</nowiki></code> enable automounting distant file system exported by NFS. For example, if you have a server named <code><nowiki>fileserver</nowiki></code> with a NFS export directory called <code><nowiki>/export</nowiki></code> (see [[UbuntuHelp:NFSServerHowTo|NFSServerHowTo]] for how to setup a such server), you can mount it by typing in a shell command line <code><nowiki>cd /net/fileserver/export</nowiki></code>. In an environment with NFS file servers, such automount can be usefull.
+
In Unix world, <code><nowiki>/net</nowiki></code> enable automounting distant file system exported by NFS. For example, if you have a server named <code><nowiki>fileserver</nowiki></code> with a NFS export directory called <code><nowiki>/export</nowiki></code> (see [[UbuntuHelp:NFSServerHowTo|NFSServerHowTo]] for how to setup a such server), you can mount it by typing in a shell command line <code><nowiki>cd /net/fileserver/export</nowiki></code>. In an environment with NFS file servers, such automount can be useful.
 
For <code><nowiki>/smb</nowiki></code> mount point, function the same way but is for SMB file systems (if you need to authenticate for acceding the SMB share, the automatic way will not function).
 
For <code><nowiki>/smb</nowiki></code> mount point, function the same way but is for SMB file systems (if you need to authenticate for acceding the SMB share, the automatic way will not function).
Uncomenting <code><nowiki>/net</nowiki></code> and <code><nowiki>/smb</nowiki></code> is a good solution.   
+
Uncommenting <code><nowiki>/net</nowiki></code> and <code><nowiki>/smb</nowiki></code> is a good solution.   
 
You can add your own mount point with your own options in <code><nowiki>/etc/auto.master</nowiki></code> to suit your needs.
 
You can add your own mount point with your own options in <code><nowiki>/etc/auto.master</nowiki></code> to suit your needs.
 
After entering your changes, run the following command to have them taken into account:
 
After entering your changes, run the following command to have them taken into account:
第30行: 第30行:
 
sudo /etc/init.d/autofs reload
 
sudo /etc/init.d/autofs reload
 
</nowiki></pre>
 
</nowiki></pre>
 +
''In other documentation Autofs and Automount seem to be used interchangeably however this document seems to indicate they are different. This document,'' about Autofs, ''starts by talking about Automount and then indicates that Autofs is'' "not used a lot anymore" ''even though [[UbuntuHelp:AutofsLDAP|AutofsLDAP]] is useful. If Automount is an alternative to Autofs, where is the documentation on Automount? [[UbuntuHelp:SettingUpNFSHowTo|SettingUpNFSHowTo]] still refers to autofs for mounting nfs shares automatically and frankly explains the use of autofs better. This document needs rewording to make it more clear.''
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年5月12日 (二) 15:54的版本


Introduction

Automount is the modern way to mount directories over a network. It is much easier to manage and more economic in bandwidth than static mounts via fstab. In this howto, installation and configuration of a files based configuration autofs will be presented. It is not used a lot anymore, but AutofsLDAP is very useful and based on this one. In small business environment, this howto can be useful (why?)[because one could expect some servers and shares/exports that have to be distributed using autofs (preferably via yp).

Installation

Install the following packages: autofs (see InstallingSoftware)

Configuration

For configuring autofs, you have to edit /etc/default/auto.master file. Here is the sample file provided by Ubuntu:

#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc   /etc/auto.misc --timeout=60
#/smb   /etc/auto.smb
#/misc  /etc/auto.misc
#/net    /etc/auto.net

As you see, by default, all is commented out. Each mount point is associated with another configuration file. Most of them are now useless (now modern desktop have automount feature with hal & co). This would be useful for light desktop. /net and /smb are still useful. In Unix world, /net enable automounting distant file system exported by NFS. For example, if you have a server named fileserver with a NFS export directory called /export (see NFSServerHowTo for how to setup a such server), you can mount it by typing in a shell command line cd /net/fileserver/export. In an environment with NFS file servers, such automount can be useful. For /smb mount point, function the same way but is for SMB file systems (if you need to authenticate for acceding the SMB share, the automatic way will not function). Uncommenting /net and /smb is a good solution. You can add your own mount point with your own options in /etc/auto.master to suit your needs. After entering your changes, run the following command to have them taken into account:

sudo /etc/init.d/autofs reload

In other documentation Autofs and Automount seem to be used interchangeably however this document seems to indicate they are different. This document, about Autofs, starts by talking about Automount and then indicates that Autofs is "not used a lot anymore" even though AutofsLDAP is useful. If Automount is an alternative to Autofs, where is the documentation on Automount? SettingUpNFSHowTo still refers to autofs for mounting nfs shares automatically and frankly explains the use of autofs better. This document needs rewording to make it more clear.