Netapp exportfs NFS Config CLI Guide

Netapp exportfs NFS Config CLI Guide

A quick and simple Netapp NFS configuration guide with commands and options to help explain and remove the mysteries. Netapps provide highly dependable NFS services, as the name implies, it’s a network appliance. You really can just turn it on and not worry much about outages. Unless someone trips on a power chord or two. Below is a compilation of exporfs and exports configuration options commonly used.

Rules for exporting Resources

• Specify complete pathname, meaning the path must begin with a /vol prefix
• You cannot export /vol, which is not a pathname to a file, directory or volume. Export each volume separately
• When export a resource to multiple targets, separate the target names with a colon (:) Resolve hostnames using DNS, NIS or /etc/hosts per order in /etc/nssswitch.conf

Access restrictions that specify what operations an NFS client can perform on a resource

• Default is read-write (rw) and UNIX Auth_SYS (sys) security
• “ro” option provides read-ony access to all hosts
• “ro=” option provides read-only access to specified hosts
• “rw=” option provides read-write access to specified hosts
• “root=” option specifies that root on the target has root permissions

Examples to export resources with NFS on the CLI
> exportfs -a
> exportfs -o rw=host1:host2 /vol/volxyz

Exportable resources are by Volume Directory/Qtree File. Target examples from /etc/exports Host – use name of IP address

/vol/vol0/home -rw=myhost
/vol/vol0/home -root=myhost,-rw=hishost,therehost
# Netgroup – use the NIS group name – Although I love NIS, NIS is rare nowadays. But the Netapp supports NIS. Don’t think NIS+.
/vol/vol0/home -rw=the-nisgroup

# Subnet – specify the subnet address
/vol/vol0/home -rw=”192.168.100.0/24″

# DNS – use DNS subdomain
/vol/vol0/home -rw=”.sap.dev.mydomain.com”

# Command to displays all current export in memory
> exportfs

# To export all file system paths specified in the /etc/exports file.
> exportfs -a
Adds exports to the /etc/exports file and in memory.  Default export options are “rw” (all hosts) and “sec=sys”.
> exportfs -p [options] path

> exports -p rw=hostxyz /vol/vol2/sap

# To export a file system path temporarly without adding a corresponding entry to the /etc/exports file.
> exporfs -i -o ro=hostB /vol/vol1/lun2


# Reloads the exports from /etc/exports files
> exportfs -r


# Unexports all exports defined in the /etc/exports file
> exportfs -uav
# Unexports a specific export
> exportfs -u /vol/vol2/homes
# Unexports an export and removes it from /etc/exports file. This one is handy.
> exportfs -z /vol/vol0/home

# To verify the actual path to which a volume is exported
> exportfs -s /vol/vol2/vms-data
# To display list of clients mounting from the storage system
> showmount -a filerabc

# To display list of exported resources on the storage system
>showmount -e filerabc

# To check NFS target to access cache
> exportfs -c clientaddr path [accesstype] [securitytype]
> exportfs -c host1 /vol/vol2 rw
# To remove entries from access cache
> exportfs -f [path]
# Flush the access cache.
> exportfs -f

转载于:https://www.cnblogs.com/oskb/p/3784089.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值