Difference between revisions of "User:Sfiggins/NetApp Snapshot Restore Instructions"

From Labrats.us
Jump to navigationJump to search
Line 103: Line 103:
 
In vCenter (or ESXi), browse to the virtual machine, and identify where the hard drive is stored.  You can usually do this by viewing the virtual machine hardware stats, but you may have to look in the actual settings.
 
In vCenter (or ESXi), browse to the virtual machine, and identify where the hard drive is stored.  You can usually do this by viewing the virtual machine hardware stats, but you may have to look in the actual settings.
  
[[File:VM_Hardware.png]]
+
[[File:VM_Hardware_view.png]]
  
 
or
 
or

Revision as of 19:48, 16 November 2022

Instructions on how to restore from NetApp Snapshot for ESXi machines

Basic Information

Helper Virtual Machines

These are machines that you will need to get into in order to validate the snapshots and file paths. ESXi / vCenter datastore browser hides certain files, so you need to know the exact file structure and path on order to restore.

Denver - 10.255.6.228
Dallas - 10.255.8.228

NetApp Filers

These are the administrative consoles for the NetApps. You can connect tot he Web UI for verifying some information, but you will need to SHS to the console (CLI) in order to perform restoration from snapshots.

DEN1-AFF220 - 10.255.6.223
DAL1-AFF220 - 10.255.8.223

NetApp vServers

Each NetApp has a number of vServers associated with it. In order to restore, you will need to know what vServer you are restoring from.

DEN1-AFF220::> vserver show 
                               Admin      Operational Root
Vserver     Type    Subtype    State      State       Volume     Aggregate
----------- ------- ---------- ---------- ----------- ---------- ----------
AFF220-01   node    -          -          -           -          -
AFF220-02   node    -          -          -           -          -
DEN-SYSLOG  data    default    running    running     DENSYSLOG_ cifs_
                                                      root       datastore_
                                                                 1
DEN1-AFF220 admin   -          -          -           -          -
DEN1-VCIFS2 data    default    running    running     DEN1VCIFS2 cifs_
                                                      _root      datastore_
                                                                 1
DEN1-VFILER-1 
            data    default    running    running     DEN1VFILER cifs_
                                                      1_root     datastore_
                                                                 1
iscsi       data    default    running    running     iscsi_root iscsi_
                                                                 datastore_
                                                                 2
7 entries were displayed.

For vSphere hosts, this will be the following vServers, however these instructions would be valid for other vServers outside of sSphere.

Denver - DEN1-VFILER-1 
Dallas - DAL-VFILER-1

NOTE: Dallas and Denver naming formats are slightly different in this case, so verify that you have the correct vServer before continuing.

NetApp Volumes

You can get this from vCenter, however it is usually a good idea to validate the volumes on the NetApp filer.

DEN1-AFF220::> volume show -vserver DEN1-VFILER-1
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
DEN1-VFILER-1 
          DEN1VFILER1_root 
                       cifs_datastore_1 
                                    online     RW          1GB    971.8MB    0%
DEN1-VFILER-1 
          den1_datastore_1 
                       cifs_datastore_1 
                                    online     RW         22TB     1.60TB   67%
DEN1-VFILER-1 
          den1_datastore_2 
                       iscsi_datastore_2 
                                    online     RW         16TB    914.8GB   77%
3 entries were displayed.

NOTE: Volume names may vary. Please validate the volume that you are wanting to restore.

vCenter

vCenter is what you will need to use in order to control the virtual machine. Below is the vCenter server information.

Denver - 10.255.6.229

Preparation Steps

vCenter / ESXi - Shutdown the virtual machine

Because you will be restoring a disk image you will need to shut down the virtual machine. You will do this by logging into vCenter (or ESXi in some instances), navigating the the virtual machine, and powering it off. You may want to shut down from the OS, however the disk will be replaced, so disk consistency isn't important. You may just use vSphere to power it off rather than shutting it down.

vCenter / ESXi - Verify disk location

In vCenter (or ESXi), browse to the virtual machine, and identify where the hard drive is stored. You can usually do this by viewing the virtual machine hardware stats, but you may have to look in the actual settings.

