Solved

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

Posted on 2014-09-12
6
377 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
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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
A safe way to clean winsxs folder from your windows server 2008 R2 editions
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…

776 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