Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On my work computer I have two USB hard drives that I use rarely. They have a power save mode that sends them into sleep after a couple of minutes of them being idle.

Whenever I open a context menu on a file, the drives are woken up (most likely caused by the "send to" handler). So I eject the drive, but I can't find a way to get it back, other than unplugging and replugging it in.

Is there a way to unmount the drives, and then remount them only when I actually need them? (On Windows 7 Ultimate.)

share|improve this question

2 Answers 2

up vote 13 down vote accepted

Remove the drive letters using mountvol or diskmgmt.msc. Without a drive letter, they won't appear under Computer or Send To.

mountvol Q: /p

Using /p will actually dismount the device. On older Windows versions, you only have /d, which only unassigns the drive letter, but keeps the volume mounted.

Reassign when needed, using the volume ID printed by mountvol:

mountvol Q: \\?\Volume{1be3da43-6602-11e0-b9e6-f11e1c50f5b5}\

You can also mount the volume on an empty folder (Unix style) using the same tools:

mkdir fs\backup-disk
mountvol fs\backup-disk \\?\Volume{1be3da43-6602-11e0-b9e6-f11e1c50f5b5}\

All these operations require Administrator privileges.


(In fact, you might even be able to directly use the volume ID in your backup scripts, without having to mount it anywhere. For example, \\?\Volume{1be3da43-6602-11e0-b9e6-f11e1c50f5b5}\projects instead of Q:\projects.)

share|improve this answer
1  
By the way, is that GUID tied to the device? Will it be the same if I plug the device into another Windows machine? Is it even static between reboots on the same machine? –  Oliver Salzburg Jun 11 '11 at 21:53
2  
@OliverSalzburg: Although if you browse the Object Manager using WinObj, you'll find more symlinks pointing to the same \Device\...: for example, to access my iPod I can use E:\Music or \\?\STORAGE#RemovableMedia#7&bec343e&0&RM#{53f5630a-b6bf-11d0-94f2-00a0c91efb8b}‌​\Music... But again, those appear to be variable between machines. –  grawity Jun 12 '11 at 8:50
3  
Is this really the same as unmounting in UNIX? On a UNIX box, once the volume is umounted, it's safe to rip it out of the computer. (Maybe it'll make your SATA bus upset, if you don't have the appropriate hardware support for that, and you might need to reboot, but you won't lose any data.) If you can still access the disk as \\?\Volume{...}, doesn't that mean the filesystem is still available to the OS, and therefore might have unflushed data in write cache and so on? –  Glyph Feb 8 '13 at 6:22
2  
@DavidBalažic: /D only removes the drive letter (or path) assignment. Dismounting means detaching all such assignments, as well as closing the filesystem itself. Remember that Windows mounts all filesystems by default on the \\?\Volume{…} paths, and therefore regular mountvol usage only adds/removes additional ones (like mount --bind /x /y on Linux). –  grawity Nov 22 '13 at 16:11
2  
@DavidBalažic: Yes. –  grawity Nov 22 '13 at 20:13

The correct answer is using the /P parameter to mountvol (see the comments in the accepted answer to understand why /D is not enough) but that only applies to recent windows versions (NT kernel version 6 and up).

The devcon utility as described in this answer works across all NT versions

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.