Web lists-archives.com

Re: [Samba] (DeviceIoControl, FSCTL_SET_SPARSE)




Hi Brian,

On Thu, 16 Feb 2017 01:20:46 -0800, brian lamb via samba wrote:

> Configured as you mention, and prior with the other tweaks I had in the first place,  Im getting the same results, which is "FSUTIL utility requires a Local NTFS Volume", and mapping it.

Hmm, this works fine for me against a Samba 4.4.2 Btrfs backed Samba
share.

smb.conf:
[global]
	...
        store dos attributes = yes

[share]
        path = /tmp/tmp.UR3ZbULpHJ
        read only = no

Windows Server 2012 client:
("store dos attributes = no" configured on server)
PS> fsutil.exe sparse setflag \\samba_server\share\file
Error:  Incorrect function.

("store dos attributes = yes" configured on server)
PS> fsutil.exe sparse setflag \\samba_server\share\file
PS> fsutil.exe sparse queryflag \\samba_server\share\file
This file is set as sparse

I don't think it's worth trying to triage your application problems
any further until you have this simple test case working. Please set
"log level = 10" on the Samba server, and rerun the above test.
Attach the resulting debug log to a bugzilla.samba.org ticket.

Also, please check whether you can manually set an extended attribute
locally against a file in your share path. e.g.
samba_server:/tmp/tmp.UR3ZbULpHJ/:[0]# setfattr -n user.stuff -v xattr-data file
samba_server:/tmp/tmp.UR3ZbULpHJ/:[0]# getfattr -d file
user.stuff="xattr-data"

Furthermore, could you please check whether Samba is compiled with xattr
support - i.e.:
samba_server:# smbd -b | grep -i xattr

> I then went to contig, `contig -n X:\share\sparesefile 0`, as well as a few other size.  Maybe im using it wrong, but some testing on contig has only "Access is denied" when I try to write to anything. 
> 
> Oh one change, I put these settings only in Global (only, as opposed to also in the pool definition), I just realized.  I believe global should be enough shouldn’t it? 

[globa]l section is fine, as long as it's not also set in the share
section.

> [global]
>     # ZFS SPARSE
>     #share:fake_fscaps = 0
>     store dos attributes = yes
>     strict allocate = yes
> 
> I hadn’t heard any mention of the importance of strict allocate, would that setting be wise then?

It doesn't affect how FSCTL_SET_SPARE is handled.

> What are some other tools I might try that with?  I can try straight on the linux too, just as a test, if there is any tools recommended to test that with.  I will also look something up for that tomorrow as well.  

Let's get "fsutil.exe sparse setflag" working first.

Cheers, David

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