My ISCSI Luns Disappeared!

I – Recover ISCSI with official Qnap Way with linux commands;

II – Recover ISCSI With 4.1 Firmware “Restore Configration” Commands

III – Recover ISCSI with Editing iSCSI Configration File

.

I – Recover ISCSI with official Qnap Way with linux commands;

Here you can Download Offical Qnap Lun Recovery Document form this link;

iSCSI_LUN_Recovery

.

II – Recover ISCSI With 4.1 Firmware “Restore Configration” Commands

1 – Go to .@backup_cofig Folder;

cd /share/MD0_DATA/.@backup_config

.

2 – List your config files;

[/share/MD0_DATA/.@backup_config] # ll

drwxr-xr-x    2 admin    administ      4.0k Dec  3 03:04 ./

drwxrwxrwx   28 admin    administ      4.0k Dec  3 09:11 ../

-rw-r–r–    1 admin    administ     33.3k Dec  3 03:04 0_20141203_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Nov 26 01:04 1_20141126_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Nov 19 01:04 2_20141119_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Nov 12 01:04 3_20141112_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Nov  5 01:04 4_20141105_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Oct 29 01:04 5_20141029_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Oct 22 01:04 6_20141022_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Oct 15 01:04 7_20141015_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Oct  8 01:04 8_20141008_0304.tar.gz

-rw-r–r–    1 admin    administ     35.5k Oct  1 01:04 9_20141001_0304.tar.gz

and you’ll see your config backup files which automaticly backedup every week

.

3 – unzip backup files

This one is backed up at 3 December 2014 (20141203)

-rw-r–r–    1 admin    administ     33.3k Dec  3 03:04 0_20141203_0304.tar.gz

so type this command;

tar zxvf 1_20141126_0304.tar.gz

.

4 – Copy & Paste Configration file

cp etc/config/iscsi_trgt.conf /etc/config/

.

Here is an example of “How to recover” command;

qnap iscsi configration fix

Result;

qnap iscsi configration

.

III – Recover ISCSI with Editing iSCSI Configration File

Also, I think Qnap offical Document is a little bir confusing, so you can use my easier Way to Recover Back your ISCSI;

1 – First, be sure your lun is under .@iscsi folder;

Download winscp and login device;

Go up one folder. All of your datas are under “share” folder. Go to “/share/HDA_DATA/.@iscsi.img and be sure your iscsi lun shluld be there.

2 – Now, this part is important. Copy your ISCSI name to a text file, we gonna use it soon.

Also, your ISCSI size is important, so calculate your ISCSI size by this way;

Your ISCSI size x 1024 x 1024 x 1024 = 1,073,741,824

So my ISCSI size is : 1 Gb

3 – Login Qnap, create ıscsı with thin provision, and 1 Gb size. I give “backup” to my lun name,

4 – Now, Logout and Login with winscp once again, and go to this folders;

etc ->config -> and double click on iscsi_trgt.conf

(Real folder path: /mnt/HDA_ROOT/.config)

5 – Find “backup” and change name with “lun”

İf you couldnt remember iscsi lun full name, go to /share/HDA_DATA/ back again. Press F2 and copy+past lun full name.

Also, change name only to “:001″

On the left side, number at the end of the first part “001″ means how many parts your ISCSI has.

On the right side, number at the end of the first part “000″ means how many part is your ISCSI. Mine is only 1 part. If you have a larger size, also you can see same files end with “000 / 001 / 002″ and it means these are the partition of your ISCSI

If your ISCSI has 3 part (like 000, 001, 002), make number at left side to “003″

and

Save & exit

6 – Connect your ISCSI back to Windows again, and Restart Qnap… (Warning : İf you dont restart device, your ISCSI lun seem as RAW file on Windows.)

..And…

Here it comes back!

Warning : İf you dont restart device, your ISCSI lun seem as RAW file on Windows. (I want to repeat again,)

VN:F [1.9.22_1171]
Rating: 9.8/10 (4 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)
ISCSI Lun Alanlarım Kayboldu!My ISCSI Luns Disappeared!, 9.8 out of 10 based on 4 ratings

One Response to My ISCSI Luns Disappeared!

  1. Eslam says:

    my lun is about 36 partition whit 1024 TB capacity per partition what if i delete 3 partition from it how can i restore it even if i lost some data.

Leave a Reply to Eslam Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>