Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 identical SATA-2 drives I use for backup purposes. Basically I have got e-Sata/USB2.0 cradle and 2 drives. When I need to do a peform a backup I "on" the drive cradle, do a backup, when replace a drive in a cradle with another one - idea is to keep each drive in different locations to make sure that backup data is not lost in case of theft or fire.

The PROBLEM is that when I power the cradle - one of the drives successfully gets a drive letter - I use the same "L" letter for both no be able to use the same backup scripts with each drive, while another one fails to assign a letter itself so I have to do it manually in a

Computer Management snap-in -> Storage -> Disk management -> RMB click on a drive item -> Change drive letter and paths.

It is annoying to do it every time for one drive while I don't have to do for another - absolutely identical drive.

Any ideas how to make a drive letter stick to the second drive?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

According to this TechNet article windows reserves the drive letter for the volume. This is stored in the registry at HKLM\System\MountedDevices.

From the behavior i'm assuming you are using basic disks. You just can't get this to work with basic disks.

However it seems that if you converted to Dynamic disks you should be able to pull this off due to the way LDM works with Dynamic Disks.

See the heading "DYNAMIC Disk - Drive Letter Assignment Rules" for details on how Dynamic disks assign drive letter.

EDIT1: Per your request here is the TechNet article on how to convert disks.

share|improve this answer
    
Thanks Zypher, I do remember that wheh I was formatting these two drives I have formatted and initialized one as a simple disk and other one as a dynamic disk. I suppose the latter is the one which retains its drive letter and the former is the one which misbehaves. Can you recomend me any link where I can read how to convert a basic disk to a dynamic one. Thank you. –  Alex Oct 6 '09 at 3:34
    
@Alex: See my edit. –  Zypher Oct 6 '09 at 3:56
    
No need for a link. Just right-click on the disk in the Disk Management console and choose "Convert to Dynamic". That's it. –  Mark Henderson Oct 6 '09 at 3:58

Windows maps drive letters to volumes by the volumes' GUIDs. Your two external drive, though identical in make and model, will have different GUIDs in their formatted filesystems. This will cause Windows to attempt to assign different drive letters to them as long as unused drive letters are available. It's described in gory detail here. (The link refers to Windows 2000, but I believe the process is the same under XP/2003.)

In your case, one of the drives either isn't getting a drive letter assigned at all, or is getting assigned a drive letter that is already in use by a network drive, which will mask the USB drive letter assignment. Disk Management should make that clear, but obviously it isn't what you want in either case.

Here's a relatively simple solution:

  1. Give each disk a unique drive letter that isn't L:. Assume disk 1 is X: and disk 2 is Y:.
  2. Modify your script to check for the existence of X:\, which would only exist if X: was mounted. If it does:
    1. Mount X as network drive L, e.g.: net use L: \\127.0.0.1\X$
    2. Run your backup against L:
    3. Remove the L drive when done, e.g.: net use L: /delete
  3. Repeat for Y:.

You could even skip the whole mounting-local-drive-as-network-drive bit if you don't mind just backing up directly to X: or Y:.

If you just don't want to mess with check which disk is mounted, or if you have other software that also depends on the disks showing up as L:, the only other option I can think of would be to image one drive and write that image to the other. That way, disk 1 will be bit-for-bit identical to disk 2, which should include the GUID. A utility like dd on Linux would do the job:

dd if=/dev/disk1 of=/dev/disk2 bs=1024m

However, I don't know how Windows will behave if you subsequently plug both drives in at the same time, so use caution with this method.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.