【AIX】AIX 开机自动挂载NFS共享

简介: AIX 开机自动挂载NFS共享 当Oracle搭建在AIX系统上,进行集中备份时,可能需要通过连接Backup server挂载NFS共享来讲数据备份到存储设备上。
AIX 开机自动挂载NFS共享

当Oracle搭建在AIX系统上,进行集中备份时,可能需要通过连接Backup server挂载NFS共享来讲数据备份到存储设备上。
在Linux环境下,如想实现NFS开机自动挂载,通常
只要在/etc/fstab中添加相应记录即可。

在AIX系统中,即使在相应目录/etc/filesystems中添加了对应挂载信息并设置mount参数为true,有时也难以实现开机自动挂载。
本文通过实验,解决AIX挂载NFS共享时报错:Vmount:Not owner 问题,并实现AIX环境下开机自动挂载Linux NFS共享。

【实验环境

NFS客户端  操作系统: AIX 5300-09
NFS服务器 操作系统:RHEL 5.4


【实验背景

进行oracle数据库集中备份时,Backup Server (rhel)连接到磁盘阵列。然后通过NFS共享存储空间供各个数据库服务器存储备份文件。
各数据库服务器(AIX系统)作为客户端挂载对应NFS共享,即可备份时通过Backup Server将备份文件存储在阵列上。


与Linux系统不同,当AIX作为NFS客户端,挂载NFS共享时,需调整AIX默认网络参数。
若想实现开机启动,必须将网络参数值写入nextboot file。

【实验过程


1、查看NFS共享

showmount -e rhel152 | grep aix227

共享存储的位置为 rhel152:/backup/cuug02/storage03

2、编辑/etc/filesystems

vi /etc/filesystems



mount=true 即开机自动挂载

3、手工mount报错

mount /backup


咦?linux系统中只要做类似配置,即可成功挂载,到了AIX系统怎么就不行了呢?
难道是编辑的配置有问题?

4、使用smit查看相应配置

为验证NFS的配置信息,删除/etc/filesystems中所添加信息,使用smit nfs 重新进行配置


下图陪配置信息中
/etc/filesystems entry will mount the directory on system restart   选项  设置为  yes    
即 开机自动挂载


配置完毕后 回车 显示 failed 
仍然报错,Not owner



5、调整默认网路参数

查看相关资料,出现此报错信息,需要调整AIX默认网络参数
nfso -o nfs_use_reserved_ports=1


调整完毕后再次手动挂载无报错信息
mount /backup
df -g查看,已成功挂载NFS服务器共享目录到本地文件系统




6、重启AIX系统验证

上面手动挂载成功后,还需重启AIX系统看是否能够实现开机自动挂载
shutdown -Fr 重启AIX系统


7、重启后手工mount再次失败

重启后查看NFS未成功挂载,手工mount失败,依然报相同错


smit nfs查看相关信息,开机挂载选项的确是yes


从上面报错信息看出,还是网络参数需要调整。
那如果每次挂载前都需要调整,就无法实现开机自动挂载了。
能不能将此参数设置为永久生效呢?

8、查看nfso 相关参数

man nfso 查看nfso命令手册 其中-o  和 -p 参数介绍如下


  1. -o Tunable[ =NewValue ]
  2. Displays the value or sets Tunable to NewValue. If a tunable needs to be changed (the specified value is different
  3. than current value), and is of type Bosboot or Reboot, or if it is of type Incremental and its current value is bigger
  4. than the specified value, and -r is not used in combination, it will not be changed but a warning displays instead.
  5. When -r is used in combination without a new value, the nextboot value for the Tunable displays. When -p is used in
  6. combination without a NewValue, a value displays only if the current and next boot values for the Tunable are the
  7. same. Otherwise NONE displays as the value.

  8. -p
  9. Makes changes apply to both current and reboot values, when used in combination with -o, -d or -D, that is, it turns
  10. on the updating of the /etc/tunables/nextboot file in addition to the updating of the current value. These
  11. combinations cannot be used on Reboot and Bosboot type parameters because their current value cannot be changed.
  12. When used with -a or -o without specifying a new value, values are displayed only if the current and next boot values
  13. for a parameter are the same. Otherwise NONE displays as the value.

