linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Swap file on btrfs fails ("swapfile has holes")
@ 2011-01-09 17:21 Paul Richards
  2011-01-09 18:19 ` Diego Calleja
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Richards @ 2011-01-09 17:21 UTC (permalink / raw)
  To: linux-btrfs

Hi,
I have just recently installed Debian squeeze with a root filesystem
on btrfs [1].  I have noticed however that I cannot set up a swap file
stored on the btrfs volume:

dd if=/dev/zero of=/var/swap bs=16M count=4
mkswap /var/swap
chmod 0 /var/swap
swapon /var/swap

[ 01751.879759] swapon: swapfile has holes
swapon: /var/swap: swapon failed: Invalid argument

For now I've set up a swap file under /boot (ext4), but is swap on
btrfs expected to work?  I'm using the stock Debian linux kernel
2.6.32-5-amd64.


1: This took a little bit of work -
http://lists.debian.org/debian-user/2011/01/msg00217.html


-- 
Paul Richards
@pauldoo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Swap file on btrfs fails ("swapfile has holes")
  2011-01-09 17:21 Swap file on btrfs fails ("swapfile has holes") Paul Richards
@ 2011-01-09 18:19 ` Diego Calleja
  2011-08-23 15:29   ` Gour-Gadadhara Dasa
  0 siblings, 1 reply; 4+ messages in thread
From: Diego Calleja @ 2011-01-09 18:19 UTC (permalink / raw)
  To: Paul Richards; +Cc: linux-btrfs

On Domingo, 9 de Enero de 2011 18:21:02 Paul Richards escribi=C3=B3:
> For now I've set up a swap file under /boot (ext4), but is swap on
> btrfs expected to work?  I'm using the stock Debian linux kernel
> 2.6.32-5-amd64.

AFAIK swapfiles are not supported, at least for now.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Swap file on btrfs fails ("swapfile has holes")
  2011-01-09 18:19 ` Diego Calleja
@ 2011-08-23 15:29   ` Gour-Gadadhara Dasa
  2011-08-23 15:58     ` David Nicol
  0 siblings, 1 reply; 4+ messages in thread
From: Gour-Gadadhara Dasa @ 2011-08-23 15:29 UTC (permalink / raw)
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

On Sun, 9 Jan 2011 19:19:44 +0100
Diego Calleja <diegocg@gmail.com> wrote:

Hello,

> AFAIK swapfiles are not supported, at least for now.

At the moment I use FreeBSD with zfs (two disks in mirror) and plan to return
back to (Arch)linux. Considering that with zfs I've everything in one (z)pool -
root, swap - I'd like to have similar setup with btrfs on Linux and wonder is
there any work done to provide swap space?


Sincerely,
Gour


-- 
“In the material world, conceptions of good and bad are
all mental speculations…” (Sri Caitanya Mahaprabhu)

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 834 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Swap file on btrfs fails ("swapfile has holes")
  2011-08-23 15:29   ` Gour-Gadadhara Dasa
@ 2011-08-23 15:58     ` David Nicol
  0 siblings, 0 replies; 4+ messages in thread
From: David Nicol @ 2011-08-23 15:58 UTC (permalink / raw)
  To: Gour-Gadadhara Dasa; +Cc: linux-btrfs

it seems to me that the swap file interface doesn't make sense; to
"eliminate the middleman" and provide a direct swap tree type would be
the way to go, so a btrfs can hold swapped pages. Doing this would
AIUI require:
1) direct interface to btrfs trees, not via file-system interface
2) modifying swapping to use (1) instead of essentially the
swap-to-a-partition mechanisms to the "swap file" presented as a loop
device

I also wonder if you explicitly create a loop device for your swap
file and mount that as swap, will that work and if so how poorly.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-23 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-09 17:21 Swap file on btrfs fails ("swapfile has holes") Paul Richards
2011-01-09 18:19 ` Diego Calleja
2011-08-23 15:29   ` Gour-Gadadhara Dasa
2011-08-23 15:58     ` David Nicol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).