Jump to content

Hardlink Comprehension Check


nt5raham

Recommended Posts

Below I have some specific statements about hardlinks as used by Vortex. To the best of my knowledge these statements are all accurate, but I want to make sure I understand what Vortex is doing and how my actions may affect things. Therefore, I would appreciate feedback by "those who are in the know," especially if I have mis-stated something. Numbering is provided for your convenience.

  1. When Vortex deploys, among other things it is creating hardlinks in \Data\ representing each of the plugins for Enabled mods.
  2. There is only one physical plugin file, and it is in the Staging Folder but not in \Data\, thus reducing disk space used.
  3. If I "move" a plugin from \Data\ to another folder (i.e. use File Explorer to drag/drop the plugin onto my Desktop on the same drive), I am "breaking" the hardlink and creating a copy of the plugin on the Desktop. Now there are two physical copies of the plugin file: one in the Staging Folder and one on the Desktop.
  4. If I "move" the same plugin from Desktop to \Data\, then the second copy of the physical file is now in \Data\ and there is still no hardlink.
  5. If I Deploy in Vortex, it will find an external change and present options for what to do with this plugin.
  6. If I choose the option to Revert Changes, Vortex will delete the physical copy from \Data\ and create a hardlink referencing the physical file in the Staging Folder. There will again be only one copy of the physical file.
  7. Step 4 can be skipped and the end result will be the same, while avoiding the needless "move" (by me) and delete (by Vortex) of the physical file.
  8. Going through this process causes no harm to the overall mod management being done by Vortex.
  9. Going through this process with 1,400 different plugins causes no harm to the overall mod management being done by Vortex.

 

Thanks in advance for your on-topic feedback! :smile:

Link to comment
Share on other sites

2. In fact it's not really correct that the file exists in the stagin folder and there is a link in /Data, it's more that the file exists on the disk and the filesystem has a link in both places, it would be just as accurate(or not) to say that the file exists in /Data and there is a link in the staging folder.

If you edit the file in /data or in the staging folder then you will have two separate now different files. Vortex will detect they are now different and offer to make the staging folder and /data file match up again.

5. at this point i believe deploying in vortex will result in the file in /data being suffixed 'vortex_backup' and a new hardlink to the staging folder version made, to be honest I've never got a good handle on when vortex will 'notice' an esp changing, and then when it will offer to reconcile, so this may be inaccurate.

 

diziet

Link to comment
Share on other sites

2. In fact it's not really correct that the file exists in the stagin folder and there is a link in /Data, it's more that the file exists on the disk and the filesystem has a link in both places, it would be just as accurate(or not) to say that the file exists in /Data and there is a link in the staging folder.

If you edit the file in /data or in the staging folder then you will have two separate now different files. Vortex will detect they are now different and offer to make the staging folder and /data file match up again.

5. at this point i believe deploying in vortex will result in the file in /data being suffixed 'vortex_backup' and a new hardlink to the staging folder version made, to be honest I've never got a good handle on when vortex will 'notice' an esp changing, and then when it will offer to reconcile, so this may be inaccurate.

 

diziet

@diziet, thanks for the response!

 

2. That is just weird, and hard for me to wrap my finite little mind around. My DOS beginnings say it has to be in "some" location that a savvy person can put their finger on. If not the Staging Folder, than where? (Excepting the archive downloaded from Nexus, of course.) "It's more that the file exists on the disk..." ...where?

5. In my experience as I've been toying with this, I've flip-flopped these 1,400 files around several times and haven't seen any plugins suffixed 'vortex_backup.' After the dust settles there is only one of each plugin file in \Data\ with no other name variations, leading me to think the physical file I copied there has been deleted. Of course that is a critical point, because the reason for my query is prompted by hitting the 2,048 open file handles limit, and that limit is reached (at least in part) by having too many files of certain types in \Data\. So it would be wise of Vortex not to place backups there. As far as timing, it checks for and finds external changes very consistently with each Deploy.

Link to comment
Share on other sites

With Vortex there is only one copy of the mod. The real physical file exists in the mod staging folder.

There is only one hardlink to that file and it exists in the appropriate place in the game directory; usually Data/.

 

I welcome correction - with references.

Link to comment
Share on other sites

With Vortex there is only one copy of the mod. The real physical file exists in the mod staging folder.

