【Netapp】NetApp常用命令

Data ONTAP 操作系统


1.查看硬盘信息
credit-2> sysconfig -r     
2.查看主机光纤接口的信息
credit-2> fcp show initiator     
3.查看卷的信息
data> qtree  
4.查看LUN空间使用情况
credit-2> df -g 
5.查看存储所建组的信息
credit-2> df –Ag
6.检查网络接口
credit-2> ifconfig -a
7.检查cluster状态是否正常
credit-2> cf status
8.性能检查
credit-2> sysstat 3
credit-netapp1> sysstat -x 1 
9.查看系统日志:
仔细检查是否有failed,error,warning等字样
credit-2> rdfile /etc/messages
10.检查所有硬件
credit-2> sysconfig -v
11.检查网络是否正常
credit-2> ping 192.168.1.200
12.在aggr0中创建jydb卷,大小为200g
credit-1>vol create jydb aggr0 200g
13.动态给jydb卷增加100g
credit-1> vol size jydb +100g
减少卷大小:
credit-netapp1> vol size neirong -7t;      
14.删除credit卷,要先offline再destroy
credit-1> vol offline credit
credit-1> vol destroy credit
15.输出exportfs
先把复制内容
credit-2> rdfile /etc/exports
/vol/cps  -sec=sys,rw=172.16.10.0/24,root=172.16.10.0/24,nosuid
/vol/hetong     -sec=sys,rw=172.16.10.0/24,root=172.16.10.0/24,nosuid
/vol/weixin     -sec=sys,rw=172.16.10.102:172.16.10.122,root=172.16.10.102:172.16.10.122,nosuid
然后在执行:
credit-2> wrfile /etc/exports
黏贴刚才复制的内容,必须回车结束,最后一行才能生效
ctl+c退出并保存
执行exportfs命令,输出目录:
credit-2>exportfs -a
-----------------------------------------------------------------------------------


netapp> exportfs -i -o rw=10.1.15.125,root=10.1.15.125 /vol/test


-i -o 是当前生效,配置如写入/etc/exports文件,重启恢复
netapp> exportfs -p sec=sys,rw=10.1.15.125,root=10.1.15.125 /vol/test
在/etc/exports中原先/vol/test配置被"#"注释,并产生了对应的新的配置
---------------------------------------------------------------------------------- 
16.删除快照


credit-1> snap delete -a dbbk


Are you sure you want to delete all snapshots for volume dbbk? y
Deleted dbbk snapshot hourly.5.
Deleted dbbk snapshot nightly.1.
Deleted dbbk snapshot hourly.4.
Deleted dbbk snapshot hourly.3.
Deleted dbbk snapshot hourly.2.
Deleted dbbk snapshot hourly.1.
Deleted dbbk snapshot nightly.0.
Deleted dbbk snapshot hourly.0.
credit-1> snap reserve dbbk 0
credit-1> snap sched dbbk 0 0 0 
17.添加NetApp默认路由命令
credit-2> route add default 172.16.10.1 1 
 配置文件:
credit-1> rdfile /etc/rc
#Auto-generated by setup Mon Jan  7 17:20:14 CST 2013
hostname credit-1
ifgrp create lacp vif01 -b ip e0b e0a
ifconfig vif01 `hostname`-vif01 mediatype auto partner vif01
#route add default NONE 1
route add default 172.16.10.1 1 
routed on
options dns.enable off
options nis.enable off 
18.修改文件系统inode


可以通过maxfiles vol_name命令修改
maxfiles vol_name查看
maxfiles vol_name max_num_files修改
可以修改的数值为卷的大小除以4KB
credit-1> maxfiles ruleengine 120000000
The new maximum number of files specified is more than twice as big as


it needs to be, based on current usage patterns.  This invocation of the
operation on the specified volume will allow disk space consumption for
files to grow up to the new limit depending on your workload. The maxfiles
setting cannot be lowered below the point of any such additional disk space
consumption and any additional disk space consumed can never be reclaimed.
Also, such consumption of additional disk space could result in less
available memory after an upgrade, which means you might not be able to
run WAFL_check.
The new maximum number of files will be rounded to 119999989.


Are you sure you want to change the maximum number of files? maxfiles: Maximum number of files not changed.


