線上書籍

Home

自建 samba + ZFS (snhpshot快照/任意還原點)檔案伺服器

  1. 將 原來 /home/samba/ 底下的所有目錄和檔案同步到 /zfs/samba/
    root@debian8:/# rsync -avP /home/samba/ /zfs/samba/
    sending incremental file list
    ./
    01-教導處/
    01-教導處/01-教務主任/
    01-教導處/02-教務組長/
    01-教導處/03-設備組長/
    01-教導處/04-訓導組長/

    sent 285 bytes  received 39 bytes  648.00 bytes/sec
    total size is 0  speedup is 0.00
    root@debian8:/#

     

  2. 修改 /etc/samba/smb.conf 的分享路徑 到 /samba
    root@debian8:/# pico /etc/samba/smb.conf
    [行政辦公]
            comment         =       行政辦公
            path                =       /home/samba       
    改為
    [行政辦公]
            comment         =       行政辦公
            path                =       /zfs/samba
    再按 Ctrl+O   , Enter   存檔, Ctrl + X 退出編輯器
     

  3. 重新啟動 samba 服務
    root@debian8:/# service smbd restart

    root@debian8:/# service smbd reload

    使用 testparm 查看參數