VM Hardware view.png

or

VM Edit Disk.png

In this case, we are looking for volume den1_datastore_2 and path /den1-mfa1.

Verify files from the helper machine

Log into the helper machine, and verify the files.

$ ssh 10.255.6.228
sfiggins@10.255.6.228's password: 
Last login: Wed Nov 16 09:58:06 2022 from 10.255.22.138
[sfiggins@test-centos ~]$ cd /mnt/den1_datastore_2/den1-mfa1
[sfiggins@test-centos den1-mfa1]$ ls -la
total 39304696
drwxr-xr-x.   2 root root        4096 Nov 16 12:03 .
drwxr-xr-x. 207 root root       20480 Nov 16 12:30 ..
-rw-------.   1 root root  2483105792 Nov 16 12:38 den1-mfa1-000001-delta.vmdk
-rw-------.   1 root root         353 Nov 16 12:02 den1-mfa1-000001.vmdk
-rw-r--r--.   1 root root          92 Aug 12  2021 den1-mfa1-5c17aff3.hlog
-rw-------.   1 root root  8589934592 Mar 22  2022 den1-mfa1-d02c852f.vswp
-rw-------.   1 root root 38654705664 Nov 16 11:52 den1-mfa1-flat.vmdk
-rw-------.   1 root root        8684 Mar 22  2022 den1-mfa1.nvram
-rw-------.   1 root root  8603590692 Nov 16 11:53 den1-mfa1-Snapshot5.vmsn
-rw-------.   1 root root         552 Nov 16 10:50 den1-mfa1.vmdk
-rw-------.   1 root root         474 Nov 16 11:52 den1-mfa1.vmsd
-rwx------.   1 root root        3817 Nov 16 12:03 den1-mfa1.vmx
-rw-------.   1 root root          47 Nov 16 12:02 den1-mfa1.vmxf
-rw-------.   1 root root           0 Nov 16 10:28 den1-mfa1.vmx.lck
-rwxrwxr-x.   1 root root          92 Nov 14 17:09 .lck-2d07bf5000000000
-rwxrwxr-x.   1 root root          92 Nov 14 17:09 .lck-5470bf5000000000
-rwxrwxr-x.   1 root root          92 Nov 16 12:38 .lck-5627bf5000000000
-rwxrwxr-x.   1 root root          92 Nov 16 12:38 .lck-5727bf5000000000
-rwxrwxr-x.   1 root root          92 Nov 14 17:09 .lck-5870bf5000000000
-rwxrwxr-x.   1 root root          92 Nov 14 17:09 .lck-6070bf5000000000
-rwxrwxr-x.   1 root root          92 Nov 14 17:09 .lck-9e72bf5000000000
-rwxrwxr-x.   1 root root          92 Nov 16 12:38 .lck-db2fbf5000000000
-rwxrwxr-x.   1 root root          92 Nov 16 12:38 .lck-dc0dbf5000000000
-rwxrwxr-x.   1 root root          92 Nov 16 12:38 .lck-dd2fbf5000000000
-rw-r--r--.   1 root root      235283 Mar 22  2022 vmware-10.log
-rw-------.   1 root root      242976 Mar 22  2022 vmware-11.log
-rw-------.   1 root root      248885 Jun  2 22:05 vmware-12.log
-rw-r--r--.   1 root root      201190 Apr  1  2021 vmware-7.log
-rw-r--r--.   1 root root      402360 Apr 16  2021 vmware-8.log
-rw-r--r--.   1 root root      249333 Aug 12  2021 vmware-9.log
-rw-------.   1 root root      280951 Nov 16 12:33 vmware.log
-rw-------.   1 root root    90177536 Mar 22  2022 vmx-den1-mfa1-3492578607-1.vswp
-rw-------.   1 root root    90177536 Nov 16 10:28 vmx-den1-mfa1-3492578607-2.vswp

In this case, we are looking for the latest disk file. For this machine, which contains an vSphere snapshot, we are wanting to address the den1-mfa1-000001-delta.vmdk file.

NOTE: In vSphere, you will not see this file, and it will show you the WRONG file.

File:VM Datastore Disk.jpg