从上面看出,使用-p 参数结合-o 或者-d 、-D,不仅可以更新当前值,还可以写入 /etc/tunables/nextboot 文件,同时修改当前值和reboot后的值。

9、重新设置网络参数

nfso -p -o nfs_use_reserved_ports=1

提示信息显示写入了nextboot file
查看/etc/tunables/nextboot 新增加我们刚刚设置的参数


手动mount,挂载NFS成功不报错

10、重启查验,自动挂载成功

shutdonw -Fr 再次重启AIX系统查验
自动挂载NFS成功,实现了AIX系统开机自动挂载NFS



11、查看网络参数及nextbootfile


查看/etc/tunables/nextboot 文件,发现有我们为安装oracle而调整的参数,还有刚刚为挂载nfs而设置的nfs_use_reserved_ports参数



使用nfso -L命令,以图表方式查看网络参数
其中挂载nfs需修改的网络参数nfs_use_reserved_ports参数,当前值是1,默认值是0

  1. [root@aix227:/]#nfso -L
  2. NAME CUR DEF BOOT MIN MAX UNIT TYPE
  3. DEPENDENCIES
  4. --------------------------------------------------------------------------------
  5. portcheck 0 0 0 0 1 On/Off D
  6. --------------------------------------------------------------------------------
  7. udpchecksum 1 1 1 0 1 On/Off D
  8. --------------------------------------------------------------------------------
  9. nfs_socketsize 600000 600000 600000 40000 1280K Bytes D
  10. --------------------------------------------------------------------------------
  11. nfs_tcp_socketsize 600000 600000 600000 40000 1280K Bytes D
  12. --------------------------------------------------------------------------------
  13. nfs_setattr_error 0 0 0 0 1 On/Off D
  14. --------------------------------------------------------------------------------
  15. nfs_gather_threshold 4K 4K 4K 512 8K+1 Bytes D
  16. --------------------------------------------------------------------------------
  17. nfs_repeat_messages 0 0 0 0 1 On/Off D
  18. --------------------------------------------------------------------------------
  19. nfs_udp_duplicate_cache_size
  20. 5000 5000 5000 5000 100000 Req I
  21. --------------------------------------------------------------------------------
  22. nfs_tcp_duplicate_cache_size
  23. 5000 5000 5000 5000 100000 Req I
  24. --------------------------------------------------------------------------------
  25. nfs_server_base_priority 0 0 0 31 125 Pri D
  26. --------------------------------------------------------------------------------
  27. nfs_dynamic_retrans 1 1 1 0 1 On/Off D
  28. --------------------------------------------------------------------------------
  29. nfs_iopace_pages 0 0 0 0 64K-1 Pages D
  30. --------------------------------------------------------------------------------
  31. nfs_max_connections 0 0 0 0 10000 Number D
  32. --------------------------------------------------------------------------------
  33. nfs_max_threads 3891 3891 3891 5 3891 Threads D
  34. --------------------------------------------------------------------------------
  35. nfs_use_reserved_ports 1 0 1 0 1 On/Off D
  36. --------------------------------------------------------------------------------
  37. nfs_device_specific_bufs 1 1 1 0 1 On/Off D
  38. --------------------------------------------------------------------------------
  39. nfs_server_clread 1 1 1 0 1 On/Off D
  40. --------------------------------------------------------------------------------
  41. nfs_rfc1323 0 0 0 0 1 On/Off D
  42. --------------------------------------------------------------------------------
  43. nfs_max_write_size 32K 32K 32K 512 64K Bytes D
  44. --------------------------------------------------------------------------------
  45. nfs_max_read_size 32K 32K 32K 512 64K Bytes D
  46. --------------------------------------------------------------------------------
  47. nfs_allow_all_signals 0 0 0 0 1 On/Off D
  48. --------------------------------------------------------------------------------
  49. nfs_v2_pdts 1 1 1 1 8 PDTs M
  50. --------------------------------------------------------------------------------
  51. nfs_v3_pdts 1 1 1 1 8 PDTs M
  52. --------------------------------------------------------------------------------
  53. nfs_v2_vm_bufs 10000 10000 10000 512 50000 Bufs I
  54. --------------------------------------------------------------------------------
  55. nfs_v3_vm_bufs 10000 10000 10000 512 50000 Bufs I
  56. --------------------------------------------------------------------------------
  57. nfs_securenfs_authtimeout 0 0 0 0 60 Seconds D
  58. --------------------------------------------------------------------------------
  59. nfs_v3_server_readdirplus 1 1 1 0 1 On/Off D
  60. --------------------------------------------------------------------------------
  61. lockd_debug_level 0 0 0 0 10 Level D
  62. --------------------------------------------------------------------------------
  63. statd_debug_level 0 0 0 0 10 Level D
  64. --------------------------------------------------------------------------------
  65. statd_max_threads 50 50 50 1 1000 Threads D
  66. --------------------------------------------------------------------------------
  67. nfs_v4_fail_over_timeout 0 0 0 0 3600 Seconds D
  68. --------------------------------------------------------------------------------
  69. utf8_validation 1 1 1 0 1 On/Off D
  70. --------------------------------------------------------------------------------
  71. nfs_v4_pdts 1 1 1 1 8 PDTs M
  72. --------------------------------------------------------------------------------
  73. nfs_v4_vm_bufs 10000 10000 10000 512 50000 Bufs I
  74. --------------------------------------------------------------------------------
  75. server_delegation 1 1 1 0 1 On/Off D
  76. --------------------------------------------------------------------------------
  77. nfs_auto_rbr_trigger 0 0 0 -1 1M MB D
  78. --------------------------------------------------------------------------------
  79. client_delegation 1 1 1 0 1 On/Off D
  80. --------------------------------------------------------------------------------
  81. n/a means parameter not supported by the current platform or kernel
  82. Parameter types:
  83. S = Static: cannot be changed
  84. D = Dynamic: can be freely changed
  85. B = Bosboot: can only be changed using bosboot and reboot
  86. R = Reboot: can only be changed during reboot
  87. C = Connect: changes are only effective for future socket connections
  88. M = Mount: changes are only effective for future mountings
  89. I = Incremental: can only be incremented
  90. Value conventions:
  91. K = Kilo: 2^10 G = Giga: 2^30 P = Peta: 2^50
  92. M = Mega: 2^20 T = Tera: 2^40 E = Exa: 2^60
  93. [root@aix227:/]#


