Dear fvdw,
If you have spare time to answer, I still have questions.
I succeeded in doing a bash file, added to cron-boot directory and everything works perfectly following your steps for creating this LUN of 1GB.
Following your last quotation : "The file created will still exist after reboot so do not recreate it after reboot (ommit the step were the file is created) and reuse it and your data will still be there."
I need some extra explanations about which step(s) I should omit to avoid creating forever the same LUN. I've tried different configurations, without the step 'backfileio', without creating the LUN since it is already created and so on, but without all your steps, the LUN doesn't appear with "Windows initiator"
Could you be more accurate about the steps I should omit to keep my data after a reboot ?
fvdw: to be honest I never use iscsi target, so for me its a also trial.
What happens if you reuse the commands for creating a fileio backstore? is a new empty file created or not ?
I think if the file exists and has the correct size it will not be created again but reused
The commands to create/add the fileio backstore should be repeated to fill configfs file system with the required information, I don't what happens if a file with the mentioned name and size already exists, just try I suggest Another question : regarding the "iqn" name... :
in the folder : etc/iscsi/ if I use 'cat initiatorname-iscsi" I have : iqn.2012-11.fvdw-sl.nas:e0c73588968d"
which is different from the one you used in your example, as a reminder you put : "iqn.2003-01.org.linux-iscsi.fvdwsl-base.armv5tel:sn.ed2fb2411a65"
And if I use from root the command line :" iscsi-iname", I have iqn.2005-03.org.open-iscsi:4695cfcaa788"
Of course, the 12 last digits change everytime I ask the command, but the beginning is the same :"iqn.2005-03.org.open-iscsi"
Which iqn name should I use to create my own LUN of 32 GB? and how do I give it a easy name (for exemple PI_OS).
fvdw: you can use any name, as long as you follow the iSCSI Qualified Name Format
A quote from vmware website about iscsi target naming.
The iSCSI Qualified Name (IQN) format takes the form iqn.yyyy-mm.naming-authority:unique name, where:
yyyy-mm is the year and month when the naming authority was established.
naming-authority is the reverse syntax of the Internet domain name of the naming authority. For example, the iscsi.vmware.com naming authority can have the iSCSI qualified name form of iqn.1998-01.com.vmware.iscsi. The name indicates that the vmware.com domain name was registered in January of 1998, and iscsi is a subdomain, maintained by vmware.com.
unique name is any name you want to use, for example, the name of your host. The naming authority must make sure that any names assigned following the colon are unique, such as:
iqn.1998-01.com.vmware.iscsi:name1
iqn.1998-01.com.vmware.iscsi:name2
iqn.1998-01.com.vmware.iscsi:name999
.Hope I won't bother you with my questions, LUN is bit new to me as you may have guessed ;) but the challenge is interesting especially for using my raspberry Pi with retropie using the target LUN.
Moreover, as promised, I make an extra donation today of 20€ for both of you Fvdw & Jock for your kind support. Drink a beer at your sake ;)
Looking forward to reading you
Regards,