In some scenarios, PeerGFS/PeerLink has undertaken the replication of data and has applied file and folders with their short name (8.3) paths referenced. The result is that when the dataset is queried across locations, it does not match and will appear with duplicated information in some locations. In the following example, two of the folders names have been truncated:
This behavior is usually triggered in environments where the 8.3 naming convention is both enabled and disabled across different watched volumes. For example, if a source system is a Windows Server 2008, the 8.3 naming convention will be enabled across all volumes. However, if this server replicates to a Windows Server 2012 R2, the 8.3 naming convention will be disabled, which can result in problems as PeerGFS/PeerLink now looks to translate the 8.3 short names at the operating system level and will be unable to do so. Therefore, a new folder/file would be created solely with the short name as its full name.
PeerGFS v4.5 (and later) checks whether 8.3 short names are disabled on watched volumes.
To determine the extent of the problem, check the files on both servers to see the complete 8.3 file breakdown:
- In a command prompt, cd to the watch set configured in PeerGFS/PeerLink and enter the following command: dir /x
This lists both the long and short names. For servers with issues, the short name path will appear in the far-right column.
To query whether the 8.3 naming convention is enabled or disabled, enter the following command on all servers:CODE
fsutil.exe 8dot3name query E:
(replace E with the volume letter for that server)
Disable the 8.3 Short Naming Convention
Before disabling the 8.3 naming convention, ask the customer whether any legacy applications are using it. If not, you can proceed by disabling the convention.
To disable 8.3 name creation on all NTFS partitions:
- Type fsutil.exe behavior set disable8dot3 1 at an elevated command prompt.
- Press Enter.
This operation takes effect immediately (no restart required).
When a volume is not specified, the operation updates the registry value:
- 0 - Enable 8dot3 name creation on all volumes on the system
- 1 - Disable 8dot3 name creation on all volumes on the system
2 - Set 8dot3 name creation on a per volume basis
3 - Disable 8dot3 name creation on all volumes except the system volume
When a volume is specified, the operation updates the individual volume's on disk flag. This operation is meaningful only if the registry value is set to 2.
- 0 - Enable 8dot3 name creation on this volume
- 1 - Disable 8dot3 name creation on this volume
Clean the Data
After disabling the 8.3 naming convention, the dataset must be completely cleaned to stop any reoccurrence:
- Before cleaning the dataset, turn off the PeerGFS job.
- If only a small portion of data is affected, the cleaning can be done manually.
- If the problem occurs across the file system, use this script to clean the file system: StripLocal83Shortnames_v005.txt
- After cleaning the data, restart the PeerGFS job, and the data will replicate correctly.
Using the Script
- The script must be run under an account with local admin rights on the local file server.
- 8.3 short names must be disabled on the file server prior to running the script.
- PowerShell v5.1 is required (https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/wmf/setup/install-configure?view=powershell-5.1).
.\StripLocal83Shortnames.ps1 -Path <Local Path to scan> -LogPath <Location to place log files> -PrintToScreen <Optional flag to log everything to console> -ReportOnly <Optional flag to just report and not remove 8.3 shortnames>
- After running the script, review the log files to confirm that no errors have occurred:
Wikipedia article: https://en.wikipedia.org/wiki/8.3_filename
How to disable the 8.3 short name convention: https://support.microsoft.com/en-nz/help/121007/how-to-disable-8-3-file-name-creation-on-ntfs-partitions