ONTAP Discussions

Highlighted

Restore folders with .vmdk

Good Morning,

i am new to the forum and a novice to NetApp.


I have a network with Vmware and NetApp storage. We had a folder deleted which we thought were old files which were no longer used but after deleting our DFS/Print vm server will not Power on. Says it need a .vmdk file that was one of the deleted files.

 

We tried looking in the backup tapes but could not find the files. I have been researching and there is mentioning of a snapshot directory that may retain these files but it is hidden. 

Long story short is we need to restore these files to return access to NFS file shares and print services.

 

Is there any way to do so?

 

Thanks for any help.

 

Ed

4 REPLIES 4
Highlighted

Re: Restore folders with .vmdk

You can navigate to the snapshot directory in NFS via the .snapshot path.

 

1. Mount the NFS export in question

2. At the top level, cd to .snapshot

3. cd to the desired snapshot

4. Navigate in the snapshot to the location of the files

 

For example:

 

# mount | grep flexgroup
demo:/flexgroup_16 on /flexgroup type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=x.x.x.x,mountvers=3,mountport=635,mountproto=udp,local_lock=none,addr=x.x.x.x)

# pwd
/flexgroup

# cd .snapshot
-bash: cd: .snapshot: No such file or directory

 

If you can't get to the .snapshot directory, then snapdir-access likely needs to be enabled on the volume:

 

::*> volume show -vserver DEMO -volume flexgroup_16 -fields snapdir-access
vserver volume snapdir-access
------- ------------ --------------
DEMO flexgroup_16 false

 

::*> volume modify -vserver DEMO -volume flexgroup_16 -snapdir-access true

 

If you have to enable that option, you'd have to remount. Now I can get to my snapshot.

 

# umount /flexgroup

# mount -o nfsvers=3 DEMO:/flexgroup_16 /flexgroup

# cd /flexgroup/.snapshot
[root@centos7 .snapshot]# ls -la
total 12
drwxrwxrwx 3 root root 4096 Jun 22 14:55 .
drwxr-xr-x 5 root root 4096 Jul 28 10:39 ..
drwxr-xr-x 5 root root 4096 Mar 30 2017 base

Highlighted

Re: Restore folders with .vmdk

Alternatively, if you can't figure that out, I'd create a volume from a snapshot, called a flexclone:

 

https://docs.netapp.com/ontap-9/index.jsp?topic=%2Fcom.netapp.doc.dot-cm-cmpr-920%2Fvolume__clone__create.html&lang=en

 

Make sure to split it off so the snapshots can be deleted as needed. Once you have your data, the clone volume can be deleted safely.

Highlighted

Re: Restore folders with .vmdk

One caveat: FlexClone requires a separate license.

NetApp Insights To Action
All Community Forums