Cifs mounting subdirectories from linux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am trying to mount two subdirectories from the same share name but cannot get it to work.



# Mount the two different subfolders:
# $server and $share are the same - the subfolder differs:
$ subfolderA=a/b/c
$ subfolderB=x/y/z
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB

# Traverse the directories - I see the same file in both directories (should only be be in dirA)
$ find /mnt/dir[AB] -name fda.txt -ls
707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirA/fda.txt
707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirB/fda.txt

# Mount in opposite order:
$ umount /mnt/dirA
$ umount /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA

# Traverse the directories - I do not see the file fda.txt at all
$ find /mnt/dir[AB] -name fda.txt -ls
<nothing>


I have verified my access to the different subfolders using smbclient and it gives me the expected results.



The reason for having two separate mounts instead of just one, is because I do not have access to the share itself, but only to the subfolders.










share|improve this question





















  • To understand the problem try to mount with --verbose option, i.e.: mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose
    – Bob
    Aug 15 at 7:41














up vote
0
down vote

favorite












I am trying to mount two subdirectories from the same share name but cannot get it to work.



# Mount the two different subfolders:
# $server and $share are the same - the subfolder differs:
$ subfolderA=a/b/c
$ subfolderB=x/y/z
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB

# Traverse the directories - I see the same file in both directories (should only be be in dirA)
$ find /mnt/dir[AB] -name fda.txt -ls
707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirA/fda.txt
707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirB/fda.txt

# Mount in opposite order:
$ umount /mnt/dirA
$ umount /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA

# Traverse the directories - I do not see the file fda.txt at all
$ find /mnt/dir[AB] -name fda.txt -ls
<nothing>


I have verified my access to the different subfolders using smbclient and it gives me the expected results.



The reason for having two separate mounts instead of just one, is because I do not have access to the share itself, but only to the subfolders.










share|improve this question





















  • To understand the problem try to mount with --verbose option, i.e.: mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose
    – Bob
    Aug 15 at 7:41












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to mount two subdirectories from the same share name but cannot get it to work.



# Mount the two different subfolders:
# $server and $share are the same - the subfolder differs:
$ subfolderA=a/b/c
$ subfolderB=x/y/z
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB

# Traverse the directories - I see the same file in both directories (should only be be in dirA)
$ find /mnt/dir[AB] -name fda.txt -ls
707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirA/fda.txt
707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirB/fda.txt

# Mount in opposite order:
$ umount /mnt/dirA
$ umount /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA

# Traverse the directories - I do not see the file fda.txt at all
$ find /mnt/dir[AB] -name fda.txt -ls
<nothing>


I have verified my access to the different subfolders using smbclient and it gives me the expected results.



The reason for having two separate mounts instead of just one, is because I do not have access to the share itself, but only to the subfolders.










share|improve this question













I am trying to mount two subdirectories from the same share name but cannot get it to work.



# Mount the two different subfolders:
# $server and $share are the same - the subfolder differs:
$ subfolderA=a/b/c
$ subfolderB=x/y/z
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB

# Traverse the directories - I see the same file in both directories (should only be be in dirA)
$ find /mnt/dir[AB] -name fda.txt -ls
707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirA/fda.txt
707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirB/fda.txt

# Mount in opposite order:
$ umount /mnt/dirA
$ umount /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderB /mnt/dirB
$ mount -t cifs //$server/$share/$subfolderA /mnt/dirA

# Traverse the directories - I do not see the file fda.txt at all
$ find /mnt/dir[AB] -name fda.txt -ls
<nothing>


I have verified my access to the different subfolders using smbclient and it gives me the expected results.



The reason for having two separate mounts instead of just one, is because I do not have access to the share itself, but only to the subfolders.







linux mount cifs






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 15 at 6:06









S.Olesen

1




1











  • To understand the problem try to mount with --verbose option, i.e.: mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose
    – Bob
    Aug 15 at 7:41
















  • To understand the problem try to mount with --verbose option, i.e.: mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose
    – Bob
    Aug 15 at 7:41















