Symbolic Linking with Samba

Associate
Joined
1 Aug 2003
Posts
1,053
I have a server who's shared directory is getting a little on the over full side. I have a drive with a few hundred gig free but I want it to appear as part of the old directory structure over samba.

If the shared directory is on, say, /usr/data and the free space is mounted on /usr/other (already containing files) what is the best way to relocate several directories to the /usr/other/ directory yet merging seamlessly with the old structure??
 
surely it's just a case of moving the data other to the new directory and ammedning your smb.conf accordingly?

or if you need to merge the data from /usr/data to /usr/other use rsync the adjust your smb.conf accordingly.

HTH
 
I must not have explained myself properly. I want some parts of the samba share on one volume and other parts on another.

e.g. \\'server'\share\* = /usr/data

but \\server\share\archive\* = /usr/other

where /usr/data is hda1 and /usr/other is hda2
 
AFAIK, allowing the following of symlinks is on by default.

If not, then you can turn it on by editing your smb.conf like so:

[random share name]
path = /usr/data/
follow symlinks = Yes

Although, you'll probably want more options than that for your share,

Then:

ln -s /usr/other /usr/data/archive

Then, when you view the share from your windows box, you should have a seamless directory structure (but judging from the title of this thread, you already knew that!)

If you're having issues with this, then it's usually a permissions issue - whether that's the share permissions in Samba or the unix perms on the folder itself - they both have to allow your users in.
 
Last edited:
=walls= said:
Then, when you view the share from your windows box, you should have a seamless directory structure (but judging from the title of this thread, you already knew that!)


Had a shrewd guess but wasn't sure. Thanks.

As there were other directories on the drive that I didn't want shared on the network symlinking seemed the most sensible route.
 
Back
Top Bottom