kowr / compcache

Automatically exported from code.google.com/p/compcache
0 stars 0 forks source link

init: Device or resource busy #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have init script (used in arch linux - see below) and when doing 
"rzscontrol /dev/ramzswap0 
--init " I'm gettin above error
2. I tried undo/deactivate everything - according to Readme, but everytime the 
same error...

What version of the product are you using? On what operating system?
compcache 0.6.2, arch linux, kernel 2.6.31 (might be the cause of a problem)

Please provide any additional information below.
Relevant part of my initscript:

start() {
    cd /usr/local/compcache
     modprobe -q lzo_compress
     modprobe -q lzo_decompress
        if [[ `cat /proc/modules` == *ramzswap*  ]];then rmmod ramzswap;fi
     insmod ramzswap.ko num_devices=1 disksize_kb=$RAMDISKSIZE
     rzscontrol /dev/ramzswap0 $RZSCONTROL_ARGS --init 
     swapon -p 10 /dev/ramzswap0 || result_start=failed
}

stop() {
    cd /usr/local/compcache
    swapoff /dev/ramzswap0 || result_stop=failed
    rmmod ramzswap || result_stop=failed
}

Original issue reported on code.google.com by tibor...@gmail.com on 28 Jan 2010 at 10:30

GoogleCodeExporter commented 9 years ago
compcache-0.6.2 allows initializing the first device (/dev/ramzswap0) without 
using
rzscontrol (see Issue #50) by accepting disksize_kb, memlimit_kb, backing_swap 
as
module parameters. This is exactly what your script is doing:

>     insmod ramzswap.ko num_devices=1 disksize_kb=$RAMDISKSIZE

It will create 1 device *and* initialize it with given disksize. This is 
similar to
example2 show at CompilingAndUsingNew page.  Note that compcache-0.6 would 
simply
ignore this additional disksize_kb parameter.

>     rzscontrol /dev/ramzswap0 $RZSCONTROL_ARGS --init

This is redundant since the device is already initialized. However, rzscontrol
utility is needed to check stats, reset or reconfigure device. It is also a 
must if
you want to use more than one ramzswap device (see Scalability page).  Note that
compcache-0.6 would have ignored disksize_kb module parameter in previous step 
and
rzscontrol would now initialize /dev/ramzswap0 with defaults (disksize equal to 
25%
of RAM).

----

Ability to initialize without a separate tool (rzscontrol) is desirable mainly 
for
embedded devices where insmod and swapon are part of busybox itself.

Original comment by nitingupta910@gmail.com on 29 Jan 2010 at 2:06

GoogleCodeExporter commented 9 years ago

Original comment by nitingupta910@gmail.com on 29 Jan 2010 at 3:28

GoogleCodeExporter commented 9 years ago
I see. It seems I didn't read readme and wiki properly... thanks

Original comment by tibor...@gmail.com on 29 Jan 2010 at 9:28