To understand the problem try to mount with --verbose option, i.e.: mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose
– Bob
Aug 15 at 7:41




To understand the problem try to mount with --verbose option, i.e.: mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose
– Bob
Aug 15 at 7:41










1 Answer
1






active

oldest

votes

















up vote
0
down vote













To understand the problem deeply, try to mount with --verbose option, i.e.



mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose


The possible reasons of the problem can be wrong inode numbers or caching. As workaround for the inode numbers problem try this options (one of them):



--serverino
--noserverino


Also try different caching methods (one of them):



--cache=none
--cache=strict
--cache=loose


Read mount.cifs(8) additionally.






share|improve this answer




















  • Well, the --verbose and the suggested options does reveal anything nor does it help. The first mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=******** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=******** The second mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=**
    – S.Olesen
    Aug 15 at 8:16











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f462676%2fcifs-mounting-subdirectories-from-linux%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













To understand the problem deeply, try to mount with --verbose option, i.e.



mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose


The possible reasons of the problem can be wrong inode numbers or caching. As workaround for the inode numbers problem try this options (one of them):



--serverino
--noserverino


Also try different caching methods (one of them):



--cache=none
--cache=strict
--cache=loose


Read mount.cifs(8) additionally.






share|improve this answer




















  • Well, the --verbose and the suggested options does reveal anything nor does it help. The first mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=******** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=******** The second mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=**
    – S.Olesen
    Aug 15 at 8:16















up vote
0
down vote













To understand the problem deeply, try to mount with --verbose option, i.e.



mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose


The possible reasons of the problem can be wrong inode numbers or caching. As workaround for the inode numbers problem try this options (one of them):



--serverino
--noserverino


Also try different caching methods (one of them):



--cache=none
--cache=strict
--cache=loose


Read mount.cifs(8) additionally.






share|improve this answer




















  • Well, the --verbose and the suggested options does reveal anything nor does it help. The first mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=******** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=******** The second mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=**
    – S.Olesen
    Aug 15 at 8:16













up vote
0
down vote










up vote
0
down vote









To understand the problem deeply, try to mount with --verbose option, i.e.



mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose


The possible reasons of the problem can be wrong inode numbers or caching. As workaround for the inode numbers problem try this options (one of them):



--serverino
--noserverino


Also try different caching methods (one of them):



--cache=none
--cache=strict
--cache=loose


Read mount.cifs(8) additionally.






share|improve this answer












To understand the problem deeply, try to mount with --verbose option, i.e.



mount -t cifs //$server/$share/$subfolderB /mnt/dirB --verbose


The possible reasons of the problem can be wrong inode numbers or caching. As workaround for the inode numbers problem try this options (one of them):



--serverino
--noserverino


Also try different caching methods (one of them):



--cache=none
--cache=strict
--cache=loose


Read mount.cifs(8) additionally.







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 15 at 7:52









Bob

72017




72017











  • Well, the --verbose and the suggested options does reveal anything nor does it help. The first mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=******** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=******** The second mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=**
    – S.Olesen
    Aug 15 at 8:16

















  • Well, the --verbose and the suggested options does reveal anything nor does it help. The first mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=******** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=******** The second mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=**
    – S.Olesen
    Aug 15 at 8:16
















Well, the --verbose and the suggested options does reveal anything nor does it help. The first mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=******** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=******** The second mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=**
– S.Olesen
Aug 15 at 8:16





Well, the --verbose and the suggested options does reveal anything nor does it help. The first mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=******** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=******** The second mount group with --verbose: ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=x/y/z,pass=** ip=192.168.1.1,unc=\192.168.1.1share,user=username,prefixpath=a/b/c,pass=**
– S.Olesen
Aug 15 at 8:16


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f462676%2fcifs-mounting-subdirectories-from-linux%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay