mount split disk image in raw format

i have a NAS (qnap) where i hosted a LUN a year ago, where i stored some backup data. I made a backup of the lun in raw format (functionality of the nas) and deleted the lun. yesterday i found out, that i need some files that are stored in the lun. I read in the qnap board, that its possible to mount the drive directly into linux. I have also seen some threads where this is described, but the problem is, that the raw format files are splitted into two files (1099GB and 190GB) and i really dont know what to do now.

I used fdisk to read out the info of the rawdata, maybe this could help:

First file:

Disk Backup-LUN-backup-backupStorage.000: 1099.5 GB, 1099511627776 bytes
255 Köpfe, 63 Sektoren/Spur, 133674 Zylinder, zusammen 2147483648 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Festplattenidentifikation: 0xd824e97f

Backup-LUN-backup-backupStorage.000p1  63  2516576319  1258288128+   7  HPFS/NTFS/exFAT

Second file:

Disk Backup-LUN-backup-backupStorage.001: 189.0 GB, 188978561024 bytes
255 Köpfe, 63 Sektoren/Spur, 22975 Zylinder, zusammen 369098752 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Festplattenidentifikation: 0x00000000

i hope, that somebody could help me.

best regards!


If you have enough extra space, you can combine the files. Either add the second part to the first:

cat < Backup-LUN-backup-backupStorage.001 >> Backup-LUN-backup-backupStorage.000

Or create a new image from both, if you 1290 GB of free space:

cat Backup-LUN-backup-backupStorage.00{0,1} > Backup-LUN-backup-backupStorage

Then it's not very difficult to mount, given the fdisk output in your question:

sudo mount -o offset=$((512*63)) Backup-LUN-backup-backupStorage.000 /some/path

Where:

  • Replace Backup-LUN-backup-backupStorage.000 with whatever the name of the final image is (Backup-LUN-backup-backupStorage if you made a new image, for example)
  • 63 is the starting sector of the first partition, as seen in the fdisk output
  • 512 is the sector size in bytes, also given in the fdisk output.
  • You might have to specify the filesystem type using -t, it's not clear from the fdisk output which one it ism exactly.