Windows Previous Versions and Samba

    • OMV 1.0
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Windows Previous Versions and Samba

      You can ask questions or comments here for this guide

      Windows Previous Versions and Samba (btrfs - Atomic COW - volume shadow copy)
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10 broadcast channel
      openmediavault discord server

      The post was edited 1 time, last by subzero79 ().

    • Hi,
      i'm following the guide but after finishing all the passages (without errors), i can't see any previous version of the file.
      I have tried with OMV 1.19 and with the Testing 2.0.13 with no success.I have also tried with protected storage (user with password) and unprotected storage (guest allowed).
      All the test are done in a virtual machine with 2 drives, 1 is the system drive e 1 is the storage drive.
      Any ideas?
    • There is an inconsistency in the guide, the snapshot generation line is

      btrfs subvolume snapshot –r /media/uuid/@Documents /media/uuid/@Documents/.snapshots/@GMT-`date +%Y.%m.%d-%H.%M.%S`

      it should be like

      btrfs subvolume snapshot –r /media/uuid/@Documents /media/uuid/@Documents/.snapshots/@GMT_`date +%Y.%m.%d-%H.%M.%S`

      changed GMT- to GMT_ to match the extra options in samba

      Already changed that in the guide, it should work now, if you rename your snapshots using the underscore
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10 broadcast channel
      openmediavault discord server
    • Should this still work with Windows 10?
      I just tried a quick test and I am not seeing any previous versions. In the UI in Windows, it says previous versions come from File History or system restore points.

      I created a subvolume, shared it, put a file in it, snapped it, changed it.
      I did have the extra options in my smb.conf for the share, but I used a custom format, not the default, and I used the snapdir and basedir options with absolute paths to keep the snapshots outside of the subvolume.

      Source Code

      1. basedir /media/data/test
      2. snapdir /media/data/.snapshots/test

      This should work from the docs, as far as I can see...

      How long before previous versions show up, is it instant?

      Just realised, /media/data is a symlink to /media/<UUID> - maybe that is a problem? Has anyone experienced that? Will test it later if not.
    • yep, Ive created a Filesystem (ZFS) for each user, enabled the home directorys and also tried to edit the "30homes" in the mkconf folder. After Ive added the lines, mentioned in your How-To, the users cant access their home folder.

      EDIT: Sorry, Ive not added the lines from your How-To....
      I used lines from here:

      Source Code

      1. vfs objects = shadow_copy2
      2. shadow: snapdir = .zfs/snapshot
      3. shadow: sort = desc
      4. shadow: format = AutoH-%Y-%m-%dT%H:%M

      Oh... and it is working when I set it for each normal share, but not for the home shares.

      The post was edited 8 times, last by Sunsheep ().

    • Hi!

      Thanks a lot for this,

      is this also possible for a union filesystem of btrfs?

      I have 4 drives, 2 TB, 2 TB, 3 TB, 3 TB,
      all are with btrfs formatted and added to a snapraid. (for the parity and data recovery if one drive is broken)

      i like to have one great pool of 7 TB, and in this pool i like to have several shared folders for:


      and i like for each of this share a snapshot possibility for samba...
      is this possible? how should i configurate? i tried your guid for anpshots only with a pool of mkfs-btrfs /dev/sda /dev/sdb
      but in omv3 it was not possible to add this for acl / shared folders. :(

      I am using omv3, and backport kernel
    • The problem is
      i can't add via omv webinterace a shared folder which is on a disk created by mkfs.btrfs /dev/sda /dev/sdb /dev/sdc


      I tried the last days a lot of btrfs, omv shared folders and snapshots,
      and in no configuration it worked. :(
      my linux knowledge also is very very bad. :(

      maybe, it could work by manually add the device via the /etc/openmediavault/config.xml in the mnt section,
      but I don't know how to add this here. :(
    • I have 1 TB + 1 TB + 2 TB + 2 TB

      mkfs.btrfs -d single /dev/disk/by-id/ata-ST31000524AS_6VPGPJ9W /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_56JUEJ1MS /dev/disk/by-id/ata-WDC_WD20EADS-22R6B0_WD-WCAVY5199117

      Every drives are now in /dev/sdc 3,7T 17M 3,7T 1% /media/0c445189-73fb-4eb2-9d3f-d498224a0d25
      1 TB + 1 TB + 2 TB

      After: Going to the path in media and using btrfs subvolume create /media/0c445189-73fb-4eb2-9d3f-d498224a0d25/storagepool and btrfs subvolume create /media/0c445189-73fb-4eb2-9d3f-d498224a0d25/storagepool/.snapshots

      Trying to test snapshots with btrfs: btrfs subvolume snapshot –r /media/0c445189-73fb-4eb2-9d3f-d498224a0d25/storagepool /media/0c445189-73fb-4eb2-9d3f-d498224a0d25/storagepool/.snapshots/@GMT_`date +%Y.%m.%d-%H.%M.%S`



      1. btrfs subvolume snapshot: too many arguments
      2. usage: btrfs subvolume snapshot [-r] <source> <dest>|[<dest>/]<name>
      3. btrfs subvolume snapshot [-r] [-i <qgroupid>] <source> <dest>|[<dest>/]<name>
      4. Create a snapshot of the subvolume
      5. Create a writable/readonly snapshot of the subvolume <source> with
      6. the name <name> in the <dest> directory. If only <dest> is given,
      7. the subvolume will be named the basename of <source>.
      8. -r create a readonly snapshot
      9. -i <qgroupid> add the newly created snapshot to a qgroup. This
      10. option can be given multiple times.

      btrfs subvolume list /media/0c445189-73fb-4eb2-9d3f-d498224a0d25 returns:


      1. ID 261 gen 19 top level 5 path storagepool
      2. ID 262 gen 19 top level 261 path storagepool/.snapshots

      I don't know, what the problem is... maybe it does not work with a union drive, even if its done with mkfs.btrfs -single
    • Ok

      maybe, I have a solutions now, for the snapshot working... :)

      I've made a mkfs.btrfs -L MyStorage -d single /dev/sda /dev/sdc /dev/sdd
      (sdb is my system, usb hdd, don't know why, but OMV did it as /dev/sdb)

      So I have a /dev/sda 3,7T 17M 3,7T

      Now, using OMV Webinterface for mounting it via Filesystem, and setting ACL, like in the guide...

      Then via shell, navigating into:
      cd /media/xxxxxxx-xxx-xxx-xxx-xxx-xxxxxxxxxxx

      Here I can create subvolumes, e.g.:
      btrfs subvolume create Movies
      btrfs subvolume create Movies/.snapshots

      btrfs subvolume snapshot -r Movies/ Movies/.snapshots/@GMT_`date +%Y.%m.%d-%H.%M.%S`
      (again, in the folder via ssh)

      it works,
      now I can set via OMV Webinterface Samba Shares on Movies, und with the guide, i see my volume shadow copies

      btrfs subvolume list ./ (again via ssh in de /media/xxxxx/ folder)

      Source Code

      1. ID 262 gen 22 top level 5 path Movies
      2. ID 263 gen 22 top level 262 path Movies/.snapshots
      3. ID 264 gen 21 top level 263 path Movies/.snapshots/@GMT_2016.11.08-21.30.18