* mkswap fails to use more than 2GiB and doesn't recognize LVM
@ 2011-08-11 15:32 Florian Pritz
2011-08-11 18:14 ` Karel Zak
0 siblings, 1 reply; 4+ messages in thread
From: Florian Pritz @ 2011-08-11 15:32 UTC (permalink / raw)
To: util-linux
[-- Attachment #1: Type: text/plain, Size: 799 bytes --]
Hi,
I'm running util-linux 2.19.1 with a x86_64 linux 3.0.1 on Arch Linux.
mkswap displays the following output when trying to create swap on a
8GiB logical volume.
> # mkswap /dev/mapper/vg_brynhild-swap
> mkswap: warning: truncating swap area to 2097144 KiB
> mkswap: /dev/mapper/vg_brynhild-swap: warning: don't erase bootbits sectors
> on whole disk. Use -f to force.
> Setting up swapspace version 1, size = 2097140 KiB
> no label, UUID=5eae2d8b-f664-46f5-983c-bdcd4301fa66
I tried adding -p 8589934592 to force 8GiB, but that doesn't change
anything.
It also fails to see that we are using LVM so this is not a real device
and we won't overwrite any boot sectors.
busybox mkswap crates the expected 8GiB swap, so I think this is a bug.
--
Florian Pritz
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mkswap fails to use more than 2GiB and doesn't recognize LVM
2011-08-11 15:32 mkswap fails to use more than 2GiB and doesn't recognize LVM Florian Pritz
@ 2011-08-11 18:14 ` Karel Zak
2011-08-11 18:52 ` Florian Pritz
2011-08-11 21:46 ` Karel Zak
0 siblings, 2 replies; 4+ messages in thread
From: Karel Zak @ 2011-08-11 18:14 UTC (permalink / raw)
To: Florian Pritz; +Cc: util-linux
On Thu, Aug 11, 2011 at 05:32:57PM +0200, Florian Pritz wrote:
> mkswap displays the following output when trying to create swap on a
> 8GiB logical volume.
> > # mkswap /dev/mapper/vg_brynhild-swap
> > mkswap: warning: truncating swap area to 2097144 KiB
It seems correct. The swap header does not allow to address more than
UINT_MAX pages. You have to create more swap areas or use system with
bigger pages.
> > mkswap: /dev/mapper/vg_brynhild-swap: warning: don't erase bootbits sectors
> > on whole disk. Use -f to force.
> > Setting up swapspace version 1, size = 2097140 KiB
> > no label, UUID=5eae2d8b-f664-46f5-983c-bdcd4301fa66
>
> I tried adding -p 8589934592 to force 8GiB, but that doesn't change
> anything.
:-)
> busybox mkswap crates the expected 8GiB swap, so I think this is a bug.
Do you see see 8GiB swap area in /proc/swaps after swapon? I don't
think so...
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: mkswap fails to use more than 2GiB and doesn't recognize LVM
2011-08-11 18:14 ` Karel Zak
@ 2011-08-11 18:52 ` Florian Pritz
2011-08-11 21:46 ` Karel Zak
1 sibling, 0 replies; 4+ messages in thread
From: Florian Pritz @ 2011-08-11 18:52 UTC (permalink / raw)
To: util-linux
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
On 11.08.2011 20:14, Karel Zak wrote:
>> busybox mkswap crates the expected 8GiB swap, so I think this is a bug.
>
> Do you see see 8GiB swap area in /proc/swaps after swapon? I don't
> think so...
> cat /proc/swaps
Filename Type Size Used
Priority
/dev/dm-4 partition 8388604 0 -1
--
Florian Pritz
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mkswap fails to use more than 2GiB and doesn't recognize LVM
2011-08-11 18:14 ` Karel Zak
2011-08-11 18:52 ` Florian Pritz
@ 2011-08-11 21:46 ` Karel Zak
1 sibling, 0 replies; 4+ messages in thread
From: Karel Zak @ 2011-08-11 21:46 UTC (permalink / raw)
To: Florian Pritz; +Cc: util-linux
On Thu, Aug 11, 2011 at 08:14:54PM +0200, Karel Zak wrote:
> On Thu, Aug 11, 2011 at 05:32:57PM +0200, Florian Pritz wrote:
> > mkswap displays the following output when trying to create swap on a
> > 8GiB logical volume.
> > > # mkswap /dev/mapper/vg_brynhild-swap
> > > mkswap: warning: truncating swap area to 2097144 KiB
>
> It seems correct.
Ah... sorry, I didn't read your e-mail too carefully.
> The swap header does not allow to address more than
> UINT_MAX pages. You have to create more swap areas or use system with
> bigger pages.
Right, so if you have 4096 page size, then 4096 * 4294967295 is the
max size...
I think the problem is kernel version string -- "3.0". The mkswap
code uses the version string to set the limit.
The problem should be fixed in 2.20-rc1, commit
fa7e0d6d442de9f5940f99fd93f4522602439131.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-11 21:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 15:32 mkswap fails to use more than 2GiB and doesn't recognize LVM Florian Pritz
2011-08-11 18:14 ` Karel Zak
2011-08-11 18:52 ` Florian Pritz
2011-08-11 21:46 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox