Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FreeBSD ZFS snapshots and "previous versions"

93 views
Skip to first unread message

Dennis Steinkamp

unread,
Mar 29, 2016, 11:36:28 AM3/29/16
to
Hey guys,

i apologize if this questions has been asked recently but i couldn`t
find a clear answer to that, so bear with me a little here ^^
In the past i played around with ZFS, can`t say i have much experience
with it but i know the "essentials" about it, i guess. ^^
When i wanted to go the ZFS route in a home environment i usually went
for OmniOS + napp-it, cause i was always under the impression that
you get the latest ZFS development on OmniOS after Oracle stopped caring
about open-source.
Furthermore, the convenience of a in kernel CIFS implementation which
made zfs snapshots accessible under previous versions for windows
clients was just great.

But of course there is so much to like about freebsd and the last time i
checked about freebsd and zfs was a couple of years ago so i am afraid i
am not totally up2date.
That being said i got a few questions for you guys:

- Are OmniOS and FreeBSD are on the same ZFS version (or at least equal
feature wise)
- Am i able to build a prooduction stable zfs filer with freebsd that
supports zfs snapshots for windows clients the same way OmniOS does.

I did a little bit of research on this and it was a little bit vague but
it seems its possible with FreeBSD and Samba4. Am i on the right track
here or are there any other maybe better ways to make
zfs snapshots and rollbacks easily doable for windows client machines.

Thank you guys for helping me out.

Dennis




_______________________________________________
freebsd-...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Matthew Seaman

unread,
Mar 29, 2016, 12:08:57 PM3/29/16
to
On 2016/03/29 16:35, Dennis Steinkamp wrote:
> - Are OmniOS and FreeBSD are on the same ZFS version (or at least equal
> feature wise)

Pretty much, yes. Since the end of the Oracle code, there's hasn't been
a version number per-se, but a set of feature flags. Given you're using
a system based on OpenZFS code, so long as you have support for the same
set of feature flags then you should have compatible functionality.

You can see what feature-flags are supported on any system by running
'zpool upgrade -v' -- this is what you get on a recent 10.3-PRERELEASE
machine:

{{{
% zpool upgrade -v
This system supports ZFS pool feature flags.

The following features are supported:

FEAT DESCRIPTION
-------------------------------------------------------------
async_destroy (read-only compatible)
Destroy filesystems asynchronously.
empty_bpobj (read-only compatible)
Snapshots use less space.
lz4_compress
LZ4 compression algorithm support.
multi_vdev_crash_dump
Crash dumps to multiple vdev pools.
spacemap_histogram (read-only compatible)
Spacemaps maintain space histograms.
enabled_txg (read-only compatible)
Record txg at which a feature is enabled
hole_birth
Retain hole birth txg for more precise zfs send
extensible_dataset
Enhanced dataset functionality, used by other features.
embedded_data
Blocks which compress very well use even less space.
bookmarks (read-only compatible)
"zfs bookmark" command
filesystem_limits (read-only compatible)
Filesystem and snapshot limits.
large_blocks
Support for blocks larger than 128KB.

The following legacy versions are also supported:

VER DESCRIPTION
--- --------------------------------------------------------
1 Initial ZFS version
2 Ditto blocks (replicated metadata)
3 Hot spares and double parity RAID-Z
4 zpool history
5 Compression using the gzip algorithm
6 bootfs pool property
7 Separate intent log devices
8 Delegated administration
9 refquota and refreservation properties
10 Cache devices
11 Improved scrub performance
12 Snapshot properties
13 snapused property
14 passthrough-x aclinherit
15 user/group space accounting
16 stmf property support
17 Triple-parity RAID-Z
18 Snapshot user holds
19 Log device removal
20 Compression using zle (zero-length encoding)
21 Deduplication
22 Received properties
23 Slim ZIL
24 System attributes
25 Improved scrub stats
26 Improved snapshot deletion performance
27 Improved snapshot creation performance
28 Multiple vdev replacements

For more information on a particular version, including supported releases,
see the ZFS Administration Guide.

}}}

> - Am i able to build a prooduction stable zfs filer with freebsd that
> supports zfs snapshots for windows clients the same way OmniOS does.

Yes.

In fact, for NAS use, take a look at http://www.freenas.org/ which is a
project built on FreeBSD and ZFS.

Cheers,

Matthew


signature.asc

Brandon J. Wandersee

unread,
Mar 29, 2016, 12:39:37 PM3/29/16
to

Dennis Steinkamp writes:

