Announcement

Collapse
No announcement yet.

Drive letter pointing to wrong server due to DFS?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Drive letter pointing to wrong server due to DFS?

    We're looking at removing DFS from our environment, as it's currently broken. After talks with Microsoft, they basically said to upgrade to DFSR or don't use DFS. So, we're looking to uninstall DFS until we complete our migration to Server 2008 and a new domain.

    Say, for example, we have \\Server1\share (DFS root) and \\Server2\share and both of those are in DFS as \\Domain\share.

    So what we've done is force everyone's shared drive (formerly mapped to \\Domain\share) to point to \\Server2\share in preparation for the tear-out.

    What I've just seen is that even though our drive letter is mapped to \\Server2\share, it's actually pointing to \\Server1\share (the other DFS node).

    Does anyone know why this is happening? How do I force people over to \\Server2\share so that we can take DFS out with a minimum of disruption to the end users?

  • #2
    Re: Drive letter pointing to wrong server due to DFS?

    Sorry, forgot a couple of things, both servers are 2003, SP1 and the workstations involved are XP SP2.

    Comment


    • #3
      Re: Drive letter pointing to wrong server due to DFS?

      Using a script? Can you show us the old and the new code.

      You say that the drive is mapped to the correct server?, just the path-description in Explorer is wrong?
      If a namespace (label) was configured for the driveletter, it will be stored and remembered in the registry for the current user on his/her computer under the UNC-path (!) to where the driveletter was assigned that time: HKEY_CURRENT_USER\Software\Microsoft\Windows\C urrentVersion\Explorer\M ountPoints2\##server#share#folder\_LabelFromReg

      An other fact is that there must always be a short pause (~1.5 sec) between disconnecting and remapping the same driveletter again, or else the new path-description won't be updated. (If you don't realy need persistent mappings, it is recommended to script a non-persistent mapping).


      \Rems

      This posting is provided "AS IS" with no warranties, and confers no rights.

      __________________

      ** Remember to give credit where credit's due **
      and leave Reputation Points for meaningful posts

      Comment


      • #4
        Re: Drive letter pointing to wrong server due to DFS?

        The old script was basically as follows:


        net use s: /delete
        net use s: \\Domain\share

        Now its:

        net use s: /delete
        net use s: \\Server2\share

        The drive LOOKS like it's mapped to the correct server (Server2) but if you look at the data on the drive, it's not the correct data, indicating that it's actually pointing to Server1, not Server2 as indicated.

        For example, on the machine where I discovered this problem, we were looking for \\server2\share\accounting\reports\new. That last directory "new" wasn't there.

        I unmapped the s drive, did an ipconfig /flushdns, and remapped to \\server2\share. That "new" directory still wasn't there. If I mapped the drive to \\domain\share and used the DFS tab to make Server2 the active server, the "new" directory showed up. If I forced the DFS to point to Server1, the "new" folder was gone again.

        I know I have replication problems, but why do I have drive letters saying they're pointing to Server2 when you're actually pulling data from Server1?

        Comment


        • #5
          Re: Drive letter pointing to wrong server due to DFS?

          Are the DFS roots on a DC?

          What are the exact names of the Root and Shares?

          \\Domain.com\RootName?
          \\Server\ShareName?

          Comment


          • #6
            Re: Drive letter pointing to wrong server due to DFS?

            No, the DFS root is NOT on a DC.

            I don't see why the actual names of the DFS nodes and root are of importance, the names listed in my previous post should give you a clear indication of what's going on.

            Comment


            • #7
              Re: Drive letter pointing to wrong server due to DFS?

              Because if your DFS is called \\Domain.com\Superman and you have a root folder called \\ServerThatIsADC\Supermain it will always redirect any users hitting that share to \\Domain.com\Superman.

              It's a design issue that should be taken into account if only Microsoft didn't bury that small detail in their documentation.

              Comment


              • #8
                Re: Drive letter pointing to wrong server due to DFS?

                So if I change the share name from \\Server2\share to \\Server2\foo and map them to \\Server2\foo I won't have this problem?

                Comment


                • #9
                  Re: Drive letter pointing to wrong server due to DFS?

                  So if I change the share name from \\Server2\share to \\Server2\foo and map them to \\Server2\foo I won't have this problem?
                  You can add a new name as second sharename to the same share.


                  This is a better batch script for disconnecting and remapping the SAME driveletter:
                  Code:
                  :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
                  Set "DriveLetter=s:"
                  Set "sUNC=\\server\shared folder"
                  
                  (Net Use %DriveLetter% |Find/i "%sUNC%")>Nul,2>&1,||(
                    If Not exist %DriveLetter% (
                        Net Use %DriveLetter% "%sUNC%" /persistent:no
                    ) Else (
                        cd/d %SystemDrive%\
                        Net Use %DriveLetter% /Delete /Yes &&(
                          Ping 127.0.0.1 -n 3 >Nul
                          Net Use %DriveLetter% "%sUNC%" /persistent:no
                        )||(
                          echo.Warning, %DriveLetter% is NOT! available to make the drive mapping
                        )
                    )
                  )
                  :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
                  The ping command in this script is used to create the delay between disconnecting and remapping, and it will only used when there actually is a wrong persistent mapping that time.


                  \Rems
                  Last edited by Rems; 6th June 2008, 14:53. Reason: added "quotes around path" when mapping

                  This posting is provided "AS IS" with no warranties, and confers no rights.

                  __________________

                  ** Remember to give credit where credit's due **
                  and leave Reputation Points for meaningful posts

                  Comment

                  Working...
                  X