Web lists-archives.com

Re: [Samba] Enable XAT_OFFLINE extended attribute in Samba




Thanks for the suggestion Jeremy, we are going to build our own module

Andrea

Il 3/5/2019 8:28 PM, Jeremy Allison ha scritto:
On Tue, Mar 05, 2019 at 01:14:00PM +0100, Andrea Cucciarre' wrote:
My goal is to use the Offline file attribute of Windows when sharing with
Samba:

https://docs.microsoft.com/en-us/dotnet/api/system.io.fileattributes?redirectedfrom=MSDN&view=netframework-4.7.2

It works when I share ZFS filesystem using the native ZFS CIFS sharing, but
it fails when I share the same ZFS with Samba, that is the Offline files are
not showed in Windows Client
Got it. Currently, Samba uses the dmapi API to
check if a file has been migrated to external
storage, and to cope with reads/writes against
it.

Look at the VFS module source3/modules/vfs_tsmsm.c
which, as decribed, is:

   Samba VFS module for handling offline files
   with Tivoli Storage Manager Space Management

You would need to create a similar VFS module
on ZFS to expose the FILE_ATTRIBUTE_OFFLINE
flag to the client. Mostly it'll be wrapping
the [f]get_dos_attributes() VFS calls.

A bit fiddly, but doable (especially by companies
used to Samba coding internals).

Jeremy.


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba