[cifs-protocol] Canon + NetApp Clustered Data ONTAP 8.2.3 / 8.2.4 QUERY_PATH_INFO confusion

Filip Sneppe filip.sneppe at gmail.com
Thu Dec 3 16:57:37 UTC 2015


Hi,

I am troubleshooting a problem between a Canon IR-ADV4235 scanner and
NetApp Clustered Data ONTAP storage system. This problem occurred after an
upgrade of the NetApp storage system from 8.2.3 to 8.2.4 and we still have
systems of both versions available that show the change in behavior.

For completeness, the Canon scanner has the following info:
Controller version: 1401.0.1101
Scanner Version: 2102.101
Finisher Version: 2201.0.0.0.0.0.0

Via this mailing list I hope to get a better understanding of what correct
expected SMB/CIFS behavior is, so that I can contact the correct vendor
with a request to dig deeper into this issue.

In my troubleshooting the problem lies in the different way in which the
NetApp CIFS server responds to the client's Trans2 QUERY_PATH_INFO request.

In the working trace with ONTAP 8.2.3, the client is configured to access a
UNC path \\SI0064\SCAN and put the scans in a folder named "folder".

The QUERY_PATH_INFO request issued by the client looks like this:

No.     Time            Source                Destination
Protocol Length Info
     13 16:42:10.866679 157.164.95.28         157.164.190.111       SMB
 186    Trans2 Request, QUERY_PATH_INFO, Info Standard, Path:
\SI0064\SCAN\folder

Frame 13: 186 bytes on wire (1488 bits), 186 bytes captured (1488 bits)
Ethernet II, Src: Cisco_d7:38:00 (00:19:a9:d7:38:00), Dst:
02:a0:98:60:9a:ac (02:a0:98:60:9a:ac)
802.1Q Virtual LAN, PRI: 0, CFI: 0, ID: 137
Internet Protocol Version 4, Src: 157.164.95.28 (157.164.95.28), Dst:
157.164.190.111 (157.164.190.111)
Transmission Control Protocol, Src Port: 34859 (34859), Dst Port:
microsoft-ds (445), Seq: 866226453, Ack: 3491940774, Len: 116
NetBIOS Session Service
SMB (Server Message Block Protocol)
    SMB Header
        Server Component: SMB
        [Response in: 14]
        SMB Command: Trans2 (0x32)
        Error Class: Success (0x00)
        Reserved: 00
        Error Code: No Error
        Flags: 0x00
            0... .... = Request/Response: Message is a request to the server
            .0.. .... = Notify: Notify client only on open
            ..0. .... = Oplocks: OpLock not requested/granted
            ...0 .... = Canonicalized Pathnames: Pathnames are not
canonicalized
            .... 0... = Case Sensitivity: Path names are case sensitive
            .... ..0. = Receive Buffer Posted: Receive buffer has not been
posted
            .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not
supported
        Flags2: 0x9001
            1... .... .... .... = Unicode Strings: Strings are Unicode
            .0.. .... .... .... = Error Code Type: Error codes are DOS
error codes
            ..0. .... .... .... = Execute-only Reads: Don't permit reads if
execute-only
            ...1 .... .... .... = Dfs: Resolve pathnames with Dfs
            .... 0... .... .... = Extended Security Negotiation: Extended
security negotiation is not supported
            .... .0.. .... .... = Reparse Path: The request does not use a
@GMT reparse path
            .... .... .0.. .... = Long Names Used: Path names in request
are not long file names
            .... .... ...0 .... = Security Signatures Required: Security
signatures are not required
            .... .... .... 0... = Compressed: Compression is not requested
            .... .... .... .0.. = Security Signatures: Security signatures
are not supported
            .... .... .... ..0. = Extended Attributes: Extended attributes
are not supported
            .... .... .... ...1 = Long Names Allowed: Long file names are