There is only one hardlink to that file and it exists in the appropriate place in the game directory; usually Data/.

 

I welcome correction - with references.

That concurs with point 2. in my OP. Thx. But if I'm wrong, I want to find out.

Link to comment
Share on other sites

2. In fact it's not really correct that the file exists in the stagin folder and there is a link in /Data, it's more that the file exists on the disk and the filesystem has a link in both places, it would be just as accurate(or not) to say that the file exists in /Data and there is a link in the staging folder.

If you edit the file in /data or in the staging folder then you will have two separate now different files. Vortex will detect they are now different and offer to make the staging folder and /data file match up again.

 

 

diziet

 

If you're correct here, would that mean that all file system names are actually hard links?

Link to comment
Share on other sites

Guest deleted34304850

From the Wikipedia article cited by 1ae0bfb8 (https://en.wikipedia.org/wiki/Hard_link):

 

"In computing, a hard link is a directory entry that associates a name with a file in a file system. All directory-based file systems must have at least one hard link giving the original name for each file. The term “hard link” is usually only used in file systems that allow more than one hard link for the same file."

 

If the author of this article is correct, then all file system names are actually hard links.

Link to comment
Share on other sites

Below I have some specific statements about hardlinks as used by Vortex. To the best of my knowledge these statements are all accurate, but I want to make sure I understand what Vortex is doing and how my actions may affect things. Therefore, I would appreciate feedback by "those who are in the know," especially if I have mis-stated something. Numbering is provided for your convenience.

  1. When Vortex deploys, among other things it is creating hardlinks in \Data\ representing each of the plugins for Enabled mods.
  2. There is only one physical plugin file, and it is in the Staging Folder but not in \Data\, thus reducing disk space used.
  3. If I "move" a plugin from \Data\ to another folder (i.e. use File Explorer to drag/drop the plugin onto my Desktop on the same drive), I am "breaking" the hardlink and creating a copy of the plugin on the Desktop. Now there are two physical copies of the plugin file: one in the Staging Folder and one on the Desktop.
  4. If I "move" the same plugin from Desktop to \Data\, then the second copy of the physical file is now in \Data\ and there is still no hardlink.
  5. If I Deploy in Vortex, it will find an external change and present options for what to do with this plugin.
  6. If I chose the option to Revert Changes, Vortex will delete the physical copy from \Data\ and create a hardlink referencing the physical file in the Staging Folder. There will again be only one copy of the physical file.
  7. Step 4 can be skipped and the end result will be the same, while avoiding the needless "move" (by me) and delete (by Vortex) of the physical file.
  8. Going through this process causes no harm to the overall mod management being done by Vortex.
  9. Going through this process with 1,400 different plugins causes no harm to the overall mod management being done by Vortex.

 

Thanks in advance for your on-topic feedback! :smile:

 

 

1. True

2. True

3. True

4. True

5. True

6. I'm not sure

7. True

8. False, it screws Vortex up, because you are making changes and severing hardlinks by moving things with Windows File Manager. (I do this intentionally when I edit an ESP with Xedit though)

9. Going through this process screws up all 1400 mods because you severed all 1400 hardlinks rendering Vortex unable to manage the mods.

 

you should NEVER do Steps 3 through 9

Link to comment
Share on other sites

 

6' If I chose the option to Revert Changes, Vortex will delete the physical copy from \Data\ and create a hardlink referencing the physical file in the Staging Folder. There will again be only one copy of the physical file.

8. Going through this process causes no harm to the overall mod management being done by Vortex.

9. Going through this process with 1,400 different plugins causes no harm to the overall mod management being done by Vortex.

 

6. I'm not sure

8. False, it screws Vortex up, because you are making changes and severing hardlinks by moving things with Windows File Manager. (I do this intentionally when I edit an ESP with Xedit though)

9. Going through this process screws up all 1400 mods because you severed all 1400 hardlinks rendering Vortex unable to manage the mods.

 

you should NEVER do Steps 3 through 9

 

Statements 8. and 9. in my OP are predicated upon 6. (the correction process) being effective. If 6. is false, then 8. and 9. are false. However, my observations suggest that 6. is true and the external changes are in fact reverted back to Vortex happiness. It'd be nice to see Tannin's feedback on this. Thanks for contributing!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...