ZFS Snapshot - Samba

pixelpeter

Well-Known Member
Aug 5, 2015
168
4
58
57
Chemnitz
Hallo,


Kann mir jemand den Formatstring sagen wenn ich die Snapshots in einer Sambafreigabe sehen will.
Ich bekomme es sauber hin das es mir die Stündlichen anzeigt. Ich will aber alle sehen: hourly,weekly usw.

Vielleicht hat das jemand im Einsatz.


Peter
 
Der String ist auch abhängig wie du selbst Snapshots machst.

Wenn man Snapshots mit dem Format hier erstellt:

Code:
zfs snapshot -r zpool@$(date +"%Y_%m_%d-%H_%M_%S")

benötigt man diese Einstellungen:

Code:
    vfs objects     = shadow_copy2 catia fruit streams_xattr
    fruit:resource  = xattr
    # Schattenkopie / Dateihistorienverwaltung für Windows
    shadow:format   = %Y_%m_%d-%H_%M_%S
    shadow:sort     = desc
    shadow:snapdir  =.zfs/snapshot
    # ZFS-Snapshotverzeichnis generell nicht anzeigen
    veto files      = /.zfs/

Das funktioniert prima.
 
Der String ist auch abhängig wie du selbst Snapshots machst.

Wenn man Snapshots mit dem Format hier erstellt:

Code:
zfs snapshot -r zpool@$(date +"%Y_%m_%d-%H_%M_%S")

benötigt man diese Einstellungen:

Code:
    vfs objects     = shadow_copy2 catia fruit streams_xattr
    fruit:resource  = xattr
    # Schattenkopie / Dateihistorienverwaltung für Windows
    shadow:format   = %Y_%m_%d-%H_%M_%S
    shadow:sort     = desc
    shadow:snapdir  =.zfs/snapshot
    # ZFS-Snapshotverzeichnis generell nicht anzeigen
    veto files      = /.zfs/

Das funktioniert prima.

und das klappt auch in einem lcx samba member server mit gemapptem zfs volume auf dem host?
 
Hallo,

Ich nutze das Paket zfs-auto-snapshot und dies erzeugt diese Schnappschüsse:

dr-xr-xr-x 1 root root 0 Sep 22 11:23 zfs-auto-snap_daily-2017-09-22-0425
dr-xr-xr-x 1 root root 0 Sep 26 16:23 zfs-auto-snap_daily-2017-09-23-0425
dr-xr-xr-x 1 root root 0 Sep 26 16:23 zfs-auto-snap_daily-2017-09-24-0425
dr-xr-xr-x 1 root root 0 Sep 26 16:23 zfs-auto-snap_daily-2017-09-25-0425
dr-xr-xr-x 1 root root 0 Sep 26 16:23 zfs-auto-snap_daily-2017-09-26-0425
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_daily-2017-09-27-0425
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_daily-2017-09-28-0425
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_frequent-2017-09-28-0630
dr-xr-xr-x 1 root root 0 Sep 28 09:26 zfs-auto-snap_frequent-2017-09-28-0645
dr-xr-xr-x 1 root root 0 Sep 28 09:26 zfs-auto-snap_frequent-2017-09-28-0700
dr-xr-xr-x 1 root root 0 Sep 28 09:26 zfs-auto-snap_frequent-2017-09-28-0715
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-0817
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-0917
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1017
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1117
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1217
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1317
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1417
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1517
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1617
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1717
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1817
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-1917
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-2017
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-2117
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-2217
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-27-2317
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-28-0017
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-28-0117
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-28-0217
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-28-0317
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-28-0417
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-28-0517
dr-xr-xr-x 1 root root 0 Sep 28 08:31 zfs-auto-snap_hourly-2017-09-28-0617
dr-xr-xr-x 1 root root 0 Sep 28 09:26 zfs-auto-snap_hourly-2017-09-28-0717

Weekly und monthly gibt es auch noch.

Genau dafür bräuchte ich den Format String.
Im Netzt findet sich einiges baer leider kein Beispiel.


Peter
 
Ich nutze das Paket zfs-auto-snapshot und dies erzeugt diese Schnappschüsse:

[...]

Weekly und monthly gibt es auch noch.

Genau dafür bräuchte ich den Format String.
Im Netzt findet sich einiges baer leider kein Beispiel.

Laut manapge nein, da es ein String sein muss, kein regulärer Ausdruck:

Code:
shadow:format = format specification for snapshot names

This is an optional parameter that specifies the format specification for the naming of
snapshots in the file system. The format must be compatible with the conversion specifications
recognized by str[fp]time.

Default: shadow:format = "@GMT-%Y.%m.%d-%H.%M.%S"

Entweder erweiterst du das shadow_copy2 Modul von Samba um reguläre Ausdrücke oder du stellst dein Snapshot-Format so um, dass es dem entspreche was shadow_copy2 erwartet. Eine andere Möglichkeit alle Snapshots zu verwenden sehe ich leider nicht.
 
danke ich habe es getestet und habe keinen geschwindigkeitsvorteil ausmachen können...habe jetzt wieder in einen kvm btrfs mit samba 4.7 auf einem zvol...wunderbar
 
Du fährst also BTRFS (COW FS) auf einem ZFS ZVOL (COW FS)? Davon wird überall abgeraten - auch wenn es technisch geht.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!