allowed in the response
        Process ID High: 0
        Signature: 0000000000000000
        Reserved: 0000
        Tree ID: 1  (\\SI0064\SCAN)
            [Path: \\SI0064\SCAN]
            [Mapped in: 12]
        Process ID: 0
        User ID: 1
        Multiplex ID: 1
    Trans2 Request (0x32)
        Word Count (WCT): 15
        Total Parameter Count: 46
        Total Data Count: 0
        Max Parameter Count: 2
        Max Data Count: 40
        Max Setup Count: 0
        Reserved: 00
        Flags: 0x0000
        Timeout: Return immediately (0)
        Reserved: 0000
        Parameter Count: 46
        Parameter Offset: 66
        Data Count: 0
        Data Offset: 0
        Setup Count: 1
        Reserved: 00
        Subcommand: QUERY_PATH_INFO (0x0005)
        Byte Count (BCC): 47
        Padding: 00
        QUERY_PATH_INFO Parameters
            Level of Interest: Info Standard (1)
            Reserved: 00000000
            File Name: \SI0064\SCAN\folder

And the reply indicates that this query was successful:

No.     Time            Source                Destination
Protocol Length Info
     14 16:42:10.866794 157.164.190.111       157.164.95.28         SMB
 152    Trans2 Response, QUERY_PATH_INFO

Frame 14: 152 bytes on wire (1216 bits), 152 bytes captured (1216 bits)
Ethernet II, Src: 02:a0:98:60:9a:ac (02:a0:98:60:9a:ac), Dst:
Cisco_d7:38:00 (00:19:a9:d7:38:00)
802.1Q Virtual LAN, PRI: 4, CFI: 0, ID: 137
Internet Protocol Version 4, Src: 157.164.190.111 (157.164.190.111), Dst:
157.164.95.28 (157.164.95.28)
Transmission Control Protocol, Src Port: microsoft-ds (445), Dst Port:
34859 (34859), Seq: 3491940774, Ack: 866226569, Len: 82
NetBIOS Session Service
SMB (Server Message Block Protocol)
    SMB Header
        Server Component: SMB
        [Response to: 13]
        [Time from request: 0.000115000 seconds]
        SMB Command: Trans2 (0x32)
        Error Class: Success (0x00)
        Reserved: 00
        Error Code: No Error
        Flags: 0x80
            1... .... = Request/Response: Message is a response to the
client/redirector
            .0.. .... = Notify: Notify client only on open
            ..0. .... = Oplocks: OpLock not requested/granted
            ...0 .... = Canonicalized Pathnames: Pathnames are not
canonicalized
            .... 0... = Case Sensitivity: Path names are case sensitive
            .... ..0. = Receive Buffer Posted: Receive buffer has not been
posted
            .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not
supported
        Flags2: 0x8001
            1... .... .... .... = Unicode Strings: Strings are Unicode
            .0.. .... .... .... = Error Code Type: Error codes are DOS
error codes
            ..0. .... .... .... = Execute-only Reads: Don't permit reads if
execute-only
            ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs
            .... 0... .... .... = Extended Security Negotiation: Extended
security negotiation is not supported
            .... .0.. .... .... = Reparse Path: The request does not use a
@GMT reparse path
            .... .... .0.. .... = Long Names Used: Path names in request
are not long file names
            .... .... ...0 .... = Security Signatures Required: Security
signatures are not required
            .... .... .... 0... = Compressed: Compression is not requested
            .... .... .... .0.. = Security Signatures: Security signatures
are not supported
            .... .... .... ..0. = Extended Attributes: Extended attributes
are not supported
            .... .... .... ...1 = Long Names Allowed: Long file names are