> That being said i got a few questions for you guys:
>
> - Are OmniOS and FreeBSD are on the same ZFS version (or at least equal
> feature wise)
> - Am i able to build a prooduction stable zfs filer with freebsd that
> supports zfs snapshots for windows clients the same way OmniOS does.
>

You're looking for (a) a web interface users can access; and (b) Windows
network mounts. Is that right? Or did I miss something?

The current FreeBSD implementation of ZFS does not yet support native
SMB/CIFS exports, but it is indeed possible to use SAMBA. As for the web
interface, have a look at FreeNAS and NAS4Free. The former is developed
by ix Systems; the latter is a community-driven project. Both are built
on, yet independent of FreeBSD. FreeNAS is about to release a new
version based on FreeBSD 10.3, which (as of today) is the latest
production-ready release.

And while I didn't look too closely at Napp-it/OmniOS, since it is
Illumos-based I would guess it has a slightly newer ZFS/zpool version
than FreeBSD does. But I would think FreeBSD almost certainly has
everything you would expect to use in your day-to-day.

--

:: Brandon J. Wandersee
:: brandon....@gmail.com
:: --------------------------------------------------
:: 'The best design is as little design as possible.'
:: --- Dieter Rams ----------------------------------

Dennis Steinkamp

unread,
Mar 29, 2016, 5:43:24 PM3/29/16
to
Thank you for your reply.
Yeah, i know about FreeNAS and it`s great dont get me wrong but its
often a little bit behind the most recent
freebsd versions and i`d like to do this in a more "puristic" approach.

I always thought that FreeNAS doesn`t support snapshots through previous
versions properly.
Did that change in any way with Samba4?

Dennis Steinkamp

unread,
Mar 29, 2016, 5:47:21 PM3/29/16
to
I don`t need the convenience of a web interface like nappit or freenas
offers.
In fact i see it as an oppurtunity to learn more about zfs when i don`t
have the comfort of a nice and clean web interface.
Can you poiunt me in any specific direction of how to get this done
through FreeBSD and Samba4?
I assume it doesn`T work out of the box and there is some special
configuration required?

Do i need to export the snapshots directory as a samba share to make
this work or are there any special configuration directives i need to
consider?

Thank you guys

Denni

Am 29.03.2016 um 18:39 schrieb Brandon J.Wandersee:
> Dennis Steinkamp writes:
>
>> That being said i got a few questions for you guys:
>>
>> - Are OmniOS and FreeBSD are on the same ZFS version (or at least equal
>> feature wise)
>> - Am i able to build a prooduction stable zfs filer with freebsd that
>> supports zfs snapshots for windows clients the same way OmniOS does.
>>
> You're looking for (a) a web interface users can access; and (b) Windows
> network mounts. Is that right? Or did I miss something?
>
> The current FreeBSD implementation of ZFS does not yet support native
> SMB/CIFS exports, but it is indeed possible to use SAMBA. As for the web
> interface, have a look at FreeNAS and NAS4Free. The former is developed
> by ix Systems; the latter is a community-driven project. Both are built
> on, yet independent of FreeBSD. FreeNAS is about to release a new
> version based on FreeBSD 10.3, which (as of today) is the latest
> production-ready release.
>
> And while I didn't look too closely at Napp-it/OmniOS, since it is
> Illumos-based I would guess it has a slightly newer ZFS/zpool version
> than FreeBSD does. But I would think FreeBSD almost certainly has
> everything you would expect to use in your day-to-day.
>

Matthew Seaman

unread,
Mar 29, 2016, 6:22:42 PM3/29/16
to
On 29/03/2016 22:42, Dennis Steinkamp wrote:
> Yeah, i know about FreeNAS and it`s great dont get me wrong but its
> often a little bit behind the most recent
> freebsd versions and i`d like to do this in a more "puristic" approach.

Heh. The latest release of FreeNAS uses FreeBSD 10.3 -- but FreeBSD
10.3-RELEASE has itself not yet been published. That's pretty up to
date with the latest FreeBSD releases if you ask me.

However, yes, sure. You can do what you want with a basic FreeBSD
install and a few bits of software from ports.

