Questions about Symbolic Links

Status
Not open for further replies.

Pseudolife

Dabbler
Joined
Jan 7, 2016
Messages
25
Hello,

Is there a good guide somewhere to handling symbolic links in FreeNAS?

I have several sets of files on my server that should be in two or more locations at once, and rather than have the files duplicated/triplicated, I'm wondering if I could get by with symbolic links. Being somewhat of a newbie at this, I'm not at all sure this is a good idea, how to do it, and what side effects it might cause.

Here's what I'm looking at:
/tank/husbanddata (My files, shared with me on Windows)
/tank/wifesdata (My wife's files, shared with her on her a Mac)
/tank/plexdata (Used by the Plex Plugin to make things viable on our TVs)

Right now, there is a folder full of wedding photos in all three spots, which seems like a lot of wasted duplicated data. I'm figuring I could use Symbolic Links to make it one set of data that is accessible in three spots, but it will be a tad tricky because of sharing and permissions?

Also: Is there a possible set of issues here that could be a problem for use? Say my wife has the "prime" copy of the pictures in her data-set. If my wife renames her folder, would it break the symbolic links? If she moves it? What if I rename or move my version of the folder (the link), would it break? Refuse?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
One of the pitfalls I can think of is if your wife deletes all those photos by accident, or maybe the most recent photos that are not backed up. I actually copy the family photos to my wifes hard drive and she can play with them there, and she does delete a lot of them. The photos on the NAS are safe as I don't share those, and that is for good reason.

Another option would be Deduplication but you need a fair amount of RAM to make that work well. If you did that then if you wife deleted all the files, they would still remain because you haven't deleted them. But that was a bit simplified and if you wanted to use Deduplication, well you have a lot of reading ahead of you. I would not use it if you are only talking about 200GB of data being duplicated a few times (pulled that one out of the rump) and it's for home use.

I'm not sure sym links is what you want since you are really just looking to reduce the amount of duplicate data. In my mind a SymLink would be sharing the same dataset under three SMB shares. This would more line up with your example. So with that said, I think Dedupe is the only thing if you want to go down this road.

I expect someone else will chime in on this topic, and I want to discourage you from using Dedupe until after you have become an expert on the topic and you know your hardware meets the minimum specs.
 

Pseudolife

Dabbler
Joined
Jan 7, 2016
Messages
25
My wife has a PHD from a world renowned School of Information and works as a contractor for Microsoft. I don't worry about her ability to use a computer or keep files safe. I do think she might move them rename them, which was a concern. If that would mess up symbolic links then I'll need to look at other solutions. (Hence I asked.)

I'm also not willing to poke the de-duplication beast with a pointed stick.

What about using a symbolic link between my copy of the files and Plex's media folder. Plex isn't going to move or rename the linked directory, just show them as an album. Would that be a reasonable use of a symbolic link?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I have not heard of anyone here using symbolic links with FreeNAS like this so I think you are on ground breaking technology, or disaster. You might want to see what the FreeBSD forums could offer you since FreeNAS is built on FreeBSD. I wish you all the luck you can get.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
The first thing that came to mind for me was a dataset share.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
You would need to disable Unix Extensions in samba and then enable wide links. Symlinks should work as expected.

For instance, you can do the following:
  • make dataset Tank/SharedPhotos
  • ln -s /mnt/Tank/SharedPhotos/ /mnt/Tank/husbanddata/SharedPhotos
  • ln -s /mnt/Tank/SharedPhotos/ /mnt/Tank/wifesdata/SharedPhotos
  • ln -s /mnt/Tank/SharedPhotos/ /mnt/Tank/plexdata/SharedPhotos
Make sure you set up a proper snapshot schedule for "Tank/SharedPhotos"
 
Last edited:
Status
Not open for further replies.
Top