【实验总结

1、AIX系统挂载NFS共享,需要设置默认网络参数nfs_use_reserved_ports值修改为1.
2、如想实现AIX开机自动挂载NFS,不仅要在/etc/filesystems中设置mount=true,还需要将nfs_use_reserved_ports=1写入nextboot file /etc/tunables/nextboot
3、Linux系统默认nfs_use_reserved_ports参数值为1,AIX系统中此参数默认值为0;故linux系统中只需配置好/etc/fstab即可实现开机自动挂载。


吕星昊
2014.8.12




目录
相关文章
|
7月前
|
域名解析 Unix Linux
AIX上如何正确挂载Linux 的nfs共享目录分享篇
AIX上如何正确挂载Linux 的nfs共享目录分享篇
313 1
|
7月前
|
Unix
AIX 配置NFS记要
AIX 配置NFS记要
78 0
|
Linux
Linux系统之使用autofs自动挂载nfs共享
Linux系统之使用autofs自动挂载nfs共享
236 1
如何将光驱mount到文件系统中- Linux
如何将光驱mount到文件系统中- Linux
|
存储 Linux 数据安全/隐私保护
Linux iscsi挂载
yum install -y iscsi* /etc/iscsi/iscsi.conf iscsid.startup = /bin/systemctl start iscsid.
1799 0

相关实验场景

更多