[Solved]How to mount iSCSI file?

iSCSI related applications
Post Reply
martin-t
Starting out
Posts: 20
Joined: Fri Sep 19, 2008 9:37 pm

[Solved]How to mount iSCSI file?

Post by martin-t »

Hi,

I can see that the 509-PRO have my iSCSI partition as a file in

Code: Select all

/share/MD1_DATA/.@iscsi.img/
So I would like to mount it as read-only, so I try

Code: Select all

mount -t ext3 -o loop,ro iSCSI-users-4aeef499.000 /tmp/i
but it fails with

Code: Select all

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
Disk layout:

Code: Select all

# fdisk iSCSI-users-4aeef499.000
You must set cylinders.
You can do this from the extra functions menu.

Command (m for help): p

Disk iSCSI-users-4aeef499.000: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

                    Device Boot      Start         End      Blocks   Id  System
iSCSI-users-4aeef499.000p1               1       13054   104856223+  83  Linux
Partition 1 has different physical/logical endings:
     phys=(1023, 254, 63) logical=(13053, 254, 63)

Command (m for help):         
Does anyone know how to mount it?
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: How to mount iSCSI file?

Post by schumaku »

What is the purpose of locally mounting an iSCSI container?

In general, you use an iSCSI initiator on another system ot access this iSCSI target... if this is not clear, I suggest to stay away from iSCSI.
ahoogerhuis
Starting out
Posts: 44
Joined: Tue Oct 13, 2009 7:27 pm

Re: How to mount iSCSI file?

Post by ahoogerhuis »

The problem with this one:
mount -t ext3 -o loop,ro iSCSI-users-4aeef499.000 /tmp/i
is that the image is comparable to an image of a full disk, not a single partition. If QNap had included the binary for losetup you could have loop mounted this disk image as /dev/loop0, then loop mount a partition out of that device. Slightly contorted, but works. A slightly less clean way would be to use the --offset option to losetup and go for the partition in one single operation, if you know the offset.

This would be handy as it would allow to locally recover partial ocntent from iSCSI images or backup selective parts of them.

-A
martin-t
Starting out
Posts: 20
Joined: Fri Sep 19, 2008 9:37 pm

Re: How to mount iSCSI file?

Post by martin-t »

father_mande wrote: 1) web admin / disk management / virtual disk ... to access using 127.0.0.1 (loopback) or (not the best) using IP address of your nas (on previous firmware (on TS-219) I remeber that loop don't work as well ... (sorry I don't have time to test if it's solved as a forum Qnap response said).
Wow. That's great. It worked right away =)

Thanks.

Now I should be able to make rsync backup of the iscsi files.
gab696
Starting out
Posts: 10
Joined: Sat Sep 24, 2016 3:29 am

Re: [Solved]How to mount iSCSI file?

Post by gab696 »

I am triying to to this for the same purpose of father_mande (backup)
I've created a iSCSI + LUN target from QTS, connected the initiator from Win server 2012 formatted in NTFS from Windows server and realized a first backup.
Now from QTS 4.3 i've successfully mounted the virtual drive (127.0.0.1) and the backuped files are visible.
But if a add files on the iSCSI drive from WIN server the content of the virtual drive is not updated until i disconnect/delete and reconnect it.
It's very annoying, ic can't use this solution for an automated backup. Anyone is experiencing the same problems ? Thanks for your help !
User avatar
razormoon
Easy as a breeze
Posts: 465
Joined: Fri Feb 13, 2015 5:05 am
Location: Denver, CO

Re: [Solved]How to mount iSCSI file?

Post by razormoon »

I'm using the iSCSI so that the backups might "follow" me across firmware updates (to include updating to beta 4.3). Before upgrading, I "Safely Detach" the iSCSI so that when I restore it and the VMs, it is immediately realized.
I have been using the NAS IP through the Windows Server initiator just because it works. I do know that there are issues when utilizing "Service Binding" (doesn't work on anything but the first LAN interface) and also issues with Linux Station (support tickets have been opened and confirmed).
That being said, I'm just stumbling around trying to get things to work (with good results) without really knowing much about how to do certain things. :mrgreen:
:!: TVS-871-i7-16G 5.0.0.1932 Build 20220129, KODI, WSE 2019
:?: 1 x KINGSTON SNV325S2 as 2mb block cache, WDC WD40EFRX as RAID5, 1 x WDC WD40EFRX as iSCSI
:idea: APC PRO 1500 S
:-0 WIKI SUPPORT

"Nothing is impossible. Only expensive, illegal or both."
User avatar
OneCD
Guru
Posts: 12144
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [Solved]How to mount iSCSI file?

Post by OneCD »

gab696 wrote:ic can't use this solution for an automated backup.
Does the LUN Backup option in Storage Manager work?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
gab696
Starting out
Posts: 10
Joined: Sat Sep 24, 2016 3:29 am

Re: [Solved]How to mount iSCSI file?

Post by gab696 »

OneCD wrote:
gab696 wrote:ic can't use this solution for an automated backup.
Does the LUN Backup option in Storage Manager work?
yes but the final purpose is to RTRR sync the incremental backup to a distant NAS.
Backuping the LUN every day need is much more space consuming and the distant transfert need more time...
User avatar
OneCD
Guru
Posts: 12144
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [Solved]How to mount iSCSI file?

Post by OneCD »

Found this related thread. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Post Reply

Return to “iSCSI – Target & Virtual Disk”