News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

NTFS junctions

Started by sinsi, August 20, 2012, 09:15:37 PM

Previous topic - Next topic

sinsi

So my hard drive layout in the computer is
- 120GB SSD as C:
- 1TB data drive (VMs, programming, games) as E:
- 1TB drive for win8 as F: (soon to be gone Bill  :biggrin:)
- 1TB sitting there, overspill for my customer images ::)
I bought a 2TB drive and mounted it at e:\games after I moved all the games to it.
Everything has been going swimmingly for the last 12 months, now I decide to trim the 500GB of games...

Uninstall 'Age of Empires Gold' and my junction from 'Volume\blahblah' to 'e:\games' is gone. No games work.
Remade e:\games, re-mounted the drive, all is OK. Got brave, uninstalled 'NFS Most Wanted'.
Same thing happened, except this time the game wasn't deleted from the (presumably unlinked) hard drive.

I thought the whole point of junctions was that they are transparent to the user because of the low level (file system).
Anyone had any problems with junctions disappearing? I just hope the drive isn't bad.
🍺🍺🍺

dedndave

i don't use such things - lol
i change out drives often enough that drive letters change, then you are screwed

when you format a new drive, you can use up to 4 physical partitions
i always use all of them, making one of them a small bootable XP partition
i guess there might be some advantage in leaving one free
i think that if you create logical partitions, a free physical partition is required

Vortex

Hi sinsi,

Did you try Mark Russinovich's Junction tool?

http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

Gunther

Hi Vortex,

Quote from: Vortex on August 21, 2012, 03:12:52 AM
Hi sinsi,

Did you try Mark Russinovich's Junction tool?

http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

good hint.  :t I didn't know that tool, but it can be useful. Furthermore: version 1.06 seems to be stable.

Gunther
You have to know the facts before you can distort them.

Vortex

The article below provides tools with source code to create NTFS junctions :

NTFS Hard Links, Directory Junctions, and Windows Shortcuts

sinsi

Windows 7 comes with mklink.exe which can create junctions.
I am more concerned with an uninstall removing the link as well.
🍺🍺🍺

Bill Cravener

Quote from: sinsi on August 20, 2012, 09:15:37 PM
So my hard drive layout in the computer is
. . .
- 1TB drive for win8 as F: (soon to be gone Bill  :biggrin:)
. . .

You talkin' to me ? :biggrin:

hutch--

As long as I am using XP and have Win2000 machines lurking around as backups, I make sure that any disk can be swapped from one machine to another. I originally had 2 x 1 tb and 2 x 500 gig drives on this box, later bought 2 more 1tb drives but made the mistake of using disk caddies which worked OK for a few months then damaged both of the second pair of 1 tb disks. Put the old 500 gig ones back in but recently bought 2 x 2 tb drives off eBay which I put into this box.

I use standard NTFS formatting and absolutely no trickery at all, this way I can move them, take them out if a board fails and put them into another box if I need to to get data off a disk. Long ago I learnt not to run striped disks as while the disks were generally reliable, the raid hardware/software varied from board to board and usually you could not read the disk from another board.

The other thing I always do is name the partition by its drive letter "drv_j" or similar denoting the actual disk "drv_3_k". This is a leftover from the irksome habit of Win2000 if you had to do a re-install where it always messed up the drive order and I always had to manually change all of the drive orders to get them back in the right place. Most of the Microsoft drive gimmicks locked the disks into one machine and you lost the data if the board failed.

Sad to say Win7 64 bit uses a different NTFS to Win XP / 2000 so it sits with 4 x 1 tb drives that cannot be swapped with any of the other machines.

dedndave

hopefully, you can stick an XP-formatted drive into the win7 machine
copy the stuff to it
then stick it back in the XP machine   :shock:

sinsi

>I use standard NTFS formatting and absolutely no trickery at all
A junction isn't trickery, it's a standard NTFS thing. Start an administrator command prompt, have a look at the output from "dir c:\ /l/s". Junctions are everywhere.
     Total Files Listed:
               0 File(s)              0 bytes
              63 Dir(s)  58,109,059,072 bytes free

🍺🍺🍺

Vortex

Vista and its predecessors are using a lot of junctions :

http://windowsconnected.com/blogs/joshs_blog/archive/2006/09/28/Windows-Vista-Junction-Points.aspx

sinsi

Because so many programs hard code paths, Microsoft thought it best to work around it.
Even Windows 7 has a junction, "documents and settings", as an alias for "users", for those brain dead XP programmers.

Opening "c:\documents and settings\sinsi\blah.txt" actually opens "c:\users\sinsi\blah.txt".
Notepad doesn't know, even Windows (user mode) doesn't know.
Part of NTFS, even Windows will obey.
🍺🍺🍺

dedndave

yes - but they are all on the same volume
when you go across volumes, you are just asking for headaches

sinsi

Quote from: dedndave on August 24, 2012, 01:16:38 AM
yes - but they are all on the same volume
when you go across volumes, you are just asking for headaches
The only restriction is about network drives.

To try it out I created a new user, logged on as that user to create the initial profile, then restarted.
Logged on as my usual account then moved the new user directory to f:
Made a link between c:\users\new and f:\new
Booted to new user no problems, installed stuff OK.

Not just a different volume but a different physical drive.
🍺🍺🍺

dedndave

that's wonderful
now start moving drives from one machine to another and see what it gets you
the situation may be better under win 7, but under XP, drive letters change and things get all messed up