Posts Tagged ‘file’

Hi Folks,

in the last days I had massive problems setting up the replication of a database in a DAG.
While executing the command Add-Database Copy” following error message was generated:

[PS] C:\>Get-MailboxDatabase -Server AD-ex01 | Add-MailboxDatabaseCopy -MailboxServer AD-ex11 -ActivationPreference 2
The seeding operation failed. Error: An error occurred while performing the seed operation. Error: Failed to notify source server
‘AD-EX01.AD.customer.local’ about the local truncation point. Hresult: 0xc8000713. Error: Unable to find the file.
[Database: ex00-mdb001, Server: AD-EX11.AD.customer.local]
+ CategoryInfo          : InvalidOperation: (:) [Add-MailboxDatabaseCopy], SeedInProgressException
+ FullyQualifiedErrorId : [Server=AD-EX01,RequestId=2e434125-4b73-4845-b42c-218aae43caf4,TimeStamp=07.10.2014 15:37:18] [FailureCategory=Cmdlet-SeedInPr
ogressException] 92042DF7,Microsoft.Exchange.Management.SystemConfigurationTasks.AddMailboxDatabaseCopy
+ PSComputerName        : AD-ex01.AD.customer.local

After trying to enable replication by turning on / off circular logging to replicate, we opened a case at Microsoft Support.

The solution provide from Microsoft Support worked:

1. Dismount database

2. Make sure the database is in “clean shutdown” state:
ESEutil /mh X:\Databases\Database.edb

If database isn’t in clean shutdown you’ve to repair it with eseutil:
Eseutil /r E00 /d: “Database Path” /l: “Log Folder Path” /s: “Log Folder Path” /a /i
(http://technet.microsoft.com/en-us/library/aa998074(v=exchg.65).aspx)

3. Move away all data and folders within the Log Folder Path

4. Mount database

5. Update the Prior failed database copy

Update-MailboxDatabaseCopy database\AD-EX11 -DeleteExistingFiles

After this the replication worked!

Cheers, Chris

Hey Folks,
here is an example to easy set ACLs on a Windows fileserver by importing path an permissions from a CSV file:

$Permissions = Import-Csv e:\permissions.csv -delimiter '|'
ForEach ($line in $Permissions)
{
 $acl = Get-Acl $line.Path
 $acl.SetAccessRuleProtection($True, $False)
 $rule = New-Object System.Security.AccessControl.
FileSystemAccessRule($line.Group,"Modify","ContainerInherit, ObjectInherit",
 "None", "Allow")
#-------------------------------------------------------------
# The above line can be edited like the reference at the end.
#-------------------------------------------------------------
 $acl.AddAccessRule($rule)
 Set-Acl $line.Path $acl
 }

The CSV has to look like this:

Path|Group
e:\folder1\subfolder1|domain\group1
e:\folder1|subfolder2|domain\group2
e:\folder2|subfolder1|domain\group3
e:\folder2|subfolder2|domain\group4

Reference Table:

Subfolders and Files only InheritanceFlags.ContainerInherit, InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly
This Folder, Subfolders and Files    InheritanceFlags.ContainerInherit, InheritanceFlags.ObjectInherit, PropagationFlags.None
This Folder, Subfolders and Files InheritanceFlags.ContainerInherit, InheritanceFlags.ObjectInherit, PropagationFlags.NoPropagateInherit
This folder and subfolders InheritanceFlags.ContainerInherit, PropagationFlags.None
Subfolders only InheritanceFlags.ContainerInherit, PropagationFlags.InheritOnly
This folder and files InheritanceFlags.ObjectInherit, PropagationFlags.None
This folder and files InheritanceFlags.ObjectInherit, PropagationFlags.NoPropagateInherit

Source: http://powershell.nicoh.me/powershell-1/files-and-folders/set-folders-acl-owner-and-ntfs-rights

Cheers, Chris

Today I had to extend the partition of a Windows 2003 Server.

In the past I did this several times with diskpart:

diskpart.exe -> list volumes
select volume [number of the partition to extend]
extend volume size=[SIZE TO EXTEND in MB]

After doing this, diskpart and the Windows Disk Management show the extended size but Windows Explorer didn’t so. A colleague pointed a KB article to me which described this behaviour.

You have type in another diskpart command (brought with SP2 – otherwise there is a hotfix):

diskpart.exe
select volume [number of the partition to extend]
extend filesystem

Now the whole space could be seen in the Explorer, too.

Read more:
KB325590
KB832316

Cheers,

Chris