Re: Swapping to a large sparse file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux