AIX 開(kāi)機(jī)自動(dòng)掛載NFS共享
當(dāng)Oracle搭建在AIX系統(tǒng)上,進(jìn)行集中備份時(shí),可能需要通過(guò)連接Backup server掛載NFS共享來(lái)講數(shù)據(jù)備份到存儲(chǔ)設(shè)備上。
在Linux環(huán)境下,如想實(shí)現(xiàn)NFS開(kāi)機(jī)自動(dòng)掛載,通常只要在/etc/fstab中添加相應(yīng)記錄即可。
在AIX系統(tǒng)中,即使在相應(yīng)目錄/etc/filesystems中添加了對(duì)應(yīng)掛載信息并設(shè)置mount參數(shù)為true,有時(shí)也難以實(shí)現(xiàn)開(kāi)機(jī)自動(dòng)掛載。
本文通過(guò)實(shí)驗(yàn),解決AIX掛載NFS共享時(shí)報(bào)錯(cuò):Vmount:Not owner 問(wèn)題,并實(shí)現(xiàn)AIX環(huán)境下開(kāi)機(jī)自動(dòng)掛載Linux NFS共享。
NFS客戶端 操作系統(tǒng):AIX 5300-09
NFS服務(wù)器 操作系統(tǒng):RHEL 5.4
進(jìn)行oracle數(shù)據(jù)庫(kù)集中備份時(shí),Backup Server (rhel)連接到磁盤(pán)陣列。然后通過(guò)NFS共享存儲(chǔ)空間供各個(gè)數(shù)據(jù)庫(kù)服務(wù)器存儲(chǔ)備份文件。
各數(shù)據(jù)庫(kù)服務(wù)器(AIX系統(tǒng))作為客戶端掛載對(duì)應(yīng)NFS共享,即可備份時(shí)通過(guò)Backup Server將備份文件存儲(chǔ)在陣列上。
與Linux系統(tǒng)不同,當(dāng)AIX作為NFS客戶端,掛載NFS共享時(shí),需調(diào)整AIX默認(rèn)網(wǎng)絡(luò)參數(shù)。
若想實(shí)現(xiàn)開(kāi)機(jī)啟動(dòng),必須將網(wǎng)絡(luò)參數(shù)值寫(xiě)入nextboot file。
showmount -e rhel152 | grep aix227
共享存儲(chǔ)的位置為 rhel152:/backup/cuug02/storage03
vi /etc/filesystems
mount /backup
咦?linux系統(tǒng)中只要做類似配置,即可成功掛載,到了AIX系統(tǒng)怎么就不行了呢?
難道是編輯的配置有問(wèn)題?
為驗(yàn)證NFS的配置信息,刪除/etc/filesystems中所添加信息,使用smit nfs 重新進(jìn)行配置
下圖陪配置信息中
/etc/filesystems entry will mount the directory on system restart 選項(xiàng) 設(shè)置為 yes
即 開(kāi)機(jī)自動(dòng)掛載
配置完畢后 回車(chē) 顯示 failed
仍然報(bào)錯(cuò),Not owner
查看相關(guān)資料,出現(xiàn)此報(bào)錯(cuò)信息,需要調(diào)整AIX默認(rèn)網(wǎng)絡(luò)參數(shù)
nfso -o nfs_use_reserved_ports=1
調(diào)整完畢后再次手動(dòng)掛載無(wú)報(bào)錯(cuò)信息
mount /backup
df -g查看,已成功掛載NFS服務(wù)器共享目錄到本地文件系統(tǒng)
上面手動(dòng)掛載成功后,還需重啟AIX系統(tǒng)看是否能夠?qū)崿F(xiàn)開(kāi)機(jī)自動(dòng)掛載
shutdown -Fr 重啟AIX系統(tǒng)
重啟后查看NFS未成功掛載,手工mount失敗,依然報(bào)相同錯(cuò)
smit nfs查看相關(guān)信息,開(kāi)機(jī)掛載選項(xiàng)的確是yes
從上面報(bào)錯(cuò)信息看出,還是網(wǎng)絡(luò)參數(shù)需要調(diào)整。
那如果每次掛載前都需要調(diào)整,就無(wú)法實(shí)現(xiàn)開(kāi)機(jī)自動(dòng)掛載了。
能不能將此參數(shù)設(shè)置為永久生效呢?
man nfso 查看nfso命令手冊(cè) 其中-o 和 -p 參數(shù)介紹如下
-o Tunable[ =NewValue ]
Displays the value or sets Tunable to NewValue. If a tunable needs to be changed (the specified value is different
than current value), and is of type Bosboot or Reboot, or if it is of type Incremental and its current value is bigger
than the specified value, and -r is not used in combination, it will not be changed but a warning displays instead.
When -r is used in combination without a new value, the nextboot value for the Tunable displays. When -p is used in
combination without a NewValue, a value displays only if the current and next boot values for the Tunable are the
same. Otherwise NONE displays as the value.
-p
Makes changes apply to both current and reboot values, when used in combination with -o, -d or -D, that is, it turns
on the updating of the /etc/tunables/nextboot file in addition to the updating of the current value. These
combinations cannot be used on Reboot and Bosboot type parameters because their current value cannot be changed.
When used with -a or -o without specifying a new value, values are displayed only if the current and next boot values
for a parameter are the same. Otherwise NONE displays as the value.
nfso -p -o nfs_use_reserved_ports=1
提示信息顯示寫(xiě)入了nextboot file
查看/etc/tunables/nextboot 新增加我們剛剛設(shè)置的參數(shù)
手動(dòng)mount,掛載NFS成功不報(bào)錯(cuò)
shutdonw -Fr 再次重啟AIX系統(tǒng)查驗(yàn)
自動(dòng)掛載NFS成功,實(shí)現(xiàn)了AIX系統(tǒng)開(kāi)機(jī)自動(dòng)掛載NFS
查看/etc/tunables/nextboot 文件,發(fā)現(xiàn)有我們?yōu)榘惭boracle而調(diào)整的參數(shù),還有剛剛為掛載nfs而設(shè)置的nfs_use_reserved_ports參數(shù)
使用nfso -L命令,以圖表方式查看網(wǎng)絡(luò)參數(shù)
其中掛載nfs需修改的網(wǎng)絡(luò)參數(shù)nfs_use_reserved_ports參數(shù),當(dāng)前值是1,默認(rèn)值是0
[root@aix227:/]#nfso -L
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
--------------------------------------------------------------------------------
portcheck 0 0 0 0 1 On/Off D
--------------------------------------------------------------------------------
udpchecksum 1 1 1 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_socketsize 600000 600000 600000 40000 1280K Bytes D
--------------------------------------------------------------------------------
nfs_tcp_socketsize 600000 600000 600000 40000 1280K Bytes D
--------------------------------------------------------------------------------
nfs_setattr_error 0 0 0 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_gather_threshold 4K 4K 4K 512 8K+1 Bytes D
--------------------------------------------------------------------------------
nfs_repeat_messages 0 0 0 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_udp_duplicate_cache_size
5000 5000 5000 5000 100000 Req I
--------------------------------------------------------------------------------
nfs_tcp_duplicate_cache_size
5000 5000 5000 5000 100000 Req I
--------------------------------------------------------------------------------
nfs_server_base_priority 0 0 0 31 125 Pri D
--------------------------------------------------------------------------------
nfs_dynamic_retrans 1 1 1 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_iopace_pages 0 0 0 0 64K-1 Pages D
--------------------------------------------------------------------------------
nfs_max_connections 0 0 0 0 10000 Number D
--------------------------------------------------------------------------------
nfs_max_threads 3891 3891 3891 5 3891 Threads D
--------------------------------------------------------------------------------
nfs_use_reserved_ports 1 0 1 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_device_specific_bufs 1 1 1 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_server_clread 1 1 1 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_rfc1323 0 0 0 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_max_write_size 32K 32K 32K 512 64K Bytes D
--------------------------------------------------------------------------------
nfs_max_read_size 32K 32K 32K 512 64K Bytes D
--------------------------------------------------------------------------------
nfs_allow_all_signals 0 0 0 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_v2_pdts 1 1 1 1 8 PDTs M
--------------------------------------------------------------------------------
nfs_v3_pdts 1 1 1 1 8 PDTs M
--------------------------------------------------------------------------------
nfs_v2_vm_bufs 10000 10000 10000 512 50000 Bufs I
--------------------------------------------------------------------------------
nfs_v3_vm_bufs 10000 10000 10000 512 50000 Bufs I
--------------------------------------------------------------------------------
nfs_securenfs_authtimeout 0 0 0 0 60 Seconds D
--------------------------------------------------------------------------------
nfs_v3_server_readdirplus 1 1 1 0 1 On/Off D
--------------------------------------------------------------------------------
lockd_debug_level 0 0 0 0 10 Level D
--------------------------------------------------------------------------------
statd_debug_level 0 0 0 0 10 Level D
--------------------------------------------------------------------------------
statd_max_threads 50 50 50 1 1000 Threads D
--------------------------------------------------------------------------------
nfs_v4_fail_over_timeout 0 0 0 0 3600 Seconds D
--------------------------------------------------------------------------------
utf8_validation 1 1 1 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_v4_pdts 1 1 1 1 8 PDTs M
--------------------------------------------------------------------------------
nfs_v4_vm_bufs 10000 10000 10000 512 50000 Bufs I
--------------------------------------------------------------------------------
server_delegation 1 1 1 0 1 On/Off D
--------------------------------------------------------------------------------
nfs_auto_rbr_trigger 0 0 0 -1 1M MB D
--------------------------------------------------------------------------------
client_delegation 1 1 1 0 1 On/Off D
--------------------------------------------------------------------------------
n/a means parameter not supported by the current platform or kernel
Parameter types:
S = Static: cannot be changed
D = Dynamic: can be freely changed
B = Bosboot: can only be changed using bosboot and reboot
R = Reboot: can only be changed during reboot
C = Connect: changes are only effective for future socket connections
M = Mount: changes are only effective for future mountings
I = Incremental: can only be incremented
Value conventions:
K = Kilo: 2^10 G = Giga: 2^30 P = Peta: 2^50
M = Mega: 2^20 T = Tera: 2^40 E = Exa: 2^60
[root@aix227:/]#
1、AIX系統(tǒng)掛載NFS共享,需要設(shè)置默認(rèn)網(wǎng)絡(luò)參數(shù)nfs_use_reserved_ports值修改為1.
2、如想實(shí)現(xiàn)AIX開(kāi)機(jī)自動(dòng)掛載NFS,不僅要在/etc/filesystems中設(shè)置mount=true,還需要將nfs_use_reserved_ports=1寫(xiě)入nextboot file/etc/tunables/nextboot
3、Linux系統(tǒng)默認(rèn)nfs_use_reserved_ports參數(shù)值為1,AIX系統(tǒng)中此參數(shù)默認(rèn)值為0;故linux系統(tǒng)中只需配置好/etc/fstab即可實(shí)現(xiàn)開(kāi)機(jī)自動(dòng)掛載。
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。