> I always thought that FreeNAS doesn`t support snapshots through previous
> versions properly.
> Did that change in any way with Samba4?

Not sure exactly what you're expecting from these snapshots. Yes, you
can export a ZFS to mount onto a Windows server via Samba. You will
have the ability to make snapshots galore on the server, and even to
turn those snapshots into cloned filesystems or mount the snapshots.

I have no idea if you can export a snapshot for any sort of remote mount
-- you can certainly export a cloned fileesystem for that purpose, or
you can send the snapshotted ZFS to another machine for backup.

Cheers,

Matthew


signature.asc

Dennis Steinkamp

unread,
Mar 29, 2016, 7:38:35 PM3/29/16
to
Am 30.03.2016 um 00:22 schrieb Matthew Seaman:
> Not sure exactly what you're expecting from these snapshots...

Pretty much what OmniOS did for me. The "kernel mode" CIFS
implementation enabled me to access zfs snapshots
through the previous versions tab under a windows client machine. (no
additional configuration required)
That made it very convenient to see all the created snapshots for a
certain directory and to roll back to a specific one if need arises.
I would like to do the same just with FreeBSD and - i assume - probably
Samba4.

As this feature is baked into kernel mode cifs i am not sure how to
start at achieving the same with freebsd + samba4 and my question was
more or less wild guessing that i probably
need to create a samba share for a .zfs directory to make it appear
under the previuos versions tab on windows but maybe i am totally wrong
here, i just wanted to point out that i tried to think about it on my
own before bothering you guys^^

Regards

Dennis

Gabor Radnai

unread,
Mar 30, 2016, 5:32:12 AM3/30/16
to
Hi,

If I understand correctly OP wants to use Windows feature called 'Previous
Version' off from BSD filer.
This can be done on FreeBSD + Samba4 adding followings to smb4.conf:

vfs objects = shadow_copy2
shadow:format = %Y-%m-%d_%H.%M.%S--1h
shadow:sort = desc
shadow:mountpoint = <path-to-share>
shadow:snapdir = .zfs/snapshot
shadow:localtime = yes

format is customizable and zfs snapshot should be aligned accordingly
obviously.

Hope it helps.

Dennis Steinkamp

unread,
Mar 30, 2016, 5:48:27 AM3/30/16
to
Hi,

exactly, this is what i wanted to do.
Thank you (all) very much for your help. :)
Regards

Dennis

Brandon J. Wandersee

unread,
Mar 30, 2016, 5:59:38 PM3/30/16
to

Dennis Steinkamp writes:

> Hi,
>
> exactly, this is what i wanted to do.
> Thank you (all) very much for your help. :)
> Regards
>
> Dennis
>
> Am 30.03.2016 um 11:31 schrieb Gabor Radnai:
>> Hi,
>>
>> If I understand correctly OP wants to use Windows feature called 'Previous
>> Version' off from BSD filer.
>> This can be done on FreeBSD + Samba4 adding followings to smb4.conf:
>>
>> vfs objects = shadow_copy2
>> shadow:format = %Y-%m-%d_%H.%M.%S--1h
>> shadow:sort = desc
>> shadow:mountpoint = <path-to-share>
>> shadow:snapdir = .zfs/snapshot
>> shadow:localtime = yes
>>
>> format is customizable and zfs snapshot should be aligned accordingly
>> obviously.
>>
>> Hope it helps.

Ah, I see. I jumped to the conclusion you wanted a web interface because
I thought you wanted to allow users to directly control ZFS filesystems,
which isn't possible through Windows. I didn't even know "shadow copy"
was a thing.

--

:: Brandon J. Wandersee
:: brandon....@gmail.com
:: --------------------------------------------------
:: 'The best design is as little design as possible.'
:: --- Dieter Rams ----------------------------------

Dennis Steinkamp

unread,
Mar 30, 2016, 8:53:26 PM3/30/16
to
I probably just didn`t explain it good enough.
Thank you guys for your help, i get back to you if i can`t get it to
work for some reason.

Bye

Dennis

Alexander Moisseev

unread,
Apr 5, 2016, 9:16:30 AM4/5/16
to
On 30.03.2016 12:31, Gabor Radnai wrote:
> Hi,
>
> If I understand correctly OP wants to use Windows feature called 'Previous
> Version' off from BSD filer.
> This can be done on FreeBSD + Samba4 adding followings to smb4.conf:
>
> vfs objects = shadow_copy2
> shadow:format = %Y-%m-%d_%H.%M.%S--1h
> shadow:sort = desc
> shadow:mountpoint = <path-to-share>
> shadow:snapdir = .zfs/snapshot
> shadow:localtime = yes
>
> format is customizable and zfs snapshot should be aligned accordingly
> obviously.
>
> Hope it helps.
> _______________________________________________

FYI It's broken in Samba 4.1 and newer:
https://bugzilla.samba.org/show_bug.cgi?id=11658
0 new messages