Description
Workaround for a SnapManager for Virtual Infrastructure (SMVI) failed restore attempt.
Procedure
There are two options for cloning an entire NFS datastore, and two
further options if only a restoration of a single VM is required.
Note:
Please check licensing requirements for each of the options below, and ensure that the correct procedure is selected.
Procedure 1:
Creating a copy of a VMDK file or VM directory with a FlexClone license
- Log into the filer as root via SSH
- Identify the snapshot which you would like to use to clone the volume to a new volume:
FILER1> snap list nfsds1
Volume nfsds1
working...
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) May 08 20:46 restoreDS
- Use "snap restore" to create a new file from the existing snapshot in the original volume:
FILER1> snap restore -s restoreDS -r /vol/nfsds1/test1/test1_restored.vmx /vol/nfsds1/test1/test1.vmx
- where "-s restoreDS" is the name of the snapshot you are restoring from
- where "-r /vol/nfsds1/test1/test1_restored.vmx" is the name of the new file you are cloning
- where "/vol/nfsds1/test1/test1.vmx" is the name of the original file you will be copying out of the snapshot
- Repeat step 3 for each of the files you need to restore
Note:
Each VMDK file is comprised of two single
files, a "vmname.vmdk" and a corresponding "vmname-flat.vmdk"; both of
these files are required for adding to a VM
Procedure 2: Creating a full NFS datastore restore with a FlexClone license
- Log into the filer as root via SSH
- Identify the snapshot that is to be used to clone the volume to a new volume:
FILER1> snap list nfsds1
Volume nfsds1
working...
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) May 08 20:46 restoreDS
- Use "vol clone create" to create a new volume from the existing snapshot in the original volume:
FILER1> vol clone create nfsds1_restored -s none -b nfsds1 restoreDS
- where "nfsds1_restored" is the name of the new volume you are creating
- where "-s none" indicates you do not want to turn on space reservation
- where "nfsds1" is the name of the original volume you are cloning from
- where "restoreDS" is the name of the snapshot you are creating the new datastore from
- Monitor the vclone using snap list:
FILER1> snap list nfsds1
Volume nfsds1
working...
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) May 08 20:46 restoreDS (busy,vclone)
- When the volume has completed cloning, ensure that it has been exported:
FILER1> exportfs
- Verifiy that the vclone is done, and mount the new NFS volume
within ESX (see "Mounting an NFS datastore to VMware ESX instructions"
below)
Procedure 3: Creating a full NFS datastore restore without a FlexClone license
- Log into the filer as root via SSH
- Identify the snapshot to be used to clone the volume to a new volume:
FILER1> snap list nfsds1
Volume nfsds1
working...
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) May 08 20:46 restoreDS
- Run ndmpcopy to create a copy of the entire volume to the
existing volume (if the datastore has been devoid of data and no
relevant data exists within it - there will be a revert to the data in
the snapshot and the existing data within the volume will be
over-written):
FILER1> ndmpcopy /vol/v234/.snapshot/test3/ /vol/nfsds1
- where /vol/nfsds1/.snapshot/restoreDS is the name of the snapshot you are restoring from
- where /vol/nfsds1 is the name of the volume you will be overwriting the data into
There is also an option to create a new volume and then copy the data into the new volume instead.
- When the ndmpcopy has completed, it will be possible to remount
the NFS datastore within VMware ESX servers as required (see "Mounting
an NFS datastore to VMware ESX instructions" below)
Procedure 4: Mounting an NFS datastore to VMware ESX instructions
- Mounting the NFS datastore to an ESX host:
- Open the viClient to the vCenter server.
- Select an ESX host which you would like to use to perform
the restore (this does not have to be in maintenance mode, but is
recommended, if possible).
- Select the configuration tab.
- Select the storage link.
- Select add storage.
- use the add storage wizard to mount the newly created clone volume from the steps above.
For information on how to manually restore a VMware ESX virtual machine from a snapshot volume/LUN, see KB article
.
- Registering the Virtual Machine that you would like to restore:
- Once the migration has completed, follow the steps below to
manually remove the temporary NFS datastore after the restore has
completed.
Manually removing the temporary NFS datastore after restore has completed:
- Open a viClient to the ESX host that was used for the restore.
- Select the storage tab.
- Right-click on the NFS datastore that you used for the restoration and select delete. Open a telnet/SSH session to the filer that has the mount.
- Use the vol status command to identify the clone from the original volume:
FILER> vol status
Volume State Status Options
nfsds1 online raid_dp, flex create_ucode=on, guarantee=none
nfsds1_restored online raid_dp, flex create_ucode=on, guarantee=none
- Offline the cloned volume:
FILER> vol offline nfsds1_restored
Fri Sep 10 11:44:12 EDT [wafl.vvol.offline:info]: Volume 'nfsds1_restored' has been set temporarily offline
Volume 'nfsds1_restored' is now offline
Note: After offlining
the volume, before destroying it, verify that the VM's on the original
volume are still accessible in case there was a typo in the offline and
the wrong volume was offlined in the process;
if the wrong volume was offlined in this step, type volume online vol_name to bring it back online and restore connectivity.
- Destroy the offlined volume:
FILER> vol destroy nfsds1_restored
Are you sure you want to destroy this volume? yes
Fri Sep 10 11:44:22 EDT [wafl.vvol.destroyed:info]: Volume nfsds1_restored destroyed.
Volume 'nfsds1_restored' destroyed.
阅读(468) | 评论(0) | 转发(0) |