[lxc-users] lxc exec - cp: Value too large for defined data type

Tomasz Chmielewski mangoo at wpkg.org
Tue Oct 4 15:58:32 UTC 2016


On 2016-10-05 00:41, Tomasz Chmielewski wrote:
> On 2016-10-05 00:05, Michael Peek wrote:
>> I could be completely wrong about everything, but here's what I think 
>> is
>> going on:
>> 
>> If I'm correct then the version of cp you have inside the container 
>> was
>> compiled without large file support enabled.  What constitutes a 
>> "large"
>> file is dependent on whether you're using a 32-bit or 64-bit system.  
>> If
>> your container is running a 32-bit image, then a large file is any 
>> file
>> whose size is 2GB or larger in size.  For containers running a 64-bit
>> image a large file any file of size 4GB or larger.  To support large
>> files programs usually only need to be compiled with certain compiler
>> flags enabled to tell the compiler to activate "large file"-specific
>> code within the source, either that or the libraries that the program
>> depends upon need to support large files by default.
> 
> The container is Ubuntu 14.04; host is Ubuntu 16.04.
> 
> "cp" is copying config files.
> 
> They are a few hundred bytes in size, few kilobytes maximum.
> 
> 
> So must be something else.

I think it comes from the fact that the files I'm copying from were 
treated with setfacl on the host.
And inside the container, cp is unable to recreate exactly same 
permissions, and outputs a confusing warning:

* cp with "-a":

lxd# cp -av /vagrant/0-byte-file /root
'/vagrant/0-byte-file' -> '/root/0-byte-file'
cp: '/vagrant/0-byte-file': Value too large for defined data type


* cp without "-a":

lxd# cp -v /vagrant/0-byte-file /root
'/vagrant/0-byte-file' -> '/root/0-byte-file'



Tomasz Chmielewski
https://lxadm.com


More information about the lxc-users mailing list