ISCSI Lun Recovery;
This Documet Contains These Titles Down Below;
When Do we Need Lun Recovery?
Recovering less than 1 TB Lun Scenario,
Recovering “2 part lun” Scenario,
When Do we Need Lun Recovery?
As you all know, When you loose 3 HDD from RAID 6 , you loose all of your datas, but Qnap has and advance Read-Only Feature that enables to backup your datas.
But, for ISCSI, it doesnt work. With this document, I’ll show you how to recover your ISCSI Luns. But we need 2 Qnap to recover.
ISCSI Lun Recovery Scenario 1:
Costumer lost 3 HDD on his RAID 6;
and even ISCSI targets& Luns seem good, ISCSI connection on windows failed, we got “no respond” error.
Must warn you, Qnapsupport Taiwan could only help after copying ISCSI luns to another Qnap, and I strongly advice you contact with them after ISCSI Lun copying finished.
First, create a new share folder on costumer device (169.254.100.100), and show path as his .@iscsi folder.
Also create a new network share folder on your Qnap (192.168.2.91)and show your .@iscsi folder
just copy these luns to your Qnap .@iscsi folder. (from 169.254.100.100 to 192.168.2.91)
After that, just use my iscsi lun recovery document to recover your ISCSI.
But at this case, My Qnap (192.168.2.91) had 4 single disk volumes, and I directly copy these ISCSI luns to a random share folder name “859yeni” accidently. If you wonder how I solve with this build, please go on this document.;
I create a share folder at second HDD, so these luns are at my second HDD, so after login with winscp, folder destination is
/share/HDB_DATA - > and my iscsi Luns were under “859yeni” folder
(if I copied filse to 1.th hdd, destination would be /share/HDA_DATA)
(if I copied file to 3.th hdd, destination would be /share/HDC_DATA)
Dont forget to take note of Lun names, and calculte their size;
first ISCSI Name : iSCSI-USERS_WALL-4d9d8b50
Size : 214,748,364,800 / 1024 / 1024 /1024 : 200 GB!
Second ISCSI Name : iSCSI-USERS-4c9c47f9
Size : 107,374,182,400 / 1024 / 1024 /1024 : 100 GB!
Now, I’ll create 2 fake luns with “thin provision” on my 2.th HDD, and size are 200 gb and 100 gb.
As I said I use 4 x single disk, and I have free size on my second HDD, so I create my ISCSI on second HDD! It will appears at share/HDB_DATA
Be sure our fake ISCSI Luns & Targets are created and online
Logout Winscp and Login again! Go to /share/HDB_DATA
now I change my “859yeni” folder name with .@iscsi.img
Now, go /etc/config
(original path : /mnt/HDA_ROOT/.config)
Find and double click on iscsi_trgt.conf file.
Now find and change lun name “100gb”, and change LunMetapath name as your ISCSI lun.
Do the same to your second 200 gb Lun;
Save & exit.
Try to reconnect your ISCSI via Window;
Wait, my 100 Gb ISCSI doesnt comes back, but no problem, costumer said he only need that 200 gb size lun. (I had one more 100 gb sized lun, probably Qnap couldnt recognize because of this. At this kind of cases, my advice is change your original .@iscsi.img name, backup your iscsi configration, then completlty remove your ISCSI lun & targets over Qnap. Fallow this document, and after recover datas, change everything back.
Recovering “2 part lun” Scenario
Send ISCSI luns that want to recover to another folder on your other Qnap. After transfer compete, Calculate ISCSI lun size, create a fake Lun at the same size with “thin provision”. change original .@iscsi.img to another folder name (just like .@iscsi.img2), and change iscsi luns containing folder with .@iscsi.img
Connect with wincsp, edit iscsi_trgt.conf with text editor under /etc/config. Change fake lun names (warning : not targer name) with your original Lun names.
Simply Restart Qnap after this configurations;
If you got trouble, just contact with Qnap support Taiwan and asked that your ISCSI luns lost, They’ll mount iscsi back again.