CIFS or NFS?

I’m trying to decide which protocol to use. My QNX system is 6.1 on a
P166MMX. I need to mount several filesystems at different times from a
server that is running embedded XP. The files/directories are mounted at
startup and are there to provide various data to the QNX computer. The files
aren’t needed in any deterministic manner; they are usually just opened,
read/written, and saved when some data changes, not all that often, either.

I’m leaning towards CIFS because it’s included in the XP O/S. Are there any
drawbacks in using fs-cifs, as opposed to fs-nfs2? Any problems for the
client to re-connect automatically when the server shuts down and restarts?
I assume that can be done with the proper argument in the mount() function
call. Any known QNX bugs with either approach?

Thanks for any opinions on the subject.

Thanks,
David Kuechenmeister

I don’t know much about the internals of CIFS protocol, but it can be pain
to deal with practically. For one, you may have to include a cleartext
password into the mount command line, unless you want to type it in. Given
the state of security in QNX, you risk exposing it in an open environment.
Also older QNX versions had fs-cifs that suffered from the notorious M$
implementation of the TCP Nagle algorithm (resulted in horrible
performance). That should be fixed in later versions but I am not sure which
one…

If you’re concerned about efficiency and network utilization, you may want
to do some research on CIFS to compare protocol features against NFSv3 (the
latter can improve performance of network writes and directory lookups
significantly, by utilizing new READDIRPLUS and COMMIT features).

– igor

“David Kuechenmeister” <david.kuechenmeister@viasat.com> wrote in message
news:b5ns1g$nsa$1@inn.qnx.com

I’m trying to decide which protocol to use. My QNX system is 6.1 on a
P166MMX. I need to mount several filesystems at different times from a
server that is running embedded XP. The files/directories are mounted at
startup and are there to provide various data to the QNX computer. The
files
aren’t needed in any deterministic manner; they are usually just opened,
read/written, and saved when some data changes, not all that often,
either.

I’m leaning towards CIFS because it’s included in the XP O/S. Are there
any
drawbacks in using fs-cifs, as opposed to fs-nfs2? Any problems for the
client to re-connect automatically when the server shuts down and
restarts?
I assume that can be done with the proper argument in the mount() function
call. Any known QNX bugs with either approach?

Thanks for any opinions on the subject.

Thanks,
David Kuechenmeister

Hi David,

Recently I faced exactly the same dilemma. I tried both of them and got the following results. Though you must keep in mind that my intentions of using the FS could differ from yours. I got backup server on QNX 6.2 and wanted to allow anybody on the network have read/write access to ones home directory only under /home path. I don’t care about network utilization at all.

----------- NFS

pros:

  1. Native to QNX (UNIX)
  2. No need for 3rd party packages
  3. Easy to configure
  4. No need to remount after sever restart

cons:

  1. Not password protected (anybody can mount any directory)
  2. No native client for MS Win (once I tried some 3rd party client that killed my Win98 completely)
  3. Some problems with read/write/mkdir permissions from QNX 4 client

----------- CIFS

pros:

  1. Password protected (everybody can mount only the service, which password one knows)
  2. All access can be logged
  3. Easy mount from Win, QNX 4, QNX 6
  4. No need to remount after server restart

cons:

  1. Have to install 3rd party package
  2. Problem with owner and permissions while accessing from QNX 4 and 6 (see “File attributes in Samba” thread in qdn.public.qnxrtp.applications news group)


    Serge


I’m trying to decide which protocol to use. My QNX
system is 6.1 on a
P166MMX. I need to mount several filesystems at
different times from a
server that is running embedded XP. The
files/directories are mounted at
startup and are there to provide various data to the
QNX computer. The files
aren’t needed in any deterministic manner; they are
usually just opened,
read/written, and saved when some data changes, not
all that often, either.

I’m leaning towards CIFS because it’s included in the
XP O/S. Are there any
drawbacks in using fs-cifs, as opposed to fs-nfs2?
Any problems for the
client to re-connect automatically when the server
shuts down and restarts?
I assume that can be done with the proper argument in
the mount() function
call. Any known QNX bugs with either approach?

Thanks for any opinions on the subject.

Thanks,
David Kuechenmeister

Igor Kovalenko <kovalenko@attbi.com> wrote:

I don’t know much about the internals of CIFS protocol, but it can be pain
to deal with practically. For one, you may have to include a cleartext
password into the mount command line, unless you want to type it in. Given
the state of security in QNX, you risk exposing it in an open environment.
Also older QNX versions had fs-cifs that suffered from the notorious M$
implementation of the TCP Nagle algorithm (resulted in horrible
performance). That should be fixed in later versions but I am not sure which
one…

If you’re concerned about efficiency and network utilization, you may want
to do some research on CIFS to compare protocol features against NFSv3 (the
latter can improve performance of network writes and directory lookups
significantly, by utilizing new READDIRPLUS and COMMIT features).

– igor

Hi. Two questions.

  1. I was reading about this Nagle algorithm in another thread. It
    delays the transmission of a packet by up to 0.2 seconds in case it
    can piggy-back another packet to the same destination and thereby make
    more efficient use of the available bandwidth, right? (That actually
    isn’t my question.) I also read that it can now be disabled (good).
    My question is this: Is it IS disabled will the stack piggy-back
    packets when it is able to?

  2. This is a much broader question. If I have a company QNX network in
    city A and another company QNX network in city B, and cities A and B
    are only connected by the public internet, then, is there a secure
    way to do native IPC from hosts in city A to hosts in city B?

I’m assuming that I’d have to get into a messy scenario of GRE through
ip-filter.

I think you can use either nfs or cifs in your case, both can satisfy your
need, for example, both will automatically do reconnect when the server
restarts. The tcp_nodelay problem on fs-cifs has been fixed which I think is
included in 6.1patcha and later.

However, there do have something differences. As cifs is rooted from M$, you
may have some functions do not work in a way in the unix world. For example
you can not create a hard link over cifs. So if you prefer a posix-like work
place, I would think nfs is better as it happens to be posix-like. Another
example is through nfs you are autenticated by the server itself, while
through cifs depending the settings, the server may consult the domain
server to see if you are an allowed user.

Weijie

“David Kuechenmeister” <david.kuechenmeister@viasat.com> wrote in message
news:b5ns1g$nsa$1@inn.qnx.com

I’m trying to decide which protocol to use. My QNX system is 6.1 on a
P166MMX. I need to mount several filesystems at different times from a
server that is running embedded XP. The files/directories are mounted at
startup and are there to provide various data to the QNX computer. The
files
aren’t needed in any deterministic manner; they are usually just opened,
read/written, and saved when some data changes, not all that often,
either.

I’m leaning towards CIFS because it’s included in the XP O/S. Are there
any
drawbacks in using fs-cifs, as opposed to fs-nfs2? Any problems for the
client to re-connect automatically when the server shuts down and
restarts?
I assume that can be done with the proper argument in the mount() function
call. Any known QNX bugs with either approach?

Thanks for any opinions on the subject.

Thanks,
David Kuechenmeister