ONTAP Discussions

SnapMirror and DR Testing

ROBERTO1985
4,264 Views

Hi, I have the following scenario:

Primary Machine: vfiler1 running on /vol/vol1

DR Machine: /vol/vol1 in SnapMirror relation with /vol/vol1 of Primary Machine

I'd like to set up a DR Testing on remote site without interrupting snapmirror replication. In order to achieve this I do a FlexClone of /vol/vol1 from last snapmirror snapshot (new volume: /vol/dr_vol1). At this point I try to recreate vfiler1 using the command: vfiler create vfiler1 -r /vol/dr_vol1 (so I can keep all the options and shares defined) but it fails with the following message:

[Filer.cantRestor.migrat:error]: Could not restore vFiler unit migration information: Inappropriate file type or format.

Could not import vfiler configuration from the given etcstore "/vol/dr_vol1" for vfiler "vfiler1".Unable to recreate vfiler vfiler1.

Do you have any idea about this error?

1 ACCEPTED SOLUTION

andrc
4,264 Views

The answer is in the manpage for `vfiler`

When re-creating a Snapmirrored vfiler using the vfiler create vfilername -r path form of the command, the specified vfiler_name parameter must match the name of the original vfiler exactly, and the path must match the first path that was specified in the vfiler create command that originally created the vfiler.

So the issue is that the filer is expecting /vol/vol1 as the path for the vfiler, not /vol/dr_vol1.

For future reference you may want to look into the functionality of `vfiler dr` instead of SnapMirroring and manually recreating the vfiler.


View solution in original post

4 REPLIES 4

andrc
4,265 Views

The answer is in the manpage for `vfiler`

When re-creating a Snapmirrored vfiler using the vfiler create vfilername -r path form of the command, the specified vfiler_name parameter must match the name of the original vfiler exactly, and the path must match the first path that was specified in the vfiler create command that originally created the vfiler.

So the issue is that the filer is expecting /vol/vol1 as the path for the vfiler, not /vol/dr_vol1.

For future reference you may want to look into the functionality of `vfiler dr` instead of SnapMirroring and manually recreating the vfiler.


scottgelb
4,264 Views

Definitely look at vfiler dr and also the beta plugin to the NMC from your NetApp SE if you want a GUI version of it.  The requirement that you mentioned you want to keep the mirrors running wont' work with vFiler DR though since activating the dr vfiler breaks the mirrors.  When completed, you vfiler dr resync and mirrors are not updating until after resync.  dr_vol1 would need to be renamed to vol1 to match the source (or change both source and dest so they are the same name).

To not interupt snapmirror, you would need to create a new vFiler with the flexclone... creating a vfiler will overwrite any contents of /etc in the first volume specified.... to do what you want you could create a new vfiler root, then specify that vfiler root and dr_vol1 as the next volume in the vfiler...you then would manually need to create exports and shares.  One way to recreate those would be to run "vfiler run vfilername confiug dump -f -v dumpfile" then copy that file to the new dr vfiler and do config restore on it... you will then get your cifs shares and nfs exports back.. unfortunately config dump won't backup igroups and lun mappings so you will have to recreate manually... So if you don't mind a little work and some help from config dump to get the shares and exports back...you could create a new vfiler this way and keep the mirrors running... this would also work if you run vfiler dr which would be a better way to keep the target volume mirrored ina  dr vfiler.

ROBERTO1985
4,264 Views

Actually I'm not using vfiler dr commands because I have a vfiler that owns multiple volumes and some of these don't have to be replicated. Vfiler dr configure or resync try to replicate all volume of vfiler and gives error if doesn't find the destination volume. Anyway the hint you provided is right; using the same name of the source volume for the flexclone in DR let me recreate the vfiler correctly.

Thanks,

Roberto

scottgelb
4,264 Views

This is a good workaround as long as only one volume and no chance of the same volume name.. if the vFiler had multiple volumes and a name matched on the target that wasn't a replicated volume, the create -r would pick up the target volume anyway, but doesn't sound like the case here but a consideration to be careful with.  After create -r, the network will be unconfigured but you can run ifconfig on an interface with the vfiler ip (or vfiler add -i and vfiler remove -i if you want a different ip before the ifconfig).  setup -e is also an option but will recreate some fles (hosts.equiv, exports, resolv.conf, etc.) so I prefer running ifconfig of an unconfigured ip already added to a vfiler.

Public