LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-18-2009, 03:52 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
Mounting CIFS share causes the mount point to be destroyed


Hi all.


I've been trying for a while mounting a EMC NAS share on linux. As far as I know the NAS share behaves just like a regular windows share, so the mount process should be very similar.

On the NAS server, the disc "Disc1" is shared, and I need to mount a sub-subfolder of that share. This is my line in /etc/fstab:
Code:
//windows_box/Disc1$/folder1/subfolder /var/tmp/mount_test     cifs    defaults,acl,soft,uid=srvadm,gid=adm,umask=0027,file_mode=0600,dir_mode=0700,credentials=/root/cred.txt,sec=ntlmv2  0       0
When mounting the share, this is what happens:
Code:
[root@server1 tmp]# ll 
total 8 
drwxr-xr-x 2 root root 4096 Jun 18 10:39 mount_test 
[root@server1 tmp]# mount mount_test/ 
[root@server1 tmp]# ll 
total 0 
?--------- ? ? ? ?            ? mount_test
In the console (i.e. bash), the "mount_test" word on the last line has a red background. When I issue "umount mount_test", everything is back to normal.

So, what can be the reason for mount to cause these symptoms? This is very very strangs, and I hope somebody knows how to proceed.

Regards,
kenneho
 
Old 06-18-2009, 04:05 AM   #2
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Rep: Reputation: 34
Can you try the following?

Instead of "mount mount_test/" try "mount /var/tmp/mount_test/". (EDIT: Actually this probably won't make any difference as it doesn't complain about mount_test not being in the fstab file)

If you run "mount -t cifs //windows_box/Disc1$/folder1/subfolder /var/tmp/mount_test" does that work?

Last edited by jsteel; 06-18-2009 at 04:07 AM.
 
Old 06-18-2009, 04:43 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by jsteel View Post
Can you try the following?

Instead of "mount mount_test/" try "mount /var/tmp/mount_test/". (EDIT: Actually this probably won't make any difference as it doesn't complain about mount_test not being in the fstab file)

If you run "mount -t cifs //windows_box/Disc1$/folder1/subfolder /var/tmp/mount_test" does that work?
I ran the command you suggested, but added the "-o user=<username>,sec=ntlmv2" options, with the exact same result..
 
Old 06-18-2009, 05:09 AM   #4
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
Quote:
Originally Posted by kenneho View Post
I ran the command you suggested, but added the "-o user=<username>,sec=ntlmv2" options, with the exact same result..
i believe
1$
and $/ is interpretted as a variable

is a command to change the active formatting in bash?
can you use a different share name

doing the leading \ will ignore the $

try
mount -t cifs //windows_box/Disc1\$/folder1/subfolder /var/tmp/mount_test

Last edited by carl0ski; 06-18-2009 at 05:14 AM.
 
Old 06-18-2009, 05:36 AM   #5
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by carl0ski View Post
i believe
1$
and $/ is interpretted as a variable

is a command to change the active formatting in bash?
can you use a different share name

doing the leading \ will ignore the $

try
mount -t cifs //windows_box/Disc1\$/folder1/subfolder /var/tmp/mount_test
Thanks for the advice. Unfortunately, this did not make any difference. The mount point still end up being destroyed. Very strange.

But just to clear things up: This setups should in theory work, right? There's nothing that says that one cannot mount a sub-sub folder directly?
 
Old 06-18-2009, 05:56 AM   #6
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
I've found that omitting the subfolder, and only mounting "//windows_box/Disc1\$/folder1" works fine, but as soon as I add the subfolder the mount poing gets corrupted. I can't see any logic to this...anyone who can?
 
Old 06-18-2009, 05:53 PM   #7
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
Quote:
Originally Posted by kenneho View Post
I've found that omitting the subfolder, and only mounting "//windows_box/Disc1\$/folder1" works fine, but as soon as I add the subfolder the mount poing gets corrupted. I can't see any logic to this...anyone who can?

Since you are omitting the subfolder name try a different subfolder name
 
Old 06-18-2009, 06:04 PM   #8
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Rep: Reputation: 34
Quote:
Originally Posted by kenneho View Post
I ran the command you suggested, but added the "-o user=<username>,sec=ntlmv2" options, with the exact same result..
Ah yes sorry I forgot to mention that. If I were you, I would jump on the Windows computer and force it to push down the same permissions through the subfolders. I think it's in advanced (on security tab) then there should be a tick box saying "replace ...". That would at least make sure the permissions are OK.
 
Old 06-19-2009, 01:03 AM   #9
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by carl0ski View Post
Since you are omitting the subfolder name try a different subfolder name
What do you mean by this? I've verified that the subfolder name is correct...
 
Old 06-19-2009, 01:05 AM   #10
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by jsteel View Post
Ah yes sorry I forgot to mention that. If I were you, I would jump on the Windows computer and force it to push down the same permissions through the subfolders. I think it's in advanced (on security tab) then there should be a tick box saying "replace ...". That would at least make sure the permissions are OK.
Thanks, I'll check it out. But one quick question regarding this: When I mount the folder, I'm able to access the subfolder by cd'ing into it. So is it then very likely that it is a permission issue?
 
Old 06-19-2009, 01:20 AM   #11
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Rep: Reputation: 34
Probably not, but it's worth a shot if you've run out of ideas!
 
Old 06-19-2009, 01:30 AM   #12
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by jsteel View Post
Probably not, but it's worth a shot if you've run out of ideas!
Good point. I'll see what I can do (have to get the MS Windows guys at work to check it, cause I don't have access myself...), and report back here.
 
Old 06-19-2009, 01:30 AM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can mount an smb service, not a subdirectory on the service (share).

Try "smbclient -L <username> windows_box" to see which network shares are offered.
 
Old 06-19-2009, 01:39 AM   #14
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by jschiwal View Post
You can mount an smb service, not a subdirectory on the service (share).

Try "smbclient -L <username> windows_box" to see which network shares are offered.
The "smbclient" command lists "Disc1" as one of it's shares. But I'm able to mount "//windowsbox/Disc1$/folder/", so mountint a subdirectory of the share (in this case a disc) does in fact work. But mounting a sub-subdirectory doesn't...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount cifs share problems BarryLinux Linux - Newbie 11 06-04-2012 12:42 AM
mount NFS to mount point then share out the mount point ionic_slim Linux - Networking 2 04-20-2008 12:17 PM
Mount.cifs Mounting a subdirectory of a windows share MonctonJohn Linux - Networking 4 09-28-2007 05:15 AM
Can't access mount point after mounting W2K3 Svr share humbletech99 Linux - Networking 1 12-15-2006 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration