windows - Are junctions affected if the drive is formatted?

26
2013-08
  • AJaM

    I was trying to relocate my user profiles, so that they are not affected by any problems occuring in the drive on which the operating system is stored. I've managed to move user profiles using Robocopy and then used junction points:

    Robocopy C:\Users\user1 E:\Directory\user1 /E /R:0 /DCOPY:T
    
    mklink /J C:\Users\user1 E:\Directory\user1
    

    If, for some reason, I had to reformat my C:\ drive, would that affect the junction points created? If so, what do you recommend I do?

  • Answers
  • grawity

    Formatting a volume means its entire file system is created from zero. Files, directories, junctions, symlinks are equal in that they are file system objects, and they disappear the same way. If you format C:\, the C:\Users\user1 junction will have to be mklink'd again.

    The target of the junction is not affected in any way – after all it's located on a different volume, E:\.

  • Norah

    After re-installing the OS, follow these steps:

    1. Use the same username(s) & Drive letters
    2. Create the junction again: mklink /J C:\Users\user1 E:\Directory\user1
    3. Reboot
    4. Delete C:\Users

  • Related Question

    hard drive - What directories in a Windows 7 SSD install would you link/junction to an HDD?
  • Tracker1

    I'm planning on installing an SSD/HDD combination with the SSD as my boot (Windows 7 x64) drive, and a spinning HDD as a storage drive.

    • Are there any log files in particular best suited to a mklink to the SSD?
    • Is it worthwhile to move/link the main user profile to the SSD?
    • How much space should I try to leave open on the SSD for best wear leveling?
    • What other directories/files would you consider mapping to the HDD?

    I know that temporary directories, even the main profile may be good options here, I'm just wanting to know any obvious choices for space, or many-write situations.


  • Related Answers
  • sblair

    In addition to Wil's answer, I put all BitTorrent downloads and most games onto an HDD, rather than an SSD. Although there is the potential for better performance with games on an SSD (such as reduced loading times), they tend to take up a lot of space. Also, if you don't need to use hibernation, you may wish to disable it to save space on the SSD.

    Note that keeping some free space on the SSD is more to help the drive maintain performance over time, rather than to directly assist the wear levelling.

  • Chris Cothrun

    I use an SSD alongside a HDD and install quite a bit more software than the SSD has space for. I'm answering anecdotally as I've been unable to find authoritative information for managing an ever growing Windows installation split between an SSD and a HHD

    I manually manage a great deal of my installation and data. Every program that prompts for an installation path gets assigned to D:\Program Files or D:\Program Files (x86). Note that simply installing here without taking extra steps may create a security risk by bypassing the restrictions that Microsoft places on the C:\Program Files folders. I have not fully researched the implications of simply changing the installation path. I've also created a D:\Users\Chris\ folder and I take advantage of the Windows 7 Libraries feature to make manually setting save paths easier.

    I use WinDirStat to find large files and folders on the SSD for selective junction creation to the HDD. Anything related to the Windows installation I research online, as I've seen suggestions that wholesale linking folders such as the Program Files directory or the \Windows\winsxs to a HDD will cause problems and instability.

    Some of my junctioned folders are:

    • Large chunks of data in the \ProgramData\ folder
    • Adobe files (Common Files?)
    • \Windows\Installer\ files

    Windows seems to manage log files well and I haven't seen any that balloon up into significant sizes.

    I strongly suggest making backups before moving and linking folders.

  • William Hilsum

    It really depends on your usage.

    If you do not have a lot of stuff, I would simply use the SSD and only the SSD.

    I personally would not move your entire profile or junction it as there are settings that are written all the time, user registry and various items that you would want to keep on the SSD.

    I would just create a few folders on your hard drive and keep movies, videos, archive, backup and music files on there. When you are using a hard drive just for data storage and nothing else, they are quite fast.

    As for leaving space, Just never let it get full - I personally would want to keep at least 5GB free at any point (but that is just me)

    As for log files, they will be created (usually) within the Windows directory so they will be on the SSD.

  • Valamas

    On my data HDD, i created a directory called JUNCTIONS. Here are the folders i junctioned.

    Windows\Installer
    Windows\SoftwareDistribution 
      (Add Everyone full access or similar permission for windows updates to work)
    Windows\Temp
    Users
    ProgramData
    

    I used this tool that made creating destination Junctions easy. Hard Link Shell Extension

    If you are junction-ing users, do not create the destination users folder, just "create junction" from within the JUNCTIONS folder.

    I also left Windows Indexing turned on as it writes to ProgramData