Linux 上配置、使用NFS
如果使用NFS儲存Oracle資料庫的資料檔案,直接跳過下面的配置,參考文章最後的“參考文章”內容,如果用於儲存普通檔案即參考如下配置:
一.伺服器端配置:
1.檢視是否安裝了nfs-utils portmap包:
#rpm -qa nfs-utils portmap (客戶端和伺服器端都需要安裝這兩個包)
portmap-4.0-65.2.2.1
nfs-utils-1.0.9-42.el5
注意:redhat 6開始沒有portmap這個包。
如果未安裝,需要安裝這2個包。
2.建立NFS儲存:
建立單獨分割槽mount到/testnfs,或者直接在根目錄下建立testnfs資料夾。
3.提供NFS服務:
編輯/etc/exports檔案
加入
/testnfs *(rw,sync,no_wdelay,insecure_locks,no_root_squash)
4.重啟portmap和nfs服務:
#service portmap restart
#service nfs restart
二.客戶端配置:
1.建立掛載的目錄:
在根目錄下建立testnfs資料夾。
2.將遠端伺服器的目錄掛載到本地:
#mount 172.168.6.112:/testnfs /testnfs
3.檢查是否掛載成功:
#mount
172.168.6.112:/testnfs on /testnfs type nfs (rw,addr=172.168.6.112)
4.設定啟動掛載:
編輯/etc/fstab
加入
172.168.6.112:/testnfs /testnfs nfs rw,addr=172.168.6.112 0 0
如果想進一步瞭解NFS的引數含義,可以在Linux平臺執行man nfs檢視相關的內容,如下常見引數含義:
soft If an NFS file operation has a major timeout then report an I/O error to the calling program. The default is to continue retrying NFS file operations indefinitely.
hard If an NFS file operation has a major timeout then report "server not responding" on the console and continue retrying indefinitely. This is the default.
intr If an NFS file operation has a major timeout and it is hard mounted, then allow signals to interupt the file operation and cause it to return EINTR to the calling program. The default is to not allow file operations to be interrupted.
5.在NFS伺服器端使用showmount命令檢查客戶端MOUNT情況:
>顯示NFS客戶端資訊
#showmount
>顯示指定NFS伺服器連線NFS客戶端的資訊
#showmount 192.168.1.1 #此ip為nfs伺服器的
>顯示輸出目錄列表
#showmount -e
>顯示指定NFS伺服器輸出目錄列表(也稱為共享目錄列表)
#showmount -e 192.168.1.1
>顯示被掛載的共享目錄
#showmount -d
>顯示客戶端資訊和共享目錄
#showmount -a
>顯示指定NFS伺服器的客戶端資訊和共享目錄
#showmount -a 192.168.1.1
6.測試:
在兩臺機器上對這個資料夾下的檔案進行讀寫操作測試。
至此,linux下的nfs簡單配置就完成了。
參考文章:
《Mount Options for Oracle files when used with NFS on NAS devices (文件 ID 359515.1)》:http://blog.itpub.net/23135684/viewspace-625315/
如果是11gR2 RAC在Linux平臺使用NFS的話,請參考文章:http://space.itpub.net/23135684/viewspace-734873/
--end--
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-624541/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- AIX 上配置、使用NFSAINFS
- linux NFS 配置LinuxNFS
- linux配置nfsLinuxNFS
- Oracle Linux 6.4配置NFSOracleLinuxNFS
- linux下nfs的配置LinuxNFS
- Linux伺服器---配置nfsLinux伺服器NFS
- Linux伺服器—配置nfsLinux伺服器NFS
- Linux-NFS——配置過程LinuxNFS
- linux Direct NFS配置介紹LinuxNFS
- linux 配置nfs(rman 備份)LinuxNFS
- 【NFS】Linux配置NFS共享常用SQL指令碼目錄NFSLinuxSQL指令碼
- AIX下配置NFS共享給LINUXAINFSLinux
- Linux配置NFS實現檔案共享LinuxNFS
- 配置基於LINUX的NFS掛載LinuxNFS
- linux中配置NFS服務step by stepLinuxNFS
- 在AIX 5L上配置NFS Server/ClientAINFSServerclient
- NFS介紹、NFS服務端安裝配置、NFS配置選項NFS服務端
- linux as4下NFS配置注意事項LinuxNFS
- Linux系統配置NFS檔案共享服務LinuxNFS
- Linux CentOS 檔案共享NFS的安裝配置LinuxCentOSNFS
- 配置NFS固定埠NFS
- nfs配置 /etc/exportsNFSExport
- linux nfsLinuxNFS
- CentOS 6.X 上安裝配置 NFS 目錄共享CentOSNFS
- 配置nfs伺服器NFS伺服器
- AIX平臺NFS配置AINFS
- NFS文件(FOR LINUX)NFSLinux
- linux_批次安裝配置檔案_dhcpd_tftp_nfsLinuxFTPNFS
- AIX中Mount Redhat Linux上的nfs檔案系統AIRedhatLinuxNFS
- NFS服務配置總結NFS
- AIX配置NFS注意事項AINFS
- hpux nfs配置一例UXNFS
- CentOS 7 安裝配置 NFSCentOSNFS
- Linux下搭建 NFSLinuxNFS
- linux nfs實踐LinuxNFS
- Linux上使用HAProxy配置HTTP負載均衡系統LinuxHTTP負載
- Linux伺服器上配置 sudo 及 sudo命令使用Linux伺服器
- 【NFS】linux NFS "unmatched host" 異常小測試NFSLinux