卸載 CIFS 目錄:

卸載 CIFS 目錄:

我曾經遇過這樣的情況:windows的CIFS已經掛載到/home/external/backupLinux(RHAT7)上的目錄了。

另外,我還配置了一些備份系統,將檔案儲存到/home/backup目錄中。現在我無法更改備份路徑。 CIFS 掛載目錄也無法變更。

是否有能力將 CIFS 目錄掛載到現有home/backup目錄,以便備份可以儲存在 CIFS 目錄中?

答案1

你可以在 Redhat 知識庫中找到:紅帽

可以使用 mount 指令的 cifs 選項將 Windows 共用安裝在 RHEL 系統上,如下所示:

[root@host ~]# mount -t cifs -o username=<share user>,password=<share password> //WIN_PC_IP/<share name> /mnt

如果您的使用者位於 Windows 網域中,那麼您可以如下定義網域:

[root@host ~]# mount -t cifs -o username=<share user>,password=<share password>,domain=example.com //WIN_PC_IP/<share name> /mnt

編輯 如果缺少 Cifs 支持,請嘗試運行

yum 安裝 cifs-utils

答案2

執行此操作的唯一方法是使用以下命令卸載 CIFS 目錄,然後將其重新掛載到儲存備份檔案的目錄:

卸載 CIFS 目錄:

umount /mnt

將 CIFS 目錄掛載到儲存備份的資料夾:

mount -t cifs -o username=<share user>,password=<share password> //WIN_PC_IP/<share name> /home/backup

相關內容