19.添加chenyu用户
useradmin user add chenyu -g administrators    用户名/口令:chenyu/Chenyu#2013
20.设置时钟服务器
credit-netapp1> options timed.servers 10.151.20.63,10.151.20.73
credit-netapp1> options timed.enable on
21.查看磁盘,raid组情况
credit-netapp1> sysconfig -r
22.查看aggr的状态
credit-netapp1> aggr status -v
23.进入高级模式
credit-netapp1> priv set advanced
24.移除硬盘机头归属
credit-netapp1*> disk remove_ownership 0a.30.23 
25.查看没有归属机头的磁盘
credit-netapp1*> disk show -n
26.把所有没有归属机头的磁盘,分配给该机头
credit-netapp1*> disk assign all
27.给aggr添加磁盘
credit-netapp1*> aggr add aggr0 -n 11
aggr add aggr0 -d 0a.30.5 0a.20.7 0a.30.4 0a.20.6 0a.30.3 0a.20.5 0a.30.2 0a.20.4 0a.30.1 0a.20.3 0a.30.0
28.添加snapmirror的许可。
credit-2> license add JOJTQPJ
A snapmirror 90 day site license has been installed.
29.查看snapmirror的状态
credit-2> snapmirror status
Snapmirror is on.
30.设置卷的状态为限制模式
credit-netapp1> vol restrict huizheng
Volume 'huizheng' is now restricted.
31.创建snapmirror的增量同步策略
credit-netapp1> rdfile /etc/snapmirror.conf
credit-1:hetong credit-netapp1:hetong - 0 23 * *
credit-2:huizheng credit-netapp1:huizheng - 5 23 * *
- - - - - 5个横杠代表不自动执行增量同步。
- * * * * 4个横杠4个星代表一分钟执行一次。
32.在源端设置目的端IP为信任关系
credit-2> options snapmirror.access host=172.16.10.250,172.16.10.251
33.第一次全量同步
credit-netapp1> snapmirror initialize -S credit-1:hetong credit-netapp1:hetong
34.增量同步
credit-netapp1> snapmirror update -S credit-1:hetong credit-netapp1:hetong
35.查看当前cifs共享
credit-netapp1> cifs shares
36.添加cifs共享
credit-netapp1> cifs shares -add rural /vol/rural
37.删除cifs共享
credit-netapp1> cifs shares -delete rural
38.在windows操作系统上面使用netapp默认的administrator用户访问
credit-netapp1> useradmin user list
Name: root
Info: Default system administrator.
Rid: 0
Groups:
Name: administrator                   
Info: Built-in account for administering the filer
Rid: 500
Groups: Administrators
Name: chenyu                          
Info: 
Rid: 131073
Groups: Administrators 
39.挂载netapp日志卷给linux主机
#mount 172.16.10.250:/vol/vol0 /mnt 
40.检查卷的参数设置


credit-netapp2> vol options dss_hetong
nosnap=off, nosnapdir=off, minra=off, no_atime_update=off, nvfail=off, 
ignore_inconsistent=off, snapmirrored=off, create_ucode=on, 
convert_ucode=off, maxdirsize=73400, schedsnapname=ordinal, 
fs_size_fixed=off, guarantee=volume, svo_enable=off, svo_checksum=off, 
svo_allow_rman=off, svo_reject_errors=off, no_i2p=off, 
fractional_reserve=100, extent=off, try_first=volume_grow, 
read_realloc=off, snapshot_clone_dependency=off, dlog_hole_reserve=off,
nbu_archival_snap=off 




-----------------------------------------------------------------------------
添加路由:# route add -net 172.16.10.0 netmask 255.255.255.0 gw 172.16.20.1
windows操作系统添加路由:route add 172.16.10.0 mask 255.255.255.0 172.16.20.1
登录netapp存储
# ssh root@172.16.10.10
口令是:credit#2013
创建50g大小
credit-1>vol create cps aggr0 50g

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31442725/viewspace-2135567/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31442725/viewspace-2135567/

  • 0
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SDK(软件开发工具包)是一种开发工具,用于帮助开发人员在创建应用程序时与特定的软件或硬件进行交互。NetApp是一家专注于数据存储技术的公司,其产品包括存储设备和软件。 NetApp提供了一个特定的SDK,用于监控其存储设备。通过使用这个SDK,开发人员可以获取关于存储设备的信息,比如存储容量、性能指标、配置和状态等。开发人员可以编写自己的应用程序来利用这些信息,以便更好地监控和管理NetApp存储设备。 利用NetApp的SDK可以实现以下功能: 1. 实时监控:通过调用SDK提供的接口,开发人员可以实时获取存储设备的运行状态,包括CPU使用率、内存使用率、磁盘使用率等指标。这些信息可以用于实时监控和诊断存储设备的性能。 2. 历史数据分析:SDK还提供了获取历史数据的功能,开发人员可以获取存储设备在一段时间内的各种指标数据,并通过分析这些数据来了解存储设备的使用趋势和性能变化。 3. 配置管理:通过调用SDK提供的接口,开发人员可以读取和修改存储设备的配置信息。这样,他们可以通过编写自己的应用程序来管理存储设备的配置,如添加卷、修改存储策略等。 总之,通过使用NetApp的SDK,开发人员可以轻松地实现对NetApp存储设备的监控和管理。这样,他们可以更好地了解存储设备的性能和状态,并进行相应的调整和优化。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值