All of lore.kernel.org
 help / color / mirror / Atom feed
* Mounting DFS
@ 2011-02-23 17:03 Heinrich Mislik
       [not found] ` <4D654BE7.11698.1C98C6C7-g/LCwZFXqzxQP/zxiyEj5OCYZQ7uCA5dI7sL/E+5skE@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Mislik @ 2011-02-23 17:03 UTC (permalink / raw)
  To: linux-cifs-u79uwXL29TY76Z2rM5mHXA

Hi,

I want to know the current status of support for mounting DFS shares. 
I found this posting:

http://marc.info/?l=linux-cifs-client&m=123357912319175&w=2

which at the end says:

> Problem 1 is almost solved, I just need some time to cleanup
> patches I've written.

I think, that my problem is related. Here is, what I tried:

On a samba server I have two shares:

[dfs]
   msdfs root = yes
# symlink exists: /home/dfs/share1 -> msdfs://otherserver/someshare
   path = /home/dfs
[share2]
   msdfs root = yes
   msdfs proxy = \otherserver\someshare

Both Windows and smbclient can access these shares without Problems.

After configuring /etc/request-key.conf I can mount with 

mount -t cifs //someserver/dfs/share1 -ouser=someuser /mnt

I can see the files of //otherserver/someshare under /mnt as 
expected.

But Mounting with 

mount -t cifs //someserver/share2 -ouser=someuser /mnt

I get

retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

The mounts were tried on:

/proc/version

Linux version 2.6.32-71.14.1.el6.x86_64 (mockbuild@ls20-bc2-
14.build.redhat.com) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) 
(GCC) ) #1 SMP Wed Jan 5 17:01:01 EST 2011

Thanks for any help

Cheers

Heinrich
-- 
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Mounting DFS
       [not found] ` <4D654BE7.11698.1C98C6C7-g/LCwZFXqzxQP/zxiyEj5OCYZQ7uCA5dI7sL/E+5skE@public.gmane.org>
@ 2011-02-25 11:25   ` Q (Igor Mammedov)
       [not found]     ` <AANLkTinrUrKZ0e26vOGF5RZvTR1BfEXfR8biuE6FeQNK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Q (Igor Mammedov) @ 2011-02-25 11:25 UTC (permalink / raw)
  To: Heinrich Mislik; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA

> mount -t cifs //someserver/share2 -ouser=someuser /mnt
Hi Heinrich,

Network packets dump of mount attempt would be helpful,
so that I can see what exactly going on.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Mounting DFS
       [not found]     ` <AANLkTinrUrKZ0e26vOGF5RZvTR1BfEXfR8biuE6FeQNK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-02-25 14:06       ` Heinrich Mislik
       [not found]         ` <4D67C586.23676.2643DA29-g/LCwZFXqzxQP/zxiyEj5OCYZQ7uCA5dI7sL/E+5skE@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Mislik @ 2011-02-25 14:06 UTC (permalink / raw)
  To: Q (Igor Mammedov), linux-cifs-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 1328 bytes --]

On 25 Feb 2011 at 14:25, Q (Igor Mammedov) wrote:

> > mount -t cifs //someserver/share2 -ouser=someuser /mnt
> Hi Heinrich,
> 
> Network packets dump of mount attempt would be helpful,
> so that I can see what exactly going on.

Four Files 

smbclient.share1.pcap
smbclient.share2.pcap
mount.share1.pcap
mount.share2.pcap

attached for the following commands:

smbclient -U mi //share99.univie.ac.at/dfs/share1
smbclient -U mi //share99.univie.ac.at/share2
mount -t cifs -o user=mi //share99.univie.ac.at/dfs/share1 /mnt ccess
mount -t cifs -o user=mi //share99.univie.ac.at/share2 /mnt

the last command failed with:

Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Relevant part of smb.conf on share99.univie.ac.at:

[dfs]
   msdfs root = yes
# symlink exists: /home/dfs/share1 -> msdfs://share.univie.ac.at/zid
   path = /home/dfs
[share2]
   msdfs root = yes
   msdfs proxy = \share.univie.ac.at\zid

The IP-Adresses are:

131.130.1.215 ... Server holding dfs-referrals
131.130.1.217 ... Server holding actual share
131.130.1.80  ... client

Hope this helps

Cheers

Heinrich
-- 
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140


[-- Attachment #2: Attachment information. --]
[-- Type: text/plain, Size: 479 bytes --]

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  smbclient.share1.pcap
     Date:  25 Feb 2011, 14:15
     Size:  7009 bytes.
     Type:  Unknown

[-- Attachment #3: smbclient.share1.pcap --]
[-- Type: Application/Octet-stream, Size: 7009 bytes --]

[-- Attachment #4: Attachment information. --]
[-- Type: text/plain, Size: 479 bytes --]

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  smbclient.share2.pcap
     Date:  25 Feb 2011, 14:15
     Size:  6757 bytes.
     Type:  Unknown

[-- Attachment #5: smbclient.share2.pcap --]
[-- Type: Application/Octet-stream, Size: 6757 bytes --]

[-- Attachment #6: Attachment information. --]
[-- Type: text/plain, Size: 475 bytes --]

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  mount.share1.pcap
     Date:  25 Feb 2011, 14:15
     Size:  6724 bytes.
     Type:  Unknown

[-- Attachment #7: mount.share1.pcap --]
[-- Type: Application/Octet-stream, Size: 6724 bytes --]

[-- Attachment #8: Attachment information. --]
[-- Type: text/plain, Size: 475 bytes --]

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  mount.share2.pcap
     Date:  25 Feb 2011, 14:15
     Size:  4692 bytes.
     Type:  Unknown

[-- Attachment #9: mount.share2.pcap --]
[-- Type: Application/Octet-stream, Size: 4692 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Mounting DFS
       [not found]         ` <4D67C586.23676.2643DA29-g/LCwZFXqzxQP/zxiyEj5OCYZQ7uCA5dI7sL/E+5skE@public.gmane.org>
