【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
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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- netapp NFSAPPNFS
- 【儲存】netappAPP
- IO錯誤與NetAppAPP
- 【NetApp資料恢復】誤刪除NetApp上的lun導致伺服器當機的NetApp資料恢復APP資料恢復伺服器
- NETAPP - LOGIN TOO MANY USERSAPP
- 【NetApp資料恢復案例】針對NetApp誤刪除資料的恢復APP資料恢復
- netapp檢視序列號的方法APP
- NetApp資料恢復—NetApp儲存池中劃分的卷丟失的資料恢復案例APP資料恢復
- Netapp儲存日常檢查及資訊收集APP
- netapp 2個控制器spare盤分配APP
- NetApp財報:2014財年第一財季NetApp營收為15.16億美元 同比增長5%APP營收
- NetApp FAS Filer的重複資料刪除APP
- NetApp資料恢復-未知原因導致NetApp儲存內卷丟失,卷內虛擬機器不可訪問APP資料恢復虛擬機
- 儲存NETAPP處於takeover狀態解決方法。APP
- NetApp收購Data Domain 當上冤大頭?薦APPAI
- Volume or maxfiles exceeded max allowed for SIS (NETAPP ASIS功能的限制)APP
- NetApp新系統簡化Linux計算叢集管理APPLinux
- Netapp 資料恢復案例;誤刪除所有lun解決方案APP資料恢復
- 儲存刪除資料後恢復方法-適用netAPP儲存APP
- NetApp使有狀態應用程式更易於在Kubernetes中完成APP
- ESXI5.5主機新增共享儲存(netapp fas8040)操作步驟APP
- NetApp FAS2240-4儲存刪除檔案資料恢復APP資料恢復
- 使用NFS4協議在NETAPP儲存下不能MOUNT的分析和解決NFS協議APP
- 【儲存資料恢復】NetApp儲存誤刪除的資料恢復案例資料恢復APP
- 【儲存資料恢復案例】Netapp誤操作刪除lun的資料恢復資料恢復APP
- 【伺服器資料恢復】NetApp儲存誤刪除的資料恢復案例伺服器資料恢復APP
- 【儲存資料恢復】NetApp儲存誤刪資料夾的資料恢復案例資料恢復APP
- 【伺服器資料恢復】NetApp儲存中lun被誤刪除的資料恢復過程伺服器資料恢復APP
- 【PG常用命令】Postgresql常用命令之大小SQL
- 常用命令
- Git日常常用命令和ADB常用命令Git
- brew 常用命令
- UNIX 常用命令
- Redis 常用命令Redis
- HDFS 常用命令
- Scala常用命令
- homebrew 常用命令
- CentOS常用命令CentOS