I'm mounting a samba share with some sparse files over cifs with
-o username=user,gid=999,uid=999,rw,vers=1.0. The NAS has 3TB capacity and 500 GB free disk space, creating a 4TB sparse file with
truncate -s 4T file.img is no problem. When I mount the share with
vers=2.1 I get the error
file too large for
truncate invokations size size > 2GB as well as for
dd if=/dev/sda12 of=/mnt/samba_share/output.img results in
dd writing to '/mnt/samba_share/output.img': File too large` 4194304+0 records in 4194303+1 records out 2147483647 bytes (2,1 GB) copied, 33,5466 s, 64,0 MB/s
There's obviously no problem for the underlying filesystem to create the sparse file (it's not recognized in
cifs 1.0, but that's another issue, I guess). Why does samba or DSM limit the size? How to overcome this?
Samba protocol version 2.1 seems to be the latest supported (there's a checkbox for SMB2 support in DSM 5 control panel; specifying
vers=3.0 as mount option causes errormount error(22): Invalid argument`).