allowed in the response
        Process ID High: 0
        Signature: 0000000000000000
        Reserved: 0000
        Tree ID: 1  (\\SI0064\SCAN)
            [Path: \\SI0064\SCAN]
            [Mapped in: 12]
        Process ID: 0
        User ID: 1
        Multiplex ID: 1
    Trans2 Response (0x32)
        Subcommand: QUERY_PATH_INFO (0x0005)
        [Level of Interest: Info Standard (1)]
        [File Name: \SI0064\SCAN\folder]
        Word Count (WCT): 10
        Total Parameter Count: 0
        Total Data Count: 22
        Reserved: 0000
        Parameter Count: 0
        Parameter Offset: 56
        Parameter Displacement: 0
        Data Count: 22
        Data Offset: 56
        Data Displacement: 0
        Setup Count: 0
        Reserved: 00
        Byte Count (BCC): 23
        Padding: 00
        QUERY_PATH_INFO Data
            Created: Dec  3, 2015 15:32:36.000000000 CET
            Last Access: Dec  3, 2015 15:32:36.000000000 CET
            Last Write: Dec  3, 2015 15:32:36.000000000 CET
            Data Size: 0
            Allocation Size: 0
            File Attributes: 0x0010

In the non-working setup with ONTAP 8.2.4, the client is configured to put
the scanned files on a share \\SI0067\PARTAGES_DG01$ into a subfolder
"hierarchique\prv-O1010100".

The QUERY_PATH_INFO request looks like this - obviously very similar to the
other example but with different UNC path and folder names:

No.     Time            Source                Destination
Protocol Length Info
     13 14:51:52.215622 157.164.95.28         157.164.130.38        SMB
 244    Trans2 Request, QUERY_PATH_INFO, Info Standard, Path:
\SI0067\PARTAGES_DGO1$\hierarchique\prv-O1010100

Frame 13: 244 bytes on wire (1952 bits), 244 bytes captured (1952 bits)
Ethernet II, Src: Cisco_ff:fd:90 (00:08:e3:ff:fd:90), Dst:
02:a0:98:3b:d5:49 (02:a0:98:3b:d5:49)
802.1Q Virtual LAN, PRI: 0, CFI: 0, ID: 220
Internet Protocol Version 4, Src: 157.164.95.28 (157.164.95.28), Dst:
157.164.130.38 (157.164.130.38)
Transmission Control Protocol, Src Port: 60466 (60466), Dst Port:
microsoft-ds (445), Seq: 2857033278, Ack: 1627879133, Len: 174
NetBIOS Session Service
SMB (Server Message Block Protocol)
    SMB Header
        Server Component: SMB
        [Response in: 14]
        SMB Command: Trans2 (0x32)
        Error Class: Success (0x00)
        Reserved: 00
        Error Code: No Error
        Flags: 0x00
            0... .... = Request/Response: Message is a request to the server
            .0.. .... = Notify: Notify client only on open
            ..0. .... = Oplocks: OpLock not requested/granted
            ...0 .... = Canonicalized Pathnames: Pathnames are not
canonicalized
            .... 0... = Case Sensitivity: Path names are case sensitive
            .... ..0. = Receive Buffer Posted: Receive buffer has not been
posted
            .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not
supported
        Flags2: 0x9001
            1... .... .... .... = Unicode Strings: Strings are Unicode
            .0.. .... .... .... = Error Code Type: Error codes are DOS
error codes
            ..0. .... .... .... = Execute-only Reads: Don't permit reads if
execute-only
            ...1 .... .... .... = Dfs: Resolve pathnames with Dfs
            .... 0... .... .... = Extended Security Negotiation: Extended
security negotiation is not supported
            .... .0.. .... .... = Reparse Path: The request does not use a
@GMT reparse path
            .... .... .0.. .... = Long Names Used: Path names in request
are not long file names
            .... .... ...0 .... = Security Signatures Required: Security
signatures are not required
            .... .... .... 0... = Compressed: Compression is not requested
            .... .... .... .0.. = Security Signatures: Security signatures
are not supported
            .... .... .... ..0. = Extended Attributes: Extended attributes
are not supported
            .... .... .... ...1 = Long Names Allowed: Long file names are
