Hero Image
NFS

NFS Local-like File Access 類本地讀寫 Network FileSystem 網路檔案系統,NFS 是一種讓多台電腦可以像操作本地硬碟一樣訪問遠端檔案的系統。 是一種 RPC Service(Remote Procedure Call),當你用 NFS 讀寫檔案時,客戶端其實是在透過 RPC 向伺服器發送「打開檔案」「讀檔案」「寫檔案」這些遠端操作的請求, Dynamic Port Allocation 動態端口 容器配置不需要額外維護 port export,rpcbind 會自動協調服務所使用的 TCP/UDP port,並且同一個 network 內的容器可以直接訪問這些 port;若存在防火牆或跨主機通信時,則需要額外開通對應 port,配置相對複雜。 Server/Client 伺服器/客戶端 因為是一種 RPC Service,所以會有兩種角色 Server、Client 就像 FileZilla 也是,你要遠端可以 FileZilla 連到,你需要在 target server 安裝 FileZilla server 或其他 ftp 類型 server on 著 listening ( 持續運行以監聽連線請求 ) 當 server 啟用時,可以讓服務跨 os、跨 server,同步讀取、寫入本地檔案。 ┌─────────────────┐ 網路 ┌─────────────────┐ │ NFS Server │ <─────────────────> │ NFS Client │ │ (141) │ │ (142) │ │ │ │ │ │ /nfs (實體目錄) │ ─────匯出(export)──> │ /nfs (掛載點) │ │ chmod 777 │ │ mount 後可存取 │ └─────────────────┘ └─────────────────┘ 安裝 Windows 啟用 server/client 開啟或關閉 Windows 功能