27 41 64 68 92 138 149 175 177 184 203 209 261 293 311 314 317 426 444 459 482 519 581 590 592 598 606 665 710 758 760 794 811 830 856 859 878 887 912 947 981 984 987 997 1017 1036 1063 1082 1083 1118 1137 1148 1185 1206 1208 1209 1231 1239 1258 1288 1303 1306 1315 1382 1385 1413 1477 1506 1507 1522 1528 1553 1581 1586 1642 1647 1681 1723 1738 1849 1854 1876 1891 1906 1913 1925 1950 1973 1983 1986 1993 2012 2023 2025 2075 2107 2180 2187 2191 2230 2240 2288 2318 2338 2401 2405 2414 2426 2441 2457 2498 2509 2514 2518 2548 2558 2605 2615 2622 2632 2670 2683 2692 2699 2715 2797 2811 2831 2836 2881 2944 2952 2974 2977 2987 2999 3008 3011 3033 3051 3088 3096 3188 3224 3278 3287 3317 3328 3334 3338 3375 3380 3382 3388 3404 3454 3475 3477 3498 3501 3509 3516 3531 3585 3587 3590 3608 3627 3631 3670 3681 3690 3697 3713 3753 3756 3758 3772 3773 3780 3797 3800 3841 3866 3902 3908 3909 3932 3972 4010 4031 4068 4072 4099 4129 4159 4183 4185 4193 4243 4246 4249 4264 4269 4272 4295 4314 4324 4361 4383 4422 4477 4480 4508 4537 4553 4574 4579 4585 4600 4604 4650 4676 4680 4704 4709 4724 4730 4756 4816 4832 4835 4839 4850 4870 4875 4884 4886 4939 4976 4982 5029 5039 5053 5068 5077 5079 5119 5124 5137 5151 5161 5166 5168 5207 5262 5266 5281 5323 5333 5339 5356 5371 5407 5412 5420 5430 5436 5551 5555 5572 5591 5601 5614 5643 5650 5670 5696 5705 5727 5737 5762 5814 5829 5837 5860 5933 5958 5970 6026 6048 6051 6056 6091 6101 6103 6107 6154 6185 6200  【AIX】AIX 开机自动挂载NFS共享
英语文化交流 > 技术博客 > 【AIX】AIX 开机自动挂载NFS共享
【AIX】AIX 开机自动挂载NFS共享
时间:2017-10-12 11:19 爱生活的小白 分类:技术博客

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即可实现开机自动挂载。


随机阅读

Copyright © 2017 英语文化交流 All Rights Reserved.