VMware Solutions Discussions

'Behind the scenes' change underlaying netapp volume of a VMWare datastore

ERICBROSE
3,326 Views

Hey All, Fairly new to NetApp and VMware so pardon me ahead of time for any mistaken terminology. This might actually need to go to a VMWare forum too, but thought i would ask here first.

We are using powershell (PowerCLI and Data OnTAP) to do all the following.

We currently have a process that occurs bi-weekly and wondering if/how we can stream line.

In a nutshell. in NetApp we have a "Gold" volume and a "Live+OldDate" volume. during our process, we blow away the "Live+OldDate" volume, take a snapshot of the Gold Volume, then make a new "Live+CurrentDate" volume of the Gold snapshot.

In VMware. We have a "Live" data store attached to the "Live+OldDate" volume.

We have to un-register all the VM's in the "Live DS", unmount the "Live DS", Recreate a new "Live DS" (with the new Live Volume), then re-register the VM's.

The thing is, the VM's stay the same (for the most part...)

So been playing around and finding some issue.

Instead of having a "Live+OldDate" volume. we thought we could just create a "Live" volume. Then during our process

Power off all the VM's in the Live DS.

then in NetApp, nename our "Live" volume to "Live+ArchiveDate"

create a new "Live" Volume from the Gold SS

Power on all the VM's.

It seems though that the VMware Datastore is hard coded to the volume it was created on. So if you rename the existing volume. it also renames it somehow in VMWare and i can't for the life of me sort out how to change it for the Datastore without unmounting and mounting again.

Thanks ahead of time for any assistance and or help you all can provide.

Cheers

Eric

1 ACCEPTED SOLUTION

aborzenkov
3,326 Views

I'm not exactly sure what do you mean under "data store is changed", but as a general rule - volume name is relevant only during initial mount request. When request is completed client gets back opaque handle that is now used to access data. Renaming volume does not change this handle, so any client that had volume mounted under old name continues to access the same volume, even though it now has new name. That's probably what you observe.

You need to remount data store to actually access new volume. There is no way to switch it on the fly.

View solution in original post

4 REPLIES 4

aborzenkov
3,326 Views

First obvious question - NFS or FCP/iSCSI?

ERICBROSE
3,326 Views

Sorry. like I said... Newbie

We are using NFS.

Here are the commands I am running

#Create New Snapshot of Gold Volume

New-NaSnapshot -TargetName $GoldVol -SnapName $Goldss

#Rename Live Volume to Live+Current Date

ReName-NaVol -Name $LiveVol -NewName $LiveDate

#Create New Flexclone NFS Volume

New-NaVolClone -CloneVolume $LiveVol -ParentVolume $Goldss

#Create New Export

Add-NaNfsExport -Persistent -Path $NfsPath -ReadWrite $IPRange -Root $IPRange

What happens though is as soon as run the second command to rename the "Live" Volume, the VMWare Datastore automatically gets changed too

Thanks,

Eric

aborzenkov
3,327 Views

I'm not exactly sure what do you mean under "data store is changed", but as a general rule - volume name is relevant only during initial mount request. When request is completed client gets back opaque handle that is now used to access data. Renaming volume does not change this handle, so any client that had volume mounted under old name continues to access the same volume, even though it now has new name. That's probably what you observe.

You need to remount data store to actually access new volume. There is no way to switch it on the fly.

ERICBROSE
3,326 Views

Thanks!
Thats what we are seeing. Appreciate your response/answer!

Eric

Public