本文描述如何對NFS AO進行故障排除。
NFS加速器可最佳化NFSv3流量。其他NFS版本沒有通過NFS AO進行最佳化。
您可以使用show accelerator和show license命令驗證常規AO配置和狀態,如應用程式加速故障排除一文中所述。NFS加速器操作需要企業許可證。
接下來,使用show accelerator nfs命令驗證NFS AO的特定狀態,如圖1所示。您想看到NFS AO已啟用、正在運行和已註冊,而且顯示了連線限制。如果Config State為Enabled,但Operational State為Shutdown,則表示存在許可問題。
使用show running-config命令驗證NFS流量策略是否正確配置。您想檢視加速nfs檔案系統應用程式分類器NFS操作,並且想檢視NFS分類器列出的適當匹配條件,如下所示:
WAE674# sh run | include NFS name File-System classifier NFS action optimize full accelerate nfs <-------------
WAE674# sh run | begin NFS ...skipping classifier NFS match dst port eq 2049 <------------- exit
使用show statistics connection optimized nfs命令檢查WAAS裝置是否正在建立最佳化的NFS連線。驗證NFS連線的「加速」列中是否顯示「N」,這表示已使用NFS AO。
WAE674# sh stat conn opt nfs D:DRE,L:LZ,T:TCP Optimization, C:CIFS,E:EPM,G:GENERIC,H:HTTP,M:MAPI,N:NFS,S:SSL,V:VIDEO, ConnID Local IP:Port Remote IP:Port PeerID Accelerator 582 10.56.94.101:33606 10.56.94.80:2049 0:1a:64:d3:2f:b8 NTDL <-----Look for "N"
使用show statistics accelerator nfs命令驗證以下內容:
WAE# sh statistics accelerator nfs NFS: Global Statistics ----------------- Time Accelerator was started: Fri Oct 23 16:40:06 2009 Time Statistics were Last Reset/Cleared: Fri Oct 23 16:40:06 2009 Total Handled Connections: 170 Total Optimized Connections: 170 Total Connections Handed-off with Compression Policies Unchanged: 0 Total Dropped Connections: 0 Current Active Connections: 0 Current Pending Connections: 0 Maximum Active Connections: 13 Total RPC Calls per Authentication Flavor: 65 298544 0 0 <----Should see 0 or few in last field Total RPC Calls with Unknown Authentication Flavor: 0 <----Should see 0 or few Total RPC Calls per NFS Version: 0 0 0 298609 0 <----Should see 0 or few in first two and last fields Total RPC Calls with Unknown NFS Version: 0 <----Should see 0 or few Total Requests: 298609 Total Local Replies: 191713 Percentage of Requests Served Locally: 64 <----Should be nonzero Percentage of Requests Served Remotely: 36 Average Time to Generate Local READ Reply (ms): 15 Average Time to Generate Local WRITE Reply (ms): 0 Average Time to Generate Local GETATTR Reply (ms): 0 Average Time to Generate Local Reply (ms): 0 Average Time to Receive Remote Reply (ms): 10 Meta-Data Cache Access Count: 206017 Meta-Data Cache Hit Count: 191673 Remaining Number Of Entries in Meta-Data Cache: 128926 Meta-Data Cache Hit Ratio: 93
可以使用show statistics connection optimized nfs detail命令檢視NFS連線統計資訊,如下所示:
WAE674# show stat conn opt nfs detail Connection Id: 1916 Peer Id: 00:14:5e:84:24:5f Connection Type: EXTERNAL CLIENT Start Time: Thu Jun 25 07:09:09 2009 Source IP Address: 10.10.10.20 Source Port Number: 928 Destination IP Address: 10.10.100.102 Destination Port Number: 2049 Application Name: File-System <-----Should see File-System Classifier Name: NFS <-----Should see NFS Map Name: basic Directed Mode: FALSE Preposition Flow: FALSE Policy Details: Configured: TCP_OPTIMIZE + DRE + LZ Derived: TCP_OPTIMIZE + DRE + LZ Peer: TCP_OPTIMIZE + DRE + LZ Negotiated: TCP_OPTIMIZE + DRE + LZ Applied: TCP_OPTIMIZE + DRE + LZ Accelerator Details: Configured: NFS <-----Should see NFS configured Derived: NFS Applied: NFS <-----Should see NFS applied Hist: None Original Optimized -------------------- -------------------- Bytes Read: 5120 4639 Bytes Written: 28136 1407 . . . NFS : 1916 Time Statistics were Last Reset/Cleared: Thu Jun 25 07:09:09 2009 Total Bytes Read: 5120 28136 Total Bytes Written: 28136 5120 Bit Flags for I/O state: 19 Histogram of Buffers Read From Local Endpoint: 31 1 0 0 0 Total NFS Requests: 32 Total Replies Served Locally: 4 Percentage of Requests Served Locally: 12 Percentage of Requests Served Remotely: 88 Average Time to Generate Local READ Reply (ms): 0 Average Time to Generate Local WRITE Reply (ms): 0 Average Time to Generate Local GETATTR Reply (ms): 0 Average Time to Generate Local Reply (ms): 0 Average Time to Receive Remote Reply (ms): 103 Total RPC Procedure Calls: 0 9 0 10 7 0 4 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 . . . Total Unknown RPC Procedure Calls: 0 Total Write RPCs Using Stable-how Enumerated Values: 0 0 1 Total WRITE RPCs with Invalid Stable-how Value: 0 Bytes Buffered for READ Purpose: 0 Start Time of Session: Thu Jun 25 07:09:09 2009 Meta-Data Cache Access Count: 9 Meta-Data Cache Hit Count: 4 Remaining Number Of Entries in Meta-Data Cache: 1000 Meta-Data Cache Hit Ratio: 44 Current number of entries in Meta-Data Cache: 0 . . .
以下日誌檔案可用於排除NFS AO問題:
為了更輕鬆地進行調試,您應該首先設定ACL以限制資料包只訪問一台主機。
WAE674(config)# ip access-list extended 150 permit tcp host 10.10.10.10 any WAE674(config)# ip access-list extended 150 permit tcp any host 10.10.10.10
要啟用事務日誌記錄,請使用transaction-logs configuration命令,如下所示:
wae(config)# transaction-logs flow enable wae(config)# transaction-logs flow access-list 150
您可以使用type-tail命令檢視事務日誌檔案的結尾。
要設定和啟用NFS AO的調試日誌記錄,請使用以下命令。
附註:調試日誌記錄是CPU密集型,可以生成大量輸出。在生產環境中慎重而謹慎地使用它。
您可以按如下方式啟用磁碟的詳細日誌記錄:
WAE674(config)# logging disk enable WAE674(config)# logging disk priority detail
您可以在ACL中啟用連線的調試日誌記錄,如下所示:
WAE674# debug connection access-list 150
NFS AO調試選項如下:
WAE674# debug accelerator nfs ? all enable all accelerator debugs async-write enable async write optimization debugs attributes-cache enable attributes-cache optimization debugs nfs-v3 enable NFSv3 layer debugs read-ahead enable read ahead optimization debugs rpc enable RPC layer debugs shell enable shell (infra) debugs utils enable utils debugs
您可以為NFS連線啟用調試日誌記錄,然後按如下方式顯示調試錯誤日誌的結束:
WAE674# debug accelerator nfs all WAE674# type-tail errorlog/nfsao-errorlog.current follow