Solved

how do I create a Linux cifs share that points to a path alias or link

Posted on 2014-09-12
6
484 Views
Last Modified: 2014-09-29
I need to create a cifs share on Red Hat Linux 6.5 to connect to a Windows Server 2008R2 server.  I need the name on both sides to be 'dump'.  That part I can do, with the mount -t cifs etc.....

The part I need help with is on the Linux side where 'dump' will actually be a pointer to the path /saved/files.

I've tried creating a soft link pointing dump to /saved/files, then using dump in the cifs mount but that didn't work.  I tried setting up a mount point named dump and then using that in the cifs mount.  None of which I really knew in detail what I was doing or the impact it would have.  It was the shotgun approach based on the limited understanding I have of setting up mount points, links and cifs shares. But, at any rate, nothing I have tried has worked.

So, basically how do I set things up so that the Linux system can put files in a directory named 'dump' that points to /saved/files and have those files also show up on the Windows server in a share named 'dump'?

TIA

Roger
0
Comment
Question by:si-support
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Accepted Solution

by:
Nopius earned 300 total points
ID: 40320779
Hi.

It's not very clear what do you mean by "name on both sides to be 'dump'".
It's easy to create cifs share (located on Linux ) to be visible in Windows as 'dump', just edit /etc/samba/smb.conf and add a section like:
[dump]
comment = Dump share
path = /saved/files
public = yes
writable = yes
printable = no

Open in new window


then restart samba service 'service smb restart'

Also it's easy to create symlink from any Linux directory with 'dump' name to point to /saved/files:

ln -s /saved/files dump

Open in new window


Also you can export NFS share and mount it as /dump on any other Linux system via NFS, just export it in /etc/exports and mount as /dump.

If you need something different, please clarify.

Regards,
Arty
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 175 total points
ID: 40320833
How about just mounting the windows share under redhat with cifs mount called /saved/files and create a symbolic link pointing to it? If you continue to have issues,post your mount commands or fstab.
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 175 total points
ID: 40320838
If your goal is to setup a shared file system between windows and Linux, all you need is one share, have clients mounted to it and call it whatever you need.  The quickest way is to setup on Windows side and mount from Linux with a cifs mount.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:si-support
ID: 40323125
Thanks for the comments.  Noplus, I want to use a cifs share rather than Samba, so I tried setting that up in the order you recommended.  Here's what I did:

On the Windows box I created a folder named 'dump' and set it up as a shared folder.  I created a simple test file there.

On the Linux box I created a directory /dump and gave it 775 permissions and left it empty.

Working from the linux box, I ran these commands:

mount -t cifs -o username=xxxx,password=xxx,workgroup=ourdom //10.10.10.20/dump /saved/files.    That created the mount point /saved/files pointing to the Windows server directory named 'dump'.  

ln -s /saved/files dump .  I hoped that would link the directory /saved/files to the directory named 'dump' I created on the Linux side.  

ls dump  displayed a test file I created in the directory named 'dump' on the Windows share 'dump'.  NOT the files under the Linux directory /saved/files, which is what I'm trying to get to.

Here's what I need to do.  On the Linux side, a user goes to the 'directory' named 'dump' and sees the files/folders in /saved/files.  On the Windows side, a user goes to the shared directory named 'dump' and sees the same files from the Linux directory /saved/files. Neither the Linux user nor the Windows user needs to worry about accessing any directory other than the one named 'dump'.  Neither the Windows user nor the Linux user needs to be concerned with, or know about, the /saved/files directory.  As far as either is concerned, they just know 'dump' holds the files that need.

Hope that helps clarify things.
0
 
LVL 14

Assisted Solution

by:mikelfritz
mikelfritz earned 25 total points
ID: 40342934
It sounds like your ln command is backwards.

Try

ln -s /path_to_local_dump /saved/files
0
 

Author Closing Comment

by:si-support
ID: 40350154
The problem was not resolved, but points were awarded based on details included in solution and demonstrated understanding of my issue.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question