I have a iscsi disk 2TB large. I make backup of that disk every week. The backup script copies the image of the whole iscsi disk into a file on my NFS. Unfortunately, it does not copy the image in one piece, but splits it into chunks 1TB in size. So in my case, I have two 1TB files (plus one config file):
-r--r----- 1 root root 1099511627776 May 10 02:12 Backup-LUN-itmp-lun-0.000
-r--r----- 1 root root 1099500093440 May 10 03:50 Backup-LUN-itmp-lun-0.001
-rw-r--r-- 1 root root 251 May 10 03:50 Backup-LUN-itmp-lun-0.conf
Now I need to access my backup. Normally, if it was one file, I would map it to /dev/loop0 and then mount it as normal disk. But in my case, I cannot map two files to /dev/loop0. One option would be to cat those two files to create one large file, but I don't have extra 2TB space, and besides this is not a good solution anyway.
Can somebody please suggest a solution?
UPDATE
I have tried using dmsetup with linear target, as suggested by Andreas Wiese, but I get following error.
dmsetup create my-backup << EOF
> 0 2147483648 linear Backup-LUN-itmp-lun-0.000 0
> 2147483648 2147461120 linear Backup-LUN-itmp-lun-0.001 0
> EOF
device-mapper: reload ioctl on my-backup failed: Invalid argument
Command failed
dmesg contains following error:
device-mapper: table: 254:0: linear: dm-linear: Device lookup failed
device-mapper: ioctl: error adding target to table