allowed in the response
        Process ID High: 0
        Signature: 0000000000000000
        Reserved: 0000
        Tree ID: 1  (\\SI0067\PARTAGES_DGO1$)
            [Path: \\SI0067\PARTAGES_DGO1$]
            [Mapped in: 12]
        Process ID: 0
        User ID: 1
        Multiplex ID: 1
    Trans2 Request (0x32)
        Word Count (WCT): 15
        Total Parameter Count: 104
        Total Data Count: 0
        Max Parameter Count: 2
        Max Data Count: 40
        Max Setup Count: 0
        Reserved: 00
        Flags: 0x0000
        Timeout: Return immediately (0)
        Reserved: 0000
        Parameter Count: 104
        Parameter Offset: 66
        Data Count: 0
        Data Offset: 0
        Setup Count: 1
        Reserved: 00
        Subcommand: QUERY_PATH_INFO (0x0005)
        Byte Count (BCC): 105
        Padding: 00
        QUERY_PATH_INFO Parameters
            Level of Interest: Info Standard (1)
            Reserved: 00000000
            File Name: \SI0067\PARTAGES_DGO1$\hierarchique\prv-O1010100

The reply from the NetApp however, indicates it was unable to return the
QUERY_PATH_INFO:

No.     Time            Source                Destination
Protocol Length Info
     14 14:51:52.215789 157.164.130.38        157.164.95.28         SMB
 109    Trans2 Response, QUERY_PATH_INFO, Error: STATUS_UNSUCCESSFUL

Frame 14: 109 bytes on wire (872 bits), 109 bytes captured (872 bits)
Ethernet II, Src: 02:a0:98:3b:d5:49 (02:a0:98:3b:d5:49), Dst:
Cisco_ff:fd:90 (00:08:e3:ff:fd:90)
802.1Q Virtual LAN, PRI: 4, CFI: 0, ID: 220
Internet Protocol Version 4, Src: 157.164.130.38 (157.164.130.38), Dst:
157.164.95.28 (157.164.95.28)
Transmission Control Protocol, Src Port: microsoft-ds (445), Dst Port:
60466 (60466), Seq: 1627879133, Ack: 2857033452, Len: 39
NetBIOS Session Service
SMB (Server Message Block Protocol)
    SMB Header
        Server Component: SMB
        [Response to: 13]
        [Time from request: 0.000167000 seconds]
        SMB Command: Trans2 (0x32)
        NT Status: STATUS_UNSUCCESSFUL (0xc0000001)
        Flags: 0x80
            1... .... = Request/Response: Message is a response to the
client/redirector
            .0.. .... = Notify: Notify client only on open
            ..0. .... = Oplocks: OpLock not requested/granted
            ...0 .... = Canonicalized Pathnames: Pathnames are not
canonicalized
            .... 0... = Case Sensitivity: Path names are case sensitive
            .... ..0. = Receive Buffer Posted: Receive buffer has not been
posted
            .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not
supported
        Flags2: 0xc001
            1... .... .... .... = Unicode Strings: Strings are Unicode
            .1.. .... .... .... = Error Code Type: Error codes are NT error
codes
            ..0. .... .... .... = Execute-only Reads: Don't permit reads if
execute-only
            ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs
            .... 0... .... .... = Extended Security Negotiation: Extended
security negotiation is not supported
            .... .0.. .... .... = Reparse Path: The request does not use a
@GMT reparse path
            .... .... .0.. .... = Long Names Used: Path names in request
are not long file names
            .... .... ...0 .... = Security Signatures Required: Security
signatures are not required
            .... .... .... 0... = Compressed: Compression is not requested
            .... .... .... .0.. = Security Signatures: Security signatures
are not supported
            .... .... .... ..0. = Extended Attributes: Extended attributes
are not supported
            .... .... .... ...1 = Long Names Allowed: Long file names are
allowed in the response
        Process ID High: 0
        Signature: 0000000000000000
        Reserved: 0000
        Tree ID: 1  (\\SI0067\PARTAGES_DGO1$)
            [Path: \\SI0067\PARTAGES_DGO1$]
            [Mapped in: 12]
        Process ID: 0
        User ID: 1
        Multiplex ID: 1
    Trans2 Response (0x32)
        Subcommand: QUERY_PATH_INFO (0x0005)
        [Level of Interest: Info Standard (1)]
        [File Name: \SI0067\PARTAGES_DGO1$\hierarchique\prv-O1010100]
        Word Count (WCT): 0
        Byte Count (BCC): 0

