On Fri, Jan 16, 2015 at 1:08 PM, jd1008 <jd1008@xxxxxxxxx> wrote: > Can it be done? > > So far, swapon says: > swapon: /var/swapfile: skipping - it appears to have holes. > > I was hoping that the kernel's swapper would allow the filesystem to > allocate > real blocks to the sparse file when they are needed rather than check > up front to see if they already exist. > > Maybe the devs can have a look and see if they can modify the swapper to > allow sparse swap files?? No the issue is that the swap code doesn't actually write through the file system. Essentially it gets the LBA range of the file from the file system, and then asserts direct control to write to those blocks. And in this case the sparse file has no real blocks so swapon fails. It's similar problem to swapfiles on NFS and Btrfs. There are patches floating around to get this working on NFS that Btrfs was also going to leverage. I don't know the status of that work, it seems a bit stalled to me. You could probably create a sparsefile to back a loop device, and then specify the loop device as swap. But reports are this will be slower than a swapfile. -- Chris Murphy -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org