3

I have a ESXi (4.1) server talking with a Windows Server 2008 R2 storage server, which presents some volumes as iSCSI targets using Microsoft's iSCSI software target; ESXi uses them as its datastores. All fine and good.

Microsoft's iSCSI implementation uses VHDs to store iSCSI LUNs, and has the ability to perform snapshots on them and then present these snapshots as additional iSCSI targets; so I can take a snapshot of an iSCSI LUN and then present it to an ESXi host in order to, say, recover a previous version of a VM.

Of course, when ESXi sees this new target, it refuses to automatically mount the VMFS volume, because it detects it as a snapshot. The usual solution would be to resignature it and mount it anyway.

But this can't be done, because the snapshot is read-only; trying to resignature it just fails.

When running esxcfg-volume -l, this is what I get:

VMFS3 UUID/label: 4e7adbec-ce616bc0-2470-000e0cafe516/ds3
Can mount: No (the original volume is still online)
Can resignature: Yes
Extent name: naa.60003fff4ea387cd98a2dfd21c4f195b:1     range: 0 - 1048575 (MB)

If I remove the original datastore, I can indeed mount the read-only snapshot; but if the original datastore remains online, the snapshot can't be mounted unless resignatured, which also can't be done because it's read-only.

So, my question is: is there any way to mount a VMFS read-only snapshot while still keeping online the VMFS volume the snapshot is based on?

2
  • totally crazy thought here since I don't use w2k8r2 storage servers, but can you stop iscsi subsystem and just copy the vhd then edit the disk quid of that then remount the vhd to the iscsi subsystem
    – tony roth
    Sep 22, 2011 at 14:52
  • I want to access a previous snapshot of the VHD, f.e. because I need to recover a VM that is now corrupted or lost on the current VHD.
    – Massimo
    Sep 22, 2011 at 15:02

2 Answers 2

0

You could temporarily create a VM running ESXi, mount the "read-only" LUN on it as read-write, resignature it, eject it and mount it on the underlying host. That is if you can get the snap to be shared by Windows as RW anyway. Sound like a plan?

4
  • 1
    I think you can't export the snapshot R/W - that's the root of the problem. I would just use another ESX(i) instance which does not have the original datastore mounted as a workaround for recovery purposes.
    – the-wabbit
    Sep 22, 2011 at 15:07
  • That's right, the main problem is not having the ability to export the snapshot R/W or to clone it to a new VHD.
    – Massimo
    Sep 22, 2011 at 15:11
  • Is there literally no way to make a RW version of the snap without restoring it back to the original LUN? If not that sounds pretty inflexible.
    – Chopper3
    Sep 22, 2011 at 15:25
  • Looks like there isn't, at least with Microsoft's software iSCSI target.
    – Massimo
    Sep 22, 2011 at 15:26
0

Looks like this can't be done. If the original VMFS volume is online, then a snapshot of it can only be mounted by giving it a new signature (which can't be done on a read-only snapshot).

Possible solutions: either take offline the original volume, or mount the snapshot on another host which doesn't have the original volume mounted.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .