MOUNTVOL

Link volumes without requiring a drive letter. Create, delete or list a volume mount point. NTFS junction mount points can only be used with local NTFS directories, (unlike DFS junction points which will target a network share). MOUNTVOL can be found on the Windows CD i386 folder.

Syntax
      MOUNTVOL [drive:]path VolumeName
      MOUNTVOL [drive:]path /D
      MOUNTVOL [drive:]path /L
      MOUNTVOL [drive:]path /p
      MOUNTVOL /R
      MOUNTVOL [/N | /E]
      MOUNTVOL drive: /S

Options

    path     : An existing NTFS folder where the mount point will reside.

 VolumeName  : The volume name that is the target of the mount point.
               In the form \\?\Volume{GUID}\, where {GUID} is a globally unique identifier
               e.g.   \\?\Volume\{2eca078d-5cbc-43d3-aff8-7e8511f60d0e}\

    /D       : Remove the volume mount point from the specified folder.

    /E       : Re-enable automatic mounting of new basic volumes.

    /L       : List the mounted volume name for the specified folder.

    /S       : Itanium-based computers only. Mount the EFI System Partition on the specified drive. 

    /p       : Remove the volume mount point from the specified directory, 
               dismount the basic volume, and take the basic volume offline,
               making it unmountable. (Win7/Server 2008+)

    /R       : Remove volume mount point directories and registry settings for
               volumes that are no longer in the system,this prevents them from
               being automatically mounted and given their former volume mount
               point(s) when added back to the system.(Win7/Server 2008+)

    /N       : Disable automatic mounting of new basic volumes. (Win7/Server 2008+)
               New volumes are not mounted automatically when added to the system.

The GUID is used to identify a unique volume even if the drive letter changes.

If other processes are using the volume, mountvol closes any open handles before dismounting the volume.

Volumes that are dismounted by using /p are listed in the volumes list as "NOT MOUNTED UNTIL A VOLUME MOUNT POINT IS CREATED."
If the volume has more than one mount point, use /d to remove the additional mount points before using /p. You can make the basic volume mountable again by assigning a volume mount point.

If you need to expand your volume space without reformatting or replacing a hard drive, you can add a mount path to another volume. The benefit of using one volume with several mount paths is that you can access all local volumes by using a single drive letter (such as C:). You do not need to remember which volume corresponds to which drive letter—although you can still mount local volumes and assign them drive letters.

When using junction points:
• Use NTFS ACLs to protect junction points from inadvertent deletion.
• Use NTFS ACLs to protect files and directories that are targeted by junction points from inadvertent deletion or other file system operations.
• Never delete a junction point by using Explorer, a del /s command, or other file system utilities that walk recursively into directory trees. These utilities affect the target directory and all subdirectories.
• Use caution when you apply ACLs or change file compression in a directory tree that includes NTFS junction points.
• Do not create namespace cycles with NTFS or DFS junction points.
• Put all your junction points in a secure location in a namespace where you can test them out in safety, and where other users will not mistakenly delete them or walk through them.

Examples

List a brief help text followed by a list of the volumes, mount points and GUIDs on your system:

C:\> mountvol

List the volume GUID for the C: drive on your system:

C:\> mountvol C: /L

Create a mount point called ss64:

C:\> md ss64
C:\> mountvol c:\ss64 \\?\Volume\{2eca078d-5cbc-43d3-aff8-7e8511f60d0e}\

Delete the mount point:

C:\> mountvol c:\ss64 /d

“The shortest and surest way of arriving at real knowledge is to unlearn the lessons we have been taught, to mount the first principles, and take nobody's word about them” ~ Henry Bolingbroke

Related commands

MKLINK - Create a symbolic link (linkd).
Q205524 - How to create and manipulate NTFS junction points.
BCDEDIT - Manage Boot Configuration Data.
Equivalent bash command (Linux): mount - Mount a file system.


 
Copyright © 1999-2024 SS64.com
Some rights reserved