As a result, the client (Canon) thinks the folder is non-existent and tries
to create it:

No.     Time            Source                Destination
Protocol Length Info
     17 14:51:52.216974 157.164.95.28         157.164.130.38        SMB
 164    Create Directory Request, Directory: \hierarchique\prv-O1010100

Frame 17: 164 bytes on wire (1312 bits), 164 bytes captured (1312 bits)
Ethernet II, Src: Cisco_ff:fd:90 (00:08:e3:ff:fd:90), Dst:
02:a0:98:3b:d5:49 (02:a0:98:3b:d5:49)
802.1Q Virtual LAN, PRI: 0, CFI: 0, ID: 220
Internet Protocol Version 4, Src: 157.164.95.28 (157.164.95.28), Dst:
157.164.130.38 (157.164.130.38)
Transmission Control Protocol, Src Port: 60466 (60466), Dst Port:
microsoft-ds (445), Seq: 2857033628, Ack: 1627879211, Len: 94
NetBIOS Session Service
SMB (Server Message Block Protocol)
    SMB Header
        Server Component: SMB
        [Response in: 18]
        SMB Command: Create Directory (0x00)
        Error Class: Success (0x00)
        Reserved: 00
        Error Code: No Error
        Flags: 0x00
            0... .... = Request/Response: Message is a request to the server
            .0.. .... = Notify: Notify client only on open
            ..0. .... = Oplocks: OpLock not requested/granted
            ...0 .... = Canonicalized Pathnames: Pathnames are not
canonicalized
            .... 0... = Case Sensitivity: Path names are case sensitive
            .... ..0. = Receive Buffer Posted: Receive buffer has not been
posted
            .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not
supported
        Flags2: 0x8000
            1... .... .... .... = Unicode Strings: Strings are Unicode
            .0.. .... .... .... = Error Code Type: Error codes are DOS
error codes
            ..0. .... .... .... = Execute-only Reads: Don't permit reads if
execute-only
            ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs
            .... 0... .... .... = Extended Security Negotiation: Extended
security negotiation is not supported
            .... .0.. .... .... = Reparse Path: The request does not use a
@GMT reparse path
            .... .... .0.. .... = Long Names Used: Path names in request
are not long file names
            .... .... ...0 .... = Security Signatures Required: Security
signatures are not required
            .... .... .... 0... = Compressed: Compression is not requested
            .... .... .... .0.. = Security Signatures: Security signatures
are not supported
            .... .... .... ..0. = Extended Attributes: Extended attributes
are not supported
            .... .... .... ...0 = Long Names Allowed: Long file names are
not allowed in the response
        Process ID High: 0
        Signature: 0000000000000000
        Reserved: 0000
        Tree ID: 1  (\\SI0067\PARTAGES_DGO1$)
            [Path: \\SI0067\PARTAGES_DGO1$]
            [Mapped in: 12]
        Process ID: 0
        User ID: 1
        Multiplex ID: 0
    Create Directory Request (0x00)
        Word Count (WCT): 0
        Byte Count (BCC): 55
        Buffer Format: ASCII (4)
        Directory: \hierarchique\prv-O1010100


But since it actually already exists, the NetApp refuses to do this:

No.     Time            Source                Destination
Protocol Length Info
     18 14:51:52.217361 157.164.130.38        157.164.95.28         SMB
 109    Create Directory Response, Error: File in operation already exists

