Chinaunix首页 | 论坛 | 博客
  • 博客访问: 58897
  • 博文数量: 44
  • 博客积分: 1245
  • 博客等级: 中尉
  • 技术积分: 255
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 10:41
文章分类

全部博文(44)

文章存档

2013年(1)

2012年(5)

2011年(38)

我的朋友

分类: 服务器与存储

2011-09-13 11:06:08

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

  1. Log into the filer as root via SSH
  2. 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

  3. 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

  4. 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

  1. Log into the filer as root via SSH
  2. 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

  3. 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

  4. 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)

  5. When the volume has completed cloning, ensure that it has been exported:

    FILER1> exportfs

  6. 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

  1. Log into the filer as root via SSH
  2. 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

  3. 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.

  4. 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

  1. 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
      .


  2.  Registering the Virtual Machine that you would like to restore:

    • In the viClient, select the ESX host that you mounted the restored NFS datastore to.
    • Select the configuration tab; then the storage link; then double-click NFS datastore to open it.
    • In the Datastore Browser, locate the VM which you would like to restore, and select the folder on the right to list the files on the left.
    • Locate the vmx file from the list on the right, then right-click the vmx file and select add to inventory.
    • Follow the wizard to register the VMX to the ESX host chosen to mount to the restored NFS datastore to.

      CAUTION: Do not power on the VM.

    • Once the registration is complete, right-click on the VM immediately and select migrate to use the migration wizard to move the VM to a production NFS datastore.
  3. 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.

  4. 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

  5. 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.

  6. 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) |
给主人留下些什么吧!~~