jochen Posted November 25, 2014 Report Share Posted November 25, 2014 I have the following situation: My music is stored on a NAS (WD MyCloud) and distributed to all my pc through bittorrent sync. All pc are running Linux. A Raspberry PI is running btsync and has the NAS mounted through Samba.At a certain stage, when ripping music, it happens that I have 3 different folders which leead to the same folder in case insensitive windows naming. Example: "Cirque du soleil", "Cirque du Soleil" and "Cirque Du Soleil". After ripping I will move the album subfolders to the right main folder and delete the other 2.What happens to the Samba mounted NAS on the Pi? Can btsync handle this situation? Quote Link to comment Share on other sites More sharing options...
RomanZ Posted November 25, 2014 Report Share Posted November 25, 2014 Sync does not like case-sensitive files and it will treat them separately. If you've got a "File" on one peer and "FILE on another, they will be synced into "File.conflict" and "FILE.conflict" resulting files on 2 peers respectively. Quote Link to comment Share on other sites More sharing options...
mbob Posted November 27, 2014 Report Share Posted November 27, 2014 Good point, but what happens next when Windows machines are involved? 1) LinuxFILEfile 2) another Linux receivesFILE.conflictfile.conflict 3) a Windows machine then receives?FILE.conflictfile.conflict that overwrites FILE.conflict??? 4) sync back to Linux:file.conflictdelete FILE.conflict? Quote Link to comment Share on other sites More sharing options...
nop Posted November 27, 2014 Report Share Posted November 27, 2014 Something like this (from my environment): 1) LinuxFILEfile 2) another Linux receivesFILEfile 3) a Windows machine then receivesFILEfile.conflictanother file from linux will create a file.conflict.2 Quote Link to comment Share on other sites More sharing options...
eazq Posted November 29, 2014 Report Share Posted November 29, 2014 Windows: actually NTFS is a case preserving file system and could have two or more files with the same name in the same folder just like most Unix file systems do (there's a specific flag to set, OBJ_CASE_INSENSITIVE, when calling NtCreateFile API, to enable POSIX semantics), but Explorer could then not handle them correctly. Quote Link to comment Share on other sites More sharing options...
jochen Posted November 29, 2014 Author Report Share Posted November 29, 2014 Not for 32 bit applications: http://support.microsoft.com/kb/100625/ Quote Link to comment Share on other sites More sharing options...
nop Posted November 29, 2014 Report Share Posted November 29, 2014 Here is an answer from MS: Link with "how-to" Quote Link to comment Share on other sites More sharing options...
eazq Posted November 29, 2014 Report Share Posted November 29, 2014 Perhaps BT developers should just add a configuration option for Win64 builds, for the "adventurous ones" or those who need exact replication and have peers which are case preserving AND case sensitive. @RomanZIt is not a matter of liking or not liking: since the protocol is intended to mirror, it is an incomplete protocol if each peer namespace capability is not propagated to the others, either to disable replication (because a node can't implement the exact namespace semantics of other peers in the replica set), or to ask user what to do/notify there are issues (to avoid overwriting files in case a peer is case sensitive and it is only case preserving: I know you create *.conflict, but that's inelegant and turns a replica into a mess for noobs). Quote Link to comment Share on other sites More sharing options...
RomanZ Posted December 1, 2014 Report Share Posted December 1, 2014 @eazqWell, Sync IS case sensitive while Windows filesystems are not. Current solution is not the most elegant indeed - we are aware of it and eventually will implement a better solution. Quote Link to comment Share on other sites More sharing options...
eazq Posted December 5, 2014 Report Share Posted December 5, 2014 @eazqWell, Sync IS case sensitive while Windows filesystems are not. Current solution is not the most elegant indeed - we are aware of it and eventually will implement a better solution. Just in case, one day, your team will improve the btsync's name management code, here is a note about file systems under NT operating system family (modern Windows variants are descendants of NT). Whole namespace is managed by a kernel mode subsystem called "Ob" (Object Manager). Since XP/2003, Ob can run in two distinct modes:case preserving mode (default)case sensitive mode (former default mode, useful mostly when you install the POSIX environment subsystem, called by marketing people Interix, SFU, SUA and historically inherited from its ancestor kernel at DEC).Before XP, NT's object manager used to always run in case sensitive mode and only Win32 environment subsystem used to issue system calls with case insensitive flag set. Please, open regedit and select this key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive That is a REG_DWORD value which can be 1 for running the kernel in case-preserving mode and 0 for running the kernel in case-sensitive mode. Since you must set a positive value to enable a negative behaviour ("in-sensitive") you may guess that it is a later addition to the registry: in fact it was added after NT 5.0 (Windows 2000). Just make btsync query that key, or give advanced users an advanced option to retain actual names sent from case sensitive btsync peers. Quote Link to comment Share on other sites More sharing options...
eazq Posted December 5, 2014 Report Share Posted December 5, 2014 Not for 32 bit applications: http://support.microsoft.com/kb/100625/ Unless your Win32/Win64 application explicitly issues system calls WITHOUT the case insensitive flag set. Microsoft's own stock applications and default applications written for Windows actually don't support name case sensitivity, simply because at Microsoft they decided they shouldn't be aware of name case (for usability or compatibility?), not because Windows kernel can't handle them correctly. Similarly in Mac OS, where your choice is more granular, because you can set at formatting time if a volume is to be case-preserving or case-sensitive. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.