Lubuntu

iSCSI can't create fileio backstore

0 2450
cdwijs  
Hi All,

I want to use the bananapi as an iSCSI target. Then my network camera can dump it's recordings on it via iSCSI. I can't get it to work in lubuntu on the bananapi, it does work in arch linux in virtualbox
http://www.linuxclustering.net/2012/11/08/step-by-step-how-to-set-up-a-low-cost-san-with-the-linux-software-iscsi-target/

To reproduce:
1) Download Lubuntu_1404_For_BananaPi_v3_1_1 image from here (bottom version), burn it on an uSD card (16GB, class 10), and boot the bananapi with it
http://www.lemaker.org/resources/9-76/lubuntu_for_bananapi.html
2)add the following line to /etc/fstab
configfs /sys/kernel/config configfs defaults 0 0
then issue mount -a (as root) so configfs is mounted
3)install user space tools for iSCSI target:
apt-get install targetcli python-urwid
4)create a 100MB file to use as backing store:
dd if=/dev/zero of=/root/storlun0.bin count=0 obs=1 seek=100M
5)try to use storlun0.bin as backing store. There are 4 problems:
Auto completion does not work, as I enter /root/st<tab> it should have completed it to /root/storlun0.bin
Second problem is that it complaints about not being able to find the file on the filesystem.
Third problem is that targetcli does create a file, but it's 0 bytes long.
Fourth problem is that md_block0 is seen as an invalid storage object (see below)

My versions:
uname -a
linux lemaker 3.4.90 #2 SMP PREEMPT Tue Aug 5 14:11:40 CST 2014 armv7l armv7l armv7l GNU/Linux
targetcli 2.1-1 (seen in synaptic)

What goes wrong here? What steps can I take to fix this?
Kind regards,
Cedric

  1. root@lemaker:/home/bananapi# targetcli
  2. Warning: Could not load preferences file /root/.targetcli/prefs.bin.
  3. targetcli GIT_VERSION (rtslib GIT_VERSION)
  4. Copyright (c) 2011-2013 by Datera, Inc.
  5. All rights reserved.
  6. Loaded iscsi_target_mod kernel module.
  7. Created '/sys/kernel/config/target/iscsi'.
  8. Loaded tcm_loop kernel module.
  9. Created '/sys/kernel/config/target/loopback'.
  10. Loaded tcm_fc kernel module.
  11. Created '/sys/kernel/config/target/fc'.
  12. /> cd backstores/fileio
  13. /backstores/fileio> ls
  14. o- fileio ........................................................................................ [0 Storage Object]
  15. /backstores/fileio> create md_block0 /root/storlun0.bin
  16. For fileio, you must either specify both a file and a size, or just a device path.
  17. /backstores/fileio> create md_block0 /root/storlun0.bin 100M
  18. Generating a wwn serial.
  19. Not using buffered mode.
  20. Created fileio md_block0.
  21. /backstores/fileio> ls
  22. o- fileio ........................................................................................ [1 Storage Object]
  23.   o- md_block0 ..................................................................... [/root/storlun0.bin deactivated]

  24. /> cd /iscsi
  25. /iscsi> ls
  26. o- iscsi ................................................................................................ [0 Targets]
  27. /iscsi> create
  28. Created target iqn.2003-01.org.linux-iscsi.lemaker.armv7l:sn.3b8b9a8a38ae.
  29. Selected TPG Tag 1.
  30. Successfully created TPG 1.
  31. /iscsi> ls
  32. o- iscsi ................................................................................................. [1 Target]
  33.   o- iqn.2003-01.org.linux-iscsi.lemaker.armv7l:sn.3b8b9a8a38ae ............................................. [1 TPG]
  34.     o- tpgt1 .............................................................................................. [enabled]
  35.       o- acls .............................................................................................. [0 ACLs]
  36.       o- luns .............................................................................................. [0 LUNs]
  37.       o- portals ........................................................................................ [0 Portals]
  38. /iscsi> cd iqn.2003-01.org.linux-iscsi.lemaker.armv7l:sn.3b8b9a8a38ae/tpgt1/luns
  39. /iscsi/iqn.20...ae/tpgt1/luns> create /backstores/fileio/md_block0
  40. Selected LUN 0.
  41. Invalid storage object /backstores/fileio/md_block0.
Copy the Code
You have to log in before you can reply Login | Sign Up

Points Rules