want to create readonly block backstore from otherwise mounted block
device.
by stefan j kozak
i want to use /dev/sda1 (which is already mounted r/w elsewhere) as a r/o block backstore.
it wont let me and I dont see why that isnt allowable...
------snip start
/backstores/block> create sda /dev/sda1 true
Cannot configure StorageObject because device /dev/sda1 is already in use
------snip stop
So..... i commented out the "raise RTSLibError("Cannot configure Storag.... " in rtslib_fb/tcm.py class BlockStorageObject(StorageObject): _configure to see where that got me.
turns out it blows up again trying to fwrite(path, "1\n") where path is "/sys/kernel/config/target/core/iblock_2/MOOOOOO/enable" , so the kernel is complaining i guess?
why does it need to write 1 there to enable it? what is it enabling exactly, LIO?
now, i'm no dummy, and I know when i'm out of my element.... so just how does targetcli-fb go about setting up LIO to make a target anyways?
Shouldn't making a readonly backstore be a no-risk kinda thing?
Is there a way to bypass targetcli-fb and do this manually?
Not really seeking a feature add, but more rather understanding at what's at play here, and ill keep plugging along to see if I cant figure it out on my own, too.
(trying to make a FC target here in this instance if it matters)
stay corvid-free,
thanks in advance,
joe.
email$ echo -n "dd if=/dev/zero of=/dev/null count=1 bs=1G"|sed -E s/\\W+/"."/g;echo @gmail.com
4 years, 1 month