免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3485 | 回复: 6
打印 上一主题 下一主题

[小机硬件] 请问如何在NFS客户端系统启动时自动把NFS服务器上的共享目录mount起来 [复制链接]

论坛徽章:
3
天秤座
日期:2014-10-29 11:37:572015元宵节徽章
日期:2015-03-06 15:50:39NBA常规赛纪念章
日期:2015-05-04 22:32:03
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-01 15:33 |只看该作者 |倒序浏览
假定在NFS服务器上已经设置好了

论坛徽章:
0
2 [报告]
发表于 2008-02-01 19:51 |只看该作者
写脚本代码,然后修改inittab
没有做过,看老兄你的了

论坛徽章:
0
3 [报告]
发表于 2008-02-02 10:05 |只看该作者
#smit mknfsmnt
                                      Add a File System for Mounting

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[TOP]                                                   [Entry Fields]
* PATHNAME of mount point                            []  //文件系统本地的安装点。
* PATHNAME of remote directory                       []  //该文件系统在远程服务器(NFS服务器)上的全路径目录名。
* HOST where remote directory resides                [] //输入远程目录所在的主机名(NFS服务器名)
  Mount type NAME                                    []
* Use SECURE mount option?                            no              
* MOUNT now, add entry to /etc/filesystems or both?   now     //默认立即MOUNT,并在/etc/filesystems中加文件系统记录
* /etc/filesystems entry will mount the directory no on system RESTART.   //系统启动时,自动MOUNT该文件系统
* MODE for this NFS file system                       read-write      //访问该文件系统权限模式
* ATTEMPT mount in foreground or background           background     //后台安装,当安装失败后,将会在后台重试安装
  NUMBER of times to attempt mount                   []
  Buffer SIZE for read                               []  
  Buffer SIZE for writes                             []  
  NFS TIMEOUT. In tenths of a second                 []  
  NFS version for this NFS filesystem                 any            
  Transport protocol to use                           any            
  Internet port NUMBER for server                    []  
* Allow execution of SUID and sgid programs           yes            
   in this file system?
* Allow DEVICE access via this mount?                 yes            
* Server supports long DEVICE NUMBERS?                yes            
* Mount file system soft or hard                      hard     //默认hard硬安装,客户机就会继续重试安装直到NFS服务器响应为止。
                                                         //soft软安装,当NFS服务器没有响应时,就会返回一个错误。

  Minimum TIME, in seconds, for holding              [3]
   attribute cache after file modification
  Allow keyboard INTERRUPTS on hard mounts?   yes   // 充许使用键盘中断安装,这在NFS服务器不工作或网络不工作时是极其有用的。     
  Maximum TIME, in seconds, for holding              [60]
   attribute cache after file modification
  Minimum TIME, in seconds, for holding              [30]
   attribute cache after directory modification
   attribute cache after directory modification      
  Maximum TIME, in seconds, for holding              [60]
   attribute cache after directory modification      
  Minimum & Maximum TIME, in seconds, for            []  
   holding attribute cache after any modification   
  The Maximum NUMBER of biod daemons allowed         [6]
   to work on this file system
* Use acls on this mount?                             no              
  Number of NFS retransmits                          []  
* Exchange POSIX pathconf information?                no               
* Inherit group IDs?                                  no

论坛徽章:
0
4 [报告]
发表于 2008-02-02 11:53 |只看该作者
客户端啊,这个恐怕要自己写程序了,你没法通知到服务器端自己起来了啊

论坛徽章:
3
天秤座
日期:2014-10-29 11:37:572015元宵节徽章
日期:2015-03-06 15:50:39NBA常规赛纪念章
日期:2015-05-04 22:32:03
5 [报告]
发表于 2008-02-03 10:26 |只看该作者
谢谢3楼啊,够详细的,

写到/etc/filesystems里可以实现自动mount吗,如果能,该如何写

[ 本帖最后由 tomer 于 2008-2-3 10:41 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2008-02-03 12:23 |只看该作者
关注中,LZ记得写好了贴出来和大家分享啊

论坛徽章:
0
7 [报告]
发表于 2008-02-09 17:05 |只看该作者
过年呢,大家都懒得动手测试了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP