Showing posts with label File Server. Show all posts
Showing posts with label File Server. Show all posts

Saturday, February 4, 2017

Cluster Disk in Failover Cluster Failed to Start (File Server)

Recently one of the customer had an upgrade in their firmware of their storage.  Their setup is as follow :

2 Hosts in Windows 2012 Server.  Using a shared storage and it’s setup with Windows 2012 Failover Cluster.

After both the hosts were rebooted, the Cluster Disk that was assigned as FileServer in the Failover Cluster failed to start.  From what I know it’s because both the hosts are assuming they are the owner of that particular Disk.  So both are locked to the resources.

SNAGHTML509baf5

I clicked on the “more details” to check it displayed as :

image

Further probing into the Disk Management and found that the Disk is in RAW. Before this it was in NTFS format.

image

Next I go into the shared Storage Management (which is the Dell Storage Manager in this scenario), tried to repair but in vain.  It displayed as follow :

SNAGHTML50f06bb

After going through the logs as earlier on, found that the resource was locked due to both the hosts are assume they are the rightful owner and both are trying to write at the same time.  In a Windows cluster environment, there’s only one owner at any one time.

Therefore I launched a PowerShell ISE in Administrator mode.

Execute a command to clear the Cluster Disk Reservation on both the hosts

image

In my scenario as above, in the Disk Management it shows as Disk 6, I execute the command of :

Clear-ClusterDiskReservation –disk 6

 Note : change only the one in Pink according to the info from disk management

Resource of the command : https://technet.microsoft.com/en-us/library/ee461016.aspx 

After that, I started the FileServer and no issue.  The format was in NTFS and content was intact.

In the Failover cluster of the File Server :

image

Hopefully this helps.

keywords : cluster disk reserve, error 219, dell storage manager, disk in RAW format, incorrect function, cannot start up cluster disk file server, the requested resource is in use, persistent reservation

Tuesday, June 28, 2016

PowerShell–Listing of Folder Permission, export to CSV

Today would like to share with you about a way to list down all the Folder and subfolder permission into a CSV format.  This is good especially for internal or external audits.

There are two options that you can run.

  • Run in the File Server (provided you have PowerShell installed)
  • Run from your Computer (Map the File Server Drive, and also provided you have PowerShell installed in your computer)

The coding is as below :

# This is the file specified for the Output of CSV. Make the necessary change
$OutFile = "C:\Download\Permission.csv"

$Header = "Folder Path,IdentityReference,AccessControlType,IsInherited,InheritanceFlags,PropagationFlags"
Del $OutFile
Add-Content -Value $Header -Path $OutFile


# This is the top path of where want to scan the permission from.  This will include the sub folders
$RootPath = "C:\Download\Driver"

$Folders = dir $RootPath -recurse | where {$_.psiscontainer -eq $true}

foreach ($Folder in $Folders){
    $ACLs = get-acl $Folder.fullname | ForEach-Object { $_.Access  }
    Foreach ($ACL in $ACLs){
    $OutInfo = $Folder.Fullname + "," + $ACL.IdentityReference  + "," + $ACL.AccessControlType + "," + $ACL.IsInherited + "," + $ACL.InheritanceFlags + "," + $ACL.PropagationFlags
    Add-Content -Value $OutInfo -Path $OutFile
    }}

Note : Make changes to the Pink in colour according to your CSV file and which path you want to scan your File Server and export out the permission listing.

The output will be something like below when open with Excel :

image

I’m executing on my PC, that’s the reason I have the output as above.

Thank you and hope this helps.

keywords : ACL, folder permission, powershell, File Server, fileserver, Access list, access control list, permission to CSV