How to mount an Openfiler snapshot in Windows

This article has 5,153 views

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.

© Corelan Consulting BV. All rights reserved. ​The contents of this page may not be reproduced, redistributed, or republished, in whole or in part, for commercial or non-commercial purposes without prior written permission. See the Terms of Use and Privacy Policy for details.