[BusyBox 0001521]: Busybox 1.7.1 - mkswap can't create correctly a 4Go swap partition on a mapper device...

bugs at busybox.net bugs at busybox.net
Wed Feb 13 15:32:43 UTC 2008


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=1521 
====================================================================== 
Reported By:                rol
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1521
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             10-04-2007 04:03 PDT
Last Modified:              02-13-2008 07:32 PST
====================================================================== 
Summary:                    Busybox 1.7.1 - mkswap can't create correctly a 4Go
swap partition on a mapper device...
Description: 
Hello,

It seems that the mkswap utility is not behaving as expected :
 - If the partition is too big, the reported size is wrong,
 - It is not possible to put a label,
 - the created swap partition cannot be activated.
Here is a copy of the tests done :

[root at corp-ref busybox-1.7.1]# ./mkswap 
BusyBox v1.7.1 (2007-10-01 15:05:39 GMT) multi-call binary

Usage: mkswap [-c] [-v0|-v1] device [block-count]

Prepare a disk partition to be used as swap partition

Options:
        -c              Check for read-ability
        -v0             Make version 0 swap [max 128 Megs]
        -v1             Make version 1 swap [big!] (default for kernels >
2.1.117)
        block-count     Number of block to use (default is entire
partition)

[root at corp-ref busybox-1.7.1]# ./mkswap
/dev/mapper/isw_decfbeidae_RAID1p5
Setting up swapspace version 1, size = -1407488 bytes

# Here, the size is wrong....

[root at corp-ref busybox-1.7.1]# mkswap -L SWAP-isw_decfbe
/dev/mapper/isw_decfbeidae_RAID1p5
Setting up swapspace version 1, size = 4293558 kB
LABEL=SWAP-isw_decfbe, no uuid

# Same partition, using system mkswap : partition is correct.

What's more, any attempts to activate it fails :
[root at corp-ref busybox-1.7.1]# ./mkswap
/dev/mapper/isw_decfbeidae_RAID1p5
Setting up swapspace version 1, size = -1407488 bytes
[root at corp-ref busybox-1.7.1]# swapon  -a
swapon: /dev/mapper/isw_decfbeidae_RAID1p5: Invalid argument

Paul
====================================================================== 

---------------------------------------------------------------------- 
 bernhardf - 12-16-07 06:53  
---------------------------------------------------------------------- 
IIRC this was fixed quite some time ago. Please retry with 1.8.2 and
current trunk and let us know if this works as expected on trunk.

thanks, 

---------------------------------------------------------------------- 
 vda - 02-13-08 07:32  
---------------------------------------------------------------------- 
Your bbox was compiled without CONFIG_LFS=y

Just tested current svn with CONFIG_LFS=y on 6 GB file:

# ./busybox mkswap zswap
Setting up swapspace version 1, size = 6291451904 bytes

# ./busybox swapon zswap 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-04-07 04:03  rol            New Issue                                    
10-04-07 04:03  rol            Status                   new => assigned     
10-04-07 04:03  rol            Assigned To               => BusyBox         
12-16-07 06:53  bernhardf      Note Added: 0003194                          
02-13-08 07:32  vda            Status                   assigned => closed  
02-13-08 07:32  vda            Note Added: 0004374                          
======================================================================




More information about the busybox-cvs mailing list