Please take a moment to read http://bit.ly/demandglobalchange, to help share the message and support the initiative to tell our leaders to focus on addressing the global world problems, instead of complaining about the effects of their lack of leadership. Be a leader yourself, and share this with as many people as possible. #demandglobalchange // https://www.facebook.com/demandglobalchange



Please consider donating: https://www.corelan.be/index.php/donate/


4,447 views | This page as PDF

How to mount an Openfiler snapshot in Windows

After playing with Openfiler for a while, I started wondering how I could get access to a snapshot that was created with Openfiler.

This is how it works (according to me, I just hope Openfiler and iSCSI Enterprise Target find another way to make this easier)

On one of my LUN’s, I have created a snapshot schedule . The original LUN is mounted as drive G: on my system.

After the snapshot was created, this is what I found on the filesystem :

[root@openfiler1 storage3]# pwd
/dev/storage3
[root@openfiler1 storage3]# ls -al
total 0
drwx------ 2 root root 80 Aug 15 13:22 .
drwxr-xr-x 11 root root 3340 Aug 15 13:22 ..
lrwxrwxrwx 1 root root 25 Aug 13 00:00 lun3 ->
             /dev/mapper/storage3-lun3
lrwxrwxrwx 1 root root 44 Aug 13 00:00 of.snapshot.lun3.sched0 ->
             /dev/mapper/storage3-of.snapshot.lun3.sched0

 

So the snapshot is stored as /dev/storage3/of.snapshot.lun3.sched0. On the original system, this drive that was snapshotted into /dev/storage3/of.snapshot.lun3.sched0 is mounted as G:

If you add this snapshot lun into the /etc/ietd.conf file, you should be able to mount it

#
# PLEASE DO NOT MODIFY THIS CONFIGURATION FILE!
# This configuration file was auto-generated
# by Openfiler. Please do not modify it.
#
# Generated at: Wed Aug 15 13:22:20 CEST 2007
# 

Target iqn.2006-01.com.openfiler:storage1.lun01
Lun 0 Path=/dev/storage1/lun01,ScsiSN=QsV92w-LCLO,Type=fileio

Target iqn.2006-01.com.openfiler:storage2.lun2
Lun 0 Path=/dev/storage2/lun2,ScsiSN=NHt8t3-ueGA,Type=fileio 

Target iqn.2006-01.com.openfiler:storage3.lun3
Lun 0 Path=/dev/storage3/lun3,ScsiSN=CZklf2-quoJ,Type=fileio 

Target iqn.2006-01.com.openfiler:storage3ss.lun3
Lun 0 Path=/dev/storage3/of.snapshot.lun3.sched0,Type=fileio 

# End of Openfiler iSCSI configuration

Now restart iSCSI Enterprise Target

[root@openfiler1 storage3]# service iscsi-target restart
Stopping iSCSI target service: [ OK ]
Starting iSCSI target service: [ OK ]
[root@openfiler1 storage3]#

Important : the snapshot will carry the same drive letter, so you won’t be able to mount the snapshot on the same machine.  Go to MS iSCSI Initiator on another Windows host and refresh the targets. You will see a new target 

Click ‘Log on’ to mount the new lun

081507_1206_Howtomounta1

If you open Disk Management on your Windows host, the new snapshot should be added as a new disk. The disk will be declared as a “Foreign Disk”. Right click and choose “Import Foreign Disk”. You should see a “Foreign Disk Group” with 1 disk. When the mount is completed, you’ll get a G: drive with the same drive name as what you have configured on the original system.

081507_1206_Howtomounta2

 

Note : Openfiler doesn’t recognize this custom lun in its administration tool. Just make sure to remove the custom entries in /etc/ietd.conf again when you’ve restored your data.

2007 – 2008, Corelan Team (corelanc0d3r). All rights reserved.

Related Posts:

Comments are closed.

Corelan Live training

Since 2011, Corelan GCV has been teaching live win32 exploit dev classes at various security cons and private companies & organizations.

You can read more about the training and schedules here

Demand Global Change

The world needs your help !

Please take a few moments to read the "Demand Global Change Call For Action" document at
http://bit.ly/demandglobalchange
Read the full document at
http://bit.ly/demandglobalchange_full and share the message with as many people as possible.

Like the Facebook page, and SHARE it with everyone you know.



Donate

Want to support the Corelan Team community ? Click here to go to our donations page.

Want to donate BTC to Corelan Team?



Your donation will help funding server hosting.

Protected by Copyscape Web Plagiarism Tool

Corelan Team Merchandise

You can support Corelan Team by donating or purchasing items from the official Corelan Team merchandising store.

Corelan on IRC

You can chat with us and our friends on #corelan (freenode IRC)

Categories