Since the physical size of the file would be less than the logical file size, is it possible to create a sparse file with a size bigger than the available ram?
- 1You are mixing terminology (files and storage vs memory). Can you tidy up your question to make it clear if you're talking about Memory or if you're talking about Storage on disk.EightBitTony– EightBitTony2016-02-19 15:27:56 +00:00Commented Feb 19, 2016 at 15:27
- 2Sparse files have nothing to do with RAM. The limit is usually on the maximum file size supported by a file system. You can create a several hexabyte sparse file on a zfs FS for instance.Stéphane Chazelas– Stéphane Chazelas2016-02-19 15:32:18 +00:00Commented Feb 19, 2016 at 15:32
1 Answer
Files can naturally be bigger than RAM, sparse or no. I have a terabyte harddisk but not terabytes of RAM.
If you meant bigger than the filesystem / partition, then sure, you can create a sparse file that has exabytes instead of terabytes in size, this is only limited by the maximum file size of a given filesystem and you can Google for these limits, for example the Wikipedia entry for a given filesystem usually lists them.
Actually writing data to such a sparse file will eventually yield the common no space left on device error.