@ 2011-02-25 18:46           ` Q (Igor Mammedov)
  0 siblings, 0 replies; 4+ messages in thread
From: Q (Igor Mammedov) @ 2011-02-25 18:46 UTC (permalink / raw)
  To: Heinrich Mislik

Hi Heinrich,

I guess you are out of luck with msdfs proxy option.
If we look at samba code, it fails here:
[samba.git] / source3 / smbd / service.c

       /* Handle non-Dfs clients attempting connections to msdfs proxy */
         if (lp_host_msdfs() && (*lp_msdfs_proxy(snum) != '\0'))  {
                 DEBUG(3, ("refusing connection to dfs proxy share '%s' "
                           "(pointing to %s)\n",
                         service, lp_msdfs_proxy(snum)));
                 *status = NT_STATUS_BAD_NETWORK_NAME;
                 return NULL;
         }

where lp_msdfs_proxy(snum) returns pointer to value of "msdfs proxy",
which obviously isn't empty. And logs message like:
      'refusing connection to dfs proxy share 'dfs' (pointing to
\\127.0.0.1\tmp)'
I don't see how it could work with this code anyway.

As far as I remember it is possible to mount remote DFS root (i.e. virtual root
that returns error STATUS_PATH_NOT_COVERED) and even a chain of them
with your kernel. But server must reply on tree connect to a such share with
error STATUS_PATH_NOT_COVERED and samba don't do it in this case.

sbmclient works because of it dumbly tries to get referrals for every share it
connects to, and after that it simply connects to a referral if
available or to the
share it was requested to connect.

Workarounds:
1. the easy way to solve issue is use conventional symlink based dfs which
works as expected.
2 Or for suicidal ones, hack the kernel and force it to accept
STATUS_BAD_NETWORK_NAME as STATUS_PATH_NOT_COVERED.
It can be done here fs/cifs/connect.c, look for keyword EREMOTE for
places to 'enhance'.

Of cause the right way is to fix samba, but you should probably ask the
author of those lines of code on samba list. I believe it is samba's issue.

--
Regards,
 Igor

On Fri, Feb 25, 2011 at 5:06 PM, Heinrich Mislik
<Heinrich.Mislik-4JhlDu4IDl0juwv8T7myQQ@public.gmane.org> wrote:
> On 25 Feb 2011 at 14:25, Q (Igor Mammedov) wrote:
>
>> > mount -t cifs //someserver/share2 -ouser=someuser /mnt
>> Hi Heinrich,
>>
>> Network packets dump of mount attempt would be helpful,
>> so that I can see what exactly going on.
>
> Four Files
>
> smbclient.share1.pcap
> smbclient.share2.pcap
> mount.share1.pcap
> mount.share2.pcap
>
> attached for the following commands:
>
> smbclient -U mi //share99.univie.ac.at/dfs/share1
> smbclient -U mi //share99.univie.ac.at/share2
> mount -t cifs -o user=mi //share99.univie.ac.at/dfs/share1 /mnt ccess
> mount -t cifs -o user=mi //share99.univie.ac.at/share2 /mnt
>
> the last command failed with:
>
> Retrying with upper case share name
> mount error(6): No such device or address
> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
>
> Relevant part of smb.conf on share99.univie.ac.at:
>
> [dfs]
>   msdfs root = yes
> # symlink exists: /home/dfs/share1 -> msdfs://share.univie.ac.at/zid
>   path = /home/dfs
> [share2]
>   msdfs root = yes
>   msdfs proxy = \share.univie.ac.at\zid
>
> The IP-Adresses are:
>
> 131.130.1.215 ... Server holding dfs-referrals
> 131.130.1.217 ... Server holding actual share
> 131.130.1.80  ... client
>
> Hope this helps
>
> Cheers
>
> Heinrich
> --
> Heinrich Mislik
> Zentraler Informatikdienst der Universitaet Wien
> A-1010 Wien, Universitaetsstrasse 7
> Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140
>
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
>   ---- File information -----------
>     File:  smbclient.share1.pcap
>     Date:  25 Feb 2011, 14:15
>     Size:  7009 bytes.
>     Type:  Unknown
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
>   ---- File information -----------
>     File:  smbclient.share2.pcap
>     Date:  25 Feb 2011, 14:15
>     Size:  6757 bytes.
>     Type:  Unknown
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
>   ---- File information -----------
>     File:  mount.share1.pcap
>     Date:  25 Feb 2011, 14:15
>     Size:  6724 bytes.
>     Type:  Unknown
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
>   ---- File information -----------
>     File:  mount.share2.pcap
>     Date:  25 Feb 2011, 14:15
>     Size:  4692 bytes.
>     Type:  Unknown
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-25 18:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 17:03 Mounting DFS Heinrich Mislik
     [not found] ` <4D654BE7.11698.1C98C6C7-g/LCwZFXqzxQP/zxiyEj5OCYZQ7uCA5dI7sL/E+5skE@public.gmane.org>
2011-02-25 11:25   ` Q (Igor Mammedov)
     [not found]     ` <AANLkTinrUrKZ0e26vOGF5RZvTR1BfEXfR8biuE6FeQNK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-25 14:06       ` Heinrich Mislik
     [not found]         ` <4D67C586.23676.2643DA29-g/LCwZFXqzxQP/zxiyEj5OCYZQ7uCA5dI7sL/E+5skE@public.gmane.org>
2011-02-25 18:46           ` Q (Igor Mammedov)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.