RESET NTFS PERMISSION – GUI


When we do data migration from one server to another server we will use fast copy or robocopy to get the same ACL in the target server or storage.

Some times the ACL will not get inherited to the sub folders or files, even when we try to do reset permission in the advanced tab in the security menu.

The following is the syntax to reset the folder permission in command mode.

icacls “Folder path\*” /T  /L  /Q /C /RESET

or you can download the GUI tool which will do the NTFS permission reset (i.e.) the permission will be applied to the sub folders and files successfully.

Url: https://www.dropbox.com/s/ipblchbgrzz4587/ResetPermission.zip?dl=0

 

 

 

Disk Consolidation Needed – Unable to access file since it is locked


If any backup running on your VM it will create a snapshot and after completion the snapshot will get removed. Sometimes it requires disk consolidation for the VM.

When we try to do disk consolidation of the VMDKs manually by right clicking on the VM and selecting Snapshot –> Consolidate.

However the consolidate operation may fail again, if the issue which caused the snapshot deletion operation to fail disk consolidation previously has not been cleared and shows an error “Unable to access file since it is locked”

VM-Consolidation1

 

 

VM-Consolidation-error1

 

I manually tried the scenarios like create another snapshot by switching off the VM and delete the snapshot manually for consolidation of VM disk and remove the VM from inventory and reregister the VM in the Vcenter which is also weird.

 

Solution:-

  1. From the VM summary identified the ESXI and do SSH login.

2. Ran the command “vmkfstools -D /vmfs/volumes/yourvolume/yourVM/yourlockedVM.vmdk

3. I could see the owner of the vmdk file which had the lock with MAC address ending “008ed

# vmkfstools -D /vmfs/volumes/VM_BLOCK_LUN0_VNX5200/VM server Folder/VM-

flat.vmdk

Lock [type 10c00001 offset 49518592 v 15, hb offset 3276800

gen 9, mode 1, owner 561795d7-66ffccd8-782c-b82a72d008ed mtime 797087

num 0 gblnum 0 gblgen 0 gblbrk 0]

Addr <4, 54, 3>, gen 4, links 1, type reg, flags 0, uid 0, gid 0, mode 600

len 107374182400, nb 102400 tbz 44371, cow 0, newSinceEpoch 102400, zla 3, bs 1048576

 

  1.  This is the ESXi server which has the lock on the VMDK file.
  2.  Next locate which ESXi host has a network adaptor with that MAC address.

 

  1.  Once confirmed I placed the host in maintenance mode, DRS vMotioned all VMs to another host in the cluster and restarted the hostd service or restart the server.

Syntax: #/etc/init.d/hostd restart

7. After restarting the host I can able to do consolidation of disk successfully and also storage migration.