yangtingkun
===========================================================
Solaris NFS mount
===========================================================

Solaris下,可以通过NFS mount加载远端服务器的目录到本地目录下。今天测试了一下,发现整个过程并不复杂。


首先需要进行的操作是在远端站点对本地站点进行授权,否则NFS mount操作的时候会报权限不足的错误:Permission denied

# mount racnode2:/data1/archivelog /archivelog2
nfs mount: racnode2:/data1/archivelog: Permission denied

在主站点通过share命令将只读或读写权限授权给NFS客户端,然后就可以进行nfs mount了。

# share -F nfs -o rw=racnode1 /data1/archivelog

下面返回racnode1节点,重新执行上面的mount语法:

# mkdir archivelog2
# mount racnode2:/data1/archivelog /archivelog2

首先确保要建立的mount点目录已经存在,通过mount就可以加载远端站点的目录了。

# df -k |grep archivelog
racnode2:/data1/archivelog 516335185 724851 510446983 1% /archivelog2

不过上面的修改在系统重启后就失效了,如果希望系统重启后自动进行mount,那么在nfs客户端,需要修改/etc/vfstab文件,将下面的内容添加进去:

racnode2:/data1/archivelog - /archivelog2 nfs - yes -

为了保证nfs的服务器端重启后,share信息不丢失,可以在/etc/dfs/dfstab文件中添加:

share -F nfs -o rw=racnode1 /data1/archivelog

这样,无论那台服务器重启,NFS MOUNT都可以自动恢复正常。

yangtingkun 发表于:2007.04.28 15:49 ::分类: ( 操作系统 ) ::阅读:(1428次) :: 评论 (3)
re: Solaris NFS mount [回复]

不错,尝试了一下,可以

骨骨 评论于: 2007.04.29 14:58
re: Solaris NFS mount [回复]

I work at the country Mexico, and can read the Chinese. Accidently getting into your site from Eygle. About this topic, I have a question, which bothers me for a long time. What happen to the client machine when both NFS server and Client machine went down and the server can not boot up, i.e. server with NFS becomes unavailable? In my case, my server is a Solaris 8, and my client is a IBM AIX 5; then the client will hang during the reboot process. I think that there is away to ignore the mounting process if the NFS is not available for a certain period of time. Just do not know what the option is in configuration

Chi 评论于: 2007.06.20 06:05
re: Solaris NFS mount [回复]

其实Solaris上有一个自动MOUNT的功能可以解决这个问题:automount

使用automount,如果一段时间不用NFS的mount目录,操作系统会自动将目录unmount,等到下次使用的时候,再将其MOUNT上,这样就避免了NFS SERVER出现故障对CLIENT的影响。

可惜,automount的测试我还没有成功。最近也比较忙,就一直没有研究,你有兴趣的话,可以试试

yangtingkun 评论于: 2007.06.20 17:11

发表评论
标题

在此添加评论
表情符号: smile laughing tongue angry crying sad wassat wink

称呼

邮箱地址(可选)

个人主页(可选)

 authimage


切换风格
新闻聚合
博客日历
文章归档...
最新发表...
最新评论...
最多阅读文章...
最多评论文章...
博客统计...
Blog信息
网站链接...