Announcement

Collapse
No announcement yet.

PERMANENT drive letters for removables

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

  • PERMANENT drive letters for removables

    I have set up a backup system on Windows 2003 Server using 2 hot-swap removable drive drawers with hard drives in them. I have a pair of backup drives for each day of the week, with one drive imaging the OS partition and the other drive imaging the data partition. The system is working beautifully except for one problem.

    I cannot work out how to get the OS to PERMANENTLY assign the drive letters S for the system backup drive and T for the data backup drive. (Also remember that the actual hard drives being used change daily, as that might be an extra complication.) The problem arises as soon as I change backup drives for the day. They are immediately recognised and assigned drive letgters F & G rather than the drive letters S & T that I would like to assign them and which are set up in the backup software.

    I do not wish to use F & G as there are times when a USB flash drive or some other device will be mounted and its additional drive letter will throw the whole system out of whack once F and/or G are assigned to the USB drive(s). I need to be able to hot-swap and know that the drives will be assigned S & T so that the late-night backup will go through without problems.

    I would appreciate any help and advice with this problem.

    Daniel
    [email protected]

  • #2
    Re: PERMANENT drive letters for removables

    Assign the appropriate drive letters in Disk Management to EACH drive and they should be recognised when they reconnected to the server.
    11 was a racehorse.
    22 was 12
    1111 race 1 day
    22112


    ************************************************** * ************************************************** ***********
    ** Remember to give credit where credit is due and click the LIKE option in the bottom right corner **
    ************************************************** ************************************************** ****** * *****

    Comment


    • #3
      Re: PERMANENT drive letters for removables

      The Original Poster indicated several (daily -- 5 or 7?) sets of disks were used for each drive letter over time.

      If each disk has a unique signature (the norm) then mapping one set to S:, T: will wipe out knowledge of yesterday's mappings and so on.

      Sure would be great if Windows Mount Manager did anything reasonable and/or offered any desirable features. Unfortunately, it does not.

      Look in the registry at [HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices] and follow along how this thing works:
      Every hard disk has a signature.

      Mapped (assigned a drive letter) disks will have a key like "\??\Volume{d51e3281-4b35-11db-98f4-806d6172696f}" and a disk signature value like "hex:bc,78,a1,a8,00,8a,73,02,00,00,00,00".

      This will show up as a drive letter with a key like "\DosDevices\C:" with the same disk signature as its value.

      Unmapped (LINUX partitions, etc.) disks show up with a key like "#{2f566f4c-4c62-11db-98fb-0014851f5dec}" with their respective disk signatures as values.

      Signature values for floppies and CD/DVDs are quite a bit longer than those for hard disks.

      The Windows Mount Manager only remembers the last mounted disk signature for a given drive letter. If the signature matches the last one mounted for a letter previously, you get that same letter this time. If a disk signature is not found as a value for any "\DosDevices\?:" key, it gets assigned the first available drive letter from C on up that is not currently mounted, possibly overwriting a saved signature for a disk previously mounted as that drive letter.

      There is no history of past signatures mounted as a given letter NOR is there the ability to coerce the Windows Mount Manager to skip letters mapped via network, SUBST or just exclude letters in a "black list" NOR is there the capability to prompt the user for a desired letter.

      It just does what it does and we have to deal with it.
      Easiest solution I can think of is to make all possible S: drives have the same signature (repeat for T)

      I'm sure someone has a utility for this. Only thing I know is Ghost backup one "empty" S: and restore to the other 6 maintaining the original disk signature.

      Something like this would get messy if he wanted to mount 2 drives with the same signature at the same time.

      Alternately, if he captures all the signature pairs, he could possibly get away w/ merging a .REG file for that day that sets the "correct" S: and T: signatures then mount the drives and hopefully it mounts as desired.
      Cheers,

      Rick

      ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

      © 2006-2099 R Valstar. This post is offered "as is" for discussion purposes only with no express or implied warranty of any kind including, but not limited to, correctness or fitness for use. Nothing herein shall be construed as advice. Attempting any activity based on information in this post is done at your own risk.

      Comment


      • #4
        Re: PERMANENT drive letters for removables

        Originally posted by biggles77 View Post
        Assign the appropriate drive letters in Disk Management to EACH drive and they should be recognised when they reconnected to the server.
        That's exactly the problem with removeable drives!

        I assigned the correct drive letter to each individual backup drive, but once removed and replaced, they are automatically assigned the drive letters F & G rather than the S & T that I set through Disk Management.

        I am asking how to PERMANENTLY set the drive letter assigned to the removeable drives.

        BTW, somehow a couple of drives have indeed changed permanently to S & T, but I don't know how...

        Daniel

        Comment


        • #5
          Re: PERMANENT drive letters for removables

          Is there anything different between the drives that hold the drive letter and those that don't?
          11 was a racehorse.
          22 was 12
          1111 race 1 day
          22112


          ************************************************** * ************************************************** ***********
          ** Remember to give credit where credit is due and click the LIKE option in the bottom right corner **
          ************************************************** ************************************************** ****** * *****

          Comment


          • #6
            Re: PERMANENT drive letters for removables

            I am wondering if the file system has anything to do with it? I have a customer that rotates three Maxtor external USB drives (against my advice) and one was Drive E and two were drive F. They could not understand why the backup was failing.

            I changed all three drives to E and edited the NTbackup script to look to E and everything has worked fine for several weeks. I think if the file system is not NTFS you may find the drive letters get changed.

            Tell me I'm wrong and the drives are NTFS.
            Last edited by RobW; 27th December 2006, 23:26. Reason: spelling
            Network Engineers do IT under the desk

            Comment


            • #7
              Re: PERMANENT drive letters for removables

              Maybe you can use the (always unique) volume "label" to control the drive letter assignments?

              first-
              ~> ..., given a drive label determine the DeviceID

              Then- use the found drive letter
              -use it with the MOUNTVOL command to determine the Volumename(path).
              -use MOUNTVOL to delete that volume mountpoint from the map
              -(And to make sure that the drive letter you are going to use for the volume is available, release that drive letter to)
              Finaly:
              -use MOUNTVOL to assign a new drive letter to that volumename(path).
              eg: http://www.msfn.org/board/index.php?...ost-main-76974

              In your case you use two destination drives for the backup.
              In other cases instead of using MOUNTVOL, you could also use "Subst B: <objItem.DeviceID>". And then use simply drive B: for the backup. Or for possible better solutions for Windows Server 2003 look here: http://www.microsoft.com/technet/scr....mspx?mfr=true


              If it works, then you can put it all together in one script, that runs with backup.

              \Rem
              Last edited by Rems; 29th December 2006, 13:49.

              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


              • #8
                Re: PERMANENT drive letters for removables

                Originally posted by iogikuma View Post
                That's exactly the problem with removeable drives!

                I assigned the correct drive letter to each individual backup drive, but once removed and replaced, they are automatically assigned the drive letters F & G rather than the S & T that I set through Disk Management.

                I am asking how to PERMANENTLY set the drive letter assigned to the removeable drives.

                BTW, somehow a couple of drives have indeed changed permanently to S & T, but I don't know how...

                Daniel
                This is exactly the expected behavior of the Windows Mount Manager in the situation you have described. If my earlier post on this thread didn't click, let me know where I lost you so I can clarify.

                Regarding REMS' suggestion to use MOUNTVOL, I thought that was promising till I looked up the syntax:

                http://www.microsoft.com/resources/d....mspx?mfr=true

                The volume isn't a volume name but the GUID (name) from that MountedDevices registry key I discussed earlier.

                I'm still thinking the easiest way to cure you problem is make the disk signatures the same for all your S: and T: drives, respectively. Then any "S:" drive will mount as S: and so on. As I mentioned, your only problem will come if you mount two S: or T: drives in the same machine at the same time. Windows will have issues with the second mount.

                If you'd like more info on how to set the disk signature in the MBR, just ask.

                I do this kind of thing all the time in my lab as I multi-boot most of my machines and that's where I learned of all the shortcomings of the Windows Mount Manager.
                Cheers,

                Rick

                ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

                © 2006-2099 R Valstar. This post is offered "as is" for discussion purposes only with no express or implied warranty of any kind including, but not limited to, correctness or fitness for use. Nothing herein shall be construed as advice. Attempting any activity based on information in this post is done at your own risk.

                Comment


                • #9
                  Re: PERMANENT drive letters for removables

                  Thanks for all the input!

                  It seems from all of the above that the simplest and best approach would be to track down a util/batch that permanently changes a disk's GUID/disk signature.

                  Rick mentioned how it could be done using Ghost.

                  All I need to do is permanently change the GUID of each hard drive used as drive S to one value (ditto for drive T, to a different value) and it should fix the problem. The system would always see the same drive (based upon the original GUID which is being duplicated to the other disks being used as that backup drive) and will then assign the correct drive letter (paired to the correct drive letter on the original drive with Disk Management).

                  Rather than using Ghopst, which I don't have, and rather than having to do a full backup for each drive) Iím wondering if anyone might be able to direct me to a simple utility or batch file that allows disk signatures (GUIDs) to be edited/updated on a drive to a particular value.


                  Daniel

                  Comment


                  • #10
                    Re: PERMANENT drive letters for removables

                    You have peaked my curiosity. May take me a day or two to find time to figure out how to do this without Ghost. If anyone else knows how, feel free to jump in. Otherwise, I'll get back to you sometime Thursday.
                    Cheers,

                    Rick

                    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

                    © 2006-2099 R Valstar. This post is offered "as is" for discussion purposes only with no express or implied warranty of any kind including, but not limited to, correctness or fitness for use. Nothing herein shall be construed as advice. Attempting any activity based on information in this post is done at your own risk.

                    Comment


                    • #11
                      Re: PERMANENT drive letters for removables

                      Originally posted by rvalstar View Post
                      Regarding REMS' suggestion to use MOUNTVOL, I thought that was promising till I looked up the syntax:

                      http://www.microsoft.com/resources/d....mspx?mfr=true

                      The volume isn't a volume name but the GUID (name) from that MountedDevices registry key I discussed earlier.
                      Hi rvalstar,

                      Using Mountvol was my second step.
                      What i suggested was first to determine the automaticly assigned drive letter (DeviceID) by using the manualy given Label (VolumeName) to that volume. That is the basic for further scripting.
                      And then you could use in the same script that DeviceID to determine the volume{GUID}, which you need if you want to switch drive letters.

                      here is an example;
                      Code:
                      Set oShell=CreateObject("WScript.Shell")
                      '--------------------------------------------------
                      'determine the current DeviceID by its given VolumeName 
                      '--------------------------------------------------
                      strComputer = "."
                      Set objWMIService = GetObject("winmgmts:\\" &_
                       strComputer & "\root\cimv2")
                      Set colItems = objWMIService.ExecQuery _
                       ("Select * From Win32_LogicalDisk Where VolumeName = 'USB Drive'")
                      For Each objItem in colItems
                          sTation = objItem.DeviceID
                          strMountFolder = oShell.ExpandEnvironmentStrings _
                                   ("%SystemDrive%\" & objItem.VolumeName) '(optional)
                      Next
                      
                      '--------------------------------------------------
                      'determine the volumeGUID by that DeviceID
                      '--------------------------------------------------
                      oShell.run("%comspec% /c mountvol " & sTation & " /L>%temp%\volp.txt")
                      sRdfile = oShell.ExpandEnvironmentStrings("%temp%\volp.txt")
                      Const ForReading = 1
                      Set objFSO = CreateObject("Scripting.FileSystemObject")
                      Set objFile = objFSO.OpenTextFile(sRdfile, ForReading)
                      Do Until objFile.AtEndOfStream
                          strLine = objFile.ReadLine
                      Loop
                      objFile.Close
                      
                      '--------------------------------------------------
                      'now you can make a new root (3 examples)
                      '--------------------------------------------------
                      '1. To a environment variable...
                      '] oshell.Environment.item("USB_Drive") = sTation
                      
                      'or 2. To mount to a folder on c: eq to volumename...
                      '] Set objFileSystem = CreateObject("Scripting.FileSystemObject")
                      '] if Not objFileSystem.FolderExists(strMountFolder) Then
                      ']     Set fldr= objFileSystem.CreateFolder(strMountFolder)
                      ']     Set fldr = Nothing
                      '] End if
                      '] oShell.run("mountvol " & chr(34) & strMountFolder & chr(34) & strLine)
                      '] Set objFileSystem = nothing
                      
                      'or 3. To subsitude a drive...
                      '] oShell.run("subst B: " & sTation & "\")
                      
                      'or 4. To change drive letters...
                         oShell.run("mountvol " & sTation & " /D")
                         oShell.run("mountvol Q: /D")
                         oShell.run("mountvol Q:" & strLine)
                      
                      '--------------------------------------------------
                      Set oShell = nothing
                      'End
                      In the example the Label is 'USB Drive' (you should use the Label you give manualy to your volume). The wanted drive letter in this example is Q:

                      Maybe it is bit a dirty script, but the best I can do. It will do the trick, as long as the storage has been given a Label and has a 'whatever' driveletter assigned the moment it was plugged in.
                      In the script you also see 3 other options you can try to control the destination for the backup.


                      Happy new Year to all
                      \Rem

                      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


                      • #12
                        Re: PERMANENT drive letters for removables

                        i used the partition software "Partition Magic" to do it.

                        When i had my portable hdd plugged in, i opened PM, right click on the F: (which it was plugged into) and set it so it recognised it as the L: instead of the F:

                        now everytime i plug it back in, even without partition magic open, the PC recognises it as the L: but when i plug it into a different pc, it come up as the next avaiable one, as usual

                        sorry if this is a confusing post, but this method works for me
                        changed

                        Comment


                        • #13
                          Re: PERMANENT drive letters for removables

                          Originally posted by Luke Murgatroyd View Post
                          i used the partition software "Partition Magic" to do it.

                          When i had my portable hdd plugged in, i opened PM, right click on the F: (which it was plugged into) and set it so it recognised it as the L: instead of the F:

                          now everytime i plug it back in, even without partition magic open, the PC recognises it as the L: but when i plug it into a different pc, it come up as the next avaiable one, as usual

                          sorry if this is a confusing post, but this method works for me
                          The "Disk Management" MMC applet achieves much the same thing. However I thought the difficulty was getting the same drive letter on different machines?


                          Tom
                          For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

                          Anything you say will be misquoted and used against you

                          Comment


                          • #14
                            Re: PERMANENT drive letters for removables

                            Originally posted by Rems View Post
                            Using Mountvol was my second step.
                            What i suggested was first to determine the automatically assigned drive letter (DeviceID) by using the manualy given Label (VolumeName) to that volume. That is the basic for further scripting.
                            And then you could use in the same script that DeviceID to determine the volume{GUID}, which you need if you want to switch drive letters.
                            I'm not in the position tonight to try your script but, assuming it works, it would be a viable solution as long as Daniel can exclude backing up the mount point should he back up that disk.

                            I'm a little behind on my GUID / Disk / Partition signature trial so it will have to wait till tomorrow to post an illustrative look into the Windows Mount Manager, how to set all the disk / partition signatures the same, and what Dynamic disks (argh!!! -- I really dislike dynamic disks) may bring to the table -- as I recall they remember mappings that Windows Mount Manager may not.

                            I have a few firewire drives to experiment with that should give some insight into Daniel's problem.
                            Cheers,

                            Rick

                            ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

                            © 2006-2099 R Valstar. This post is offered "as is" for discussion purposes only with no express or implied warranty of any kind including, but not limited to, correctness or fitness for use. Nothing herein shall be construed as advice. Attempting any activity based on information in this post is done at your own risk.

                            Comment


                            • #15
                              Re: PERMANENT drive letters for removables

                              Sorry for the delay. Had my RAID1 on an ICHxR motherboard crater today. What a poor RAID1 that is. So I've spent the better part of the day Ghosting and rebuilding. Did have to tweak MountedDevices once or twice in the process so I feel invigorated RE: my response to this thread. Need to get so time where the family isn't hounding me so I can publish something useful. Bare with me.
                              Cheers,

                              Rick

                              ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

                              © 2006-2099 R Valstar. This post is offered "as is" for discussion purposes only with no express or implied warranty of any kind including, but not limited to, correctness or fitness for use. Nothing herein shall be construed as advice. Attempting any activity based on information in this post is done at your own risk.

                              Comment

                              Working...
                              X