Ok. Today I spent a great deal of time messing with iSCSI on the gen2. So far, I have gotten it to host a target successfully. (I have connected to the hosted target, created a file system, copied files.)
I have now figured out how to get Virtual Volume manager working (kinda? Needs more testing), as well, and I have added some improvements to the init script hijack to make things work more as you expect them to.
What you need:
1) you need some files from the MyCloud Mirror source package. Namely, some of the contents of the cramfs folder. The MyCloud Gen2 lacks certain administration programs needed for the web interface to function. (It calls iscsi_mgr.cgi, which wraps some console commands. Those commands are missing.)
2) You need Fox_Exe's WD_Crack package. You will also need to edit it a bit once it is installed. Specifically, you will need to have certain files copied into the root filesystem by its init script, and you will need to change two lines of his define.js file so that your MyCloud reports itself as a MyCloud Mirror. That will turn on the Storage tab, and turn on iSCSI options.
Now, the juicy details.
1) either extract the following files from the MyCloudMirror GPL sources yourself, or pull them from here:
[I have broken it up into subfolders, sorry if that is annoying.]
2) sftp into your mycloud, and create a folder on /mnt/HD/HD_a2 called "extras". Place additional subfolders inside, called 'etc', 'usr', 'bin', and 'sbin', then create additional subfolders under usr containing 'bin' and 'sbin'. These will contain whatever special goodies we want to get copied back into the ramdisk after a reboot, and are named appropriately.
3) copy the above files into the following folder we just made:
4) locate Fox_exe 's WD_Crack package on your hard drive. It is located at /mnt/HD/HD_a2/Nas_Progs/WDCrack . Inside you will find the following files:
In define.js, we need to make the MyCloud think it is a MyCloud Mirror. We do that by changing the top two lines, so that they read as follows:
var DEV_NAME = " [WD My Cloud EX1100 ™]";
var MODEL_NAME = "BG2Y";
in init.sh, we want to hijack the init script to have it restore our binary payloads, which are needed to turn on iscsi. Change it so that it looks a bit like this:
ln -sf $INSTALL_DIR/define.js $ORIGINAL_FILE
ln -sf $INSTALL_DIR/web /var/www/WDCrack
## Begin binary copy hijack
cp -R /mnt/HD/HD_a2/extras/* /
## End binary copy hijack
## Initialize iSCSI stuff
## Initialize virtual volume manager stuff
then reboot the mycloud.
When the mycloud comes back up, you will have access to the [storage] tab, and the iscsi section for creating targets will be active, and functional.
For the curious, the mycloud stores the target LUNs as image files, contained in /mnt/HD/HD_a2/.systemfile/iscsi_images .
It appears to be damned skippy fast too. I copied a 600mb disk image to a 1gb iscsi lun, at over 200mb sec from a windows host. (Configured with iscsi initiator)