Frame 18: 109 bytes on wire (872 bits), 109 bytes captured (872 bits)
Ethernet II, Src: 02:a0:98:3b:d5:49 (02:a0:98:3b:d5:49), Dst:
Cisco_ff:fd:90 (00:08:e3:ff:fd:90)
802.1Q Virtual LAN, PRI: 4, CFI: 0, ID: 220
Internet Protocol Version 4, Src: 157.164.130.38 (157.164.130.38), Dst:
157.164.95.28 (157.164.95.28)
Transmission Control Protocol, Src Port: microsoft-ds (445), Dst Port:
60466 (60466), Seq: 1627879211, Ack: 2857033722, Len: 39
NetBIOS Session Service
SMB (Server Message Block Protocol)
    SMB Header
        Server Component: SMB
        [Response to: 17]
        [Time from request: 0.000387000 seconds]
        SMB Command: Create Directory (0x00)
        Error Class: DOS Error (0x01)
        Reserved: 00
        Error Code: File in operation already exists
        Flags: 0x80
            1... .... = Request/Response: Message is a response to the
client/redirector
            .0.. .... = Notify: Notify client only on open
            ..0. .... = Oplocks: OpLock not requested/granted
            ...0 .... = Canonicalized Pathnames: Pathnames are not
canonicalized
            .... 0... = Case Sensitivity: Path names are case sensitive
            .... ..0. = Receive Buffer Posted: Receive buffer has not been
posted
            .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not
supported
        Flags2: 0x8000
            1... .... .... .... = Unicode Strings: Strings are Unicode
            .0.. .... .... .... = Error Code Type: Error codes are DOS
error codes
            ..0. .... .... .... = Execute-only Reads: Don't permit reads if
execute-only
            ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs
            .... 0... .... .... = Extended Security Negotiation: Extended
security negotiation is not supported
            .... .0.. .... .... = Reparse Path: The request does not use a
@GMT reparse path
            .... .... .0.. .... = Long Names Used: Path names in request
are not long file names
            .... .... ...0 .... = Security Signatures Required: Security
signatures are not required
            .... .... .... 0... = Compressed: Compression is not requested
            .... .... .... .0.. = Security Signatures: Security signatures
are not supported
            .... .... .... ..0. = Extended Attributes: Extended attributes
are not supported
            .... .... .... ...0 = Long Names Allowed: Long file names are
not allowed in the response
        Process ID High: 0
        Signature: 0000000000000000
        Reserved: 0000
        Tree ID: 1  (\\SI0067\PARTAGES_DGO1$)
            [Path: \\SI0067\PARTAGES_DGO1$]
            [Mapped in: 12]
        Process ID: 0
        User ID: 1
        Multiplex ID: 0
    Create Directory Response (0x00)
        [File Name: \hierarchique\prv-O1010100]
        Word Count (WCT): 0
        Byte Count (BCC): 0


My initial thoughts about this are that the path in the QUARY_PATH_INFO
request from the Canon scanner looks wrong:

        [File Name: \SI0067\PARTAGES_DGO1$\hierarchique\prv-O1010100]

It contains the UNC path in a somewhat mangled form, and I have compared
this to network traces from Microsoft CIFS clients, which simply use
"hierarchique\prv-O1010100" as the file name, as the Tree ID already refers
to the share they are connected to.

        Tree ID: 1  (\\SI0067\PARTAGES_DGO1$)
            [Path: \\SI0067\PARTAGES_DGO1$]
            [Mapped in: 12]

So my initial thought is that the Canon is not using a "normal" way of
querying the CIFS server, but since I know CIFS to be quite liberal in its
implementation and 7-mode NetApp and Clustered ONTAP systems up to and
including 8.2.3 have been working fine with these scanners I would like to
know who is not conforming to CIFS standards in this scenario.

I have put both network traces here in case more info is needed that I did
not provide in this email (note that there is a slight difference in the
Session Setup AndX Request between ONTAP 8.2.3/8.2.4 as 8.2.3 requires the
domain name to be present and 8.2.4 will perform passthrough authentication
to the domain the storage system's SVM is part of (this is a documented
change in behavior to bring Clustered ONTAP in line with old 7-mode
behavior)).

https://www.dropbox.com/sh/h9tm24uvfv76lci/AACEO33kJgwLpUPKYfEbTMaka?dl=0

Thanks in advance,
Filip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/cifs-protocol/attachments/20151203/5f76015f/attachment-0001.html>


More information about the cifs-protocol mailing list