Symlinking some of my drive to another, AND syncing structures (Link Shell Extension?)

1

1

I'm going to install a SSD and a hard drive on my computer soon. It's a 128 GB SSD, and a 1 TB hard drive.

I'm going to use the SSD as follows: It will store the OS and most applications.

As for the hard drive, it's going to store actual data (documents, images, videos, music and whatnot).

RAID and software solutions to fuse my drives visually have been more or less eliminated as counter-productive in my case. However, I still very much dislike the idea of having two drives to browse to all the time, and to get lost in. To give you an idea, I'm very annoyed by the fact that there are two program folders on x64 systems.

To get everything clean, practical, easy and in the same place, through some discussion with @allquixotic (thanks again for your patience, advice and explanations!), I have determined that the best solution for me is to put everything on the SSD - except that some of those "folders" and "files" will be symbolic links to the hard disc.

In short, in practical usage, C:\ (SSD) will be the only drive I use, and D:\ (HDD) will be a machine-used dump where the actual data for some of the files is.

So far, everything works fine. However, there is bound to be some situations where I'll have to browse to the hard drive. And in general, I just like things to be organised.

But symlinks only work one way. On the SSD (the links), I'll be able to do whatever I want, and the links will stay healthy. However, the links will stay where they were.

Let's say I create a symlink from C:\etc\etc\etc\etc\etc\thing.txt and have it point to D:\etc\etc\etc\etc\etc\thing.txt. And then I move C:\etc\etc\etc\etc\etc\thing.txt so it becomes C:\thing.txt.

Well, C:\thing.txt still points to D:\etc\etc\etc\etc\etc\thing.txt! Structures don't match anymore, and it becomes a nightmare if I have to search through D:. And it annoys me because things are not clean.

So! I would like to have a symlink that will not only do its job as a symlink but also make sure the destination, the D:\ drive, is organised the same way as the C:\ drive, and renames files and folders when I rename the link, and moves files when I move links, etc. When I browse to D:\, I want it to look exactly like my C:\ (except for the files it just doesn't have and that are on C:).

I believe I have found the right tool for this. But I'm not sure I understand it well. So I would like you people to lend me your more knowledgeable brains (because I have just learned about symlinks tonight) and tell me whether I am right.

First of all, Link Shell Extension will allow me to create and manage the links without having to go to the command prompt, yay!

http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

Then, I believe - and this is the core of the question - what I should do to accomplish what I have described above is to create a Smart Mirror (ctrl-F in documentation from the above link) of files on my C:\, pointing them to D:\, and:

  • Files on C:\ will become symlinks, and as such stop taking up space.
  • The actual files will be moved to D:\, being the targets of the link.
  • If I move symlinks from one directory in C:\ to another directory in C:\ and/or rename them, the files they refer to in D:\ will also be moved and renamed accordingly.

Am I right? Have I found my "dream tool"? If not, how can I accomplish this kind of symlinking/syncing? Is it even possible in the first place?

PS: If you would like detailed information on my system, I have described it all in this question (which isn't relevant anymore, by the way): Most efficient use of my SSD and new/old hard drives

EDIT

Summary of chat discussion with @KarthikT: It is possible to sort of reduce the clatter by trying to use as many top-level folders as possible, but we were not able to isolate a solution. So more suggestions would still be very much appreciated.

Ariane

Posted 2013-01-09T07:15:17.750

Reputation: 1 907

What are you really trying to do? – kinokijuf – 2013-01-09T07:28:24.353

I'm unclear? Geez, and I worked so hard trying to make it clear. I suck at, you know, synthetising info. Uhm. I want to have drive D:\ be a file "dump" for symlinks on C:, but I want drive D:\ to sync its directory structure, file names, etc. so it's always the same as C:'s. Is this better? – Ariane – 2013-01-09T07:32:33.237

Can I humbly invite you to come over to the linux side? Linux filesystem is already unified like what you want to do. – Karthik T – 2013-01-09T08:50:32.820

@KathikT Lol, thanks, but no thanks. :p – Ariane – 2013-01-09T17:39:45.437

Answers

2

You could Mount D drive as a folder, would be almost as clean I suppose. Or you could just Symlink the top level folders over to C drive. Any contents will not need to be symlinked.

Karthik T

Posted 2013-01-09T07:15:17.750

Reputation: 2 654

In a hurry now, and no need to examine your suggestions, but what about the smart mirror thing? How does it, and how doesn't it do qwhat I want? – Ariane – 2013-01-09T17:40:25.777

@Ariane " not only copies but synchronises the folder Source to Destination:" keyword there is copies. It works like dropbox, to copy from one place to another. Doesnt look like it employs symlinks at all – Karthik T – 2013-01-10T01:58:59.180

@Ariane If I am mistaken and it does symlink, then perhaps it has what you want. But I still hold that my solution is simpler. – Karthik T – 2013-01-10T02:00:47.707

First, sorry, I was in a real hurry with my first comment. "no need"->"no time" I didn't mean your answer was unneeded or anything. Second, since it's super late, I've only read the first link. And I still don't quite understand it. Do you think you could explain me in more detail exactly what mounting a drive as a folder does, and what the advantages are? Because at first glance, to me, it just removes the D:\ drive, making it a folder inside C:. But it still won't sync contents, eh? Actually, I think I'd still prefer to have the D:\ drive over that. :c Or maybe I misunderstood. – Ariane – 2013-01-10T07:34:15.177

@Ariane Have you played the game portal?

The idea is that there a folder on C drive, say "MyDDrive" once you enter it, you are actually in D drive. There is no syncing needed. It is essentially a symlink of D drive into a folder in C drive, but ideally at a lower level. – Karthik T – 2013-01-10T07:36:41.300

I am not sure if D:\ exists independently after this to be frank. You would need to try it. You should be able to undo it if you dont like it. – Karthik T – 2013-01-10T07:38:52.240

@Ariane Additionally, I do not understand your need to symlink files, If the parent folders are symlinked, the files will work as you expect them to, they dont need to be symlinked – Karthik T – 2013-01-10T07:40:32.710

Well, by symlinking files, I meant folders. In short, I want to put everything on the SSD, and then select some larger files, move them to the HDD, and leave behind a symlink on the SSD, so all appears to be on the SSD, and the HDD only contains files/folders that are targets of symlinks. So far, symlinks do fine. Now what I want to add to this functioning is that the files on the HDD will follow the behaviour of the symlinks on SSD. But just a naked symlink doesn't do this: the HDD keeps its initial folder tree and doesn't change it even if the SSD does. Links work, but it's messy. – Ariane – 2013-01-10T07:54:10.473

let us continue this discussion in chat

– Karthik T – 2013-01-10T07:55:15.463

You should try to Minimize the number of links to a handful (5-6) of top level folders. After that all you wont be able to do is move one link within another. Everything else should work. i.e moving the links themselves or moving contents of 1 link within the link or from one to another. – Karthik T – 2013-01-10T08:00:03.803

Summary of chat discussion with @KarthikT: It is possible to sort of reduce the clatter by trying to use as many top-level folders as possible, but we were not able to isolate a solution. So more suggestions would still be very much appreciated. – Ariane – 2013-01-10T16:25:12.507