2002-01-17 16:48:23

by Christoph Pittracher

[permalink] [raw]
Subject: ncpfs input/output error

Hello!
I've a problem with writing to a netware volume from a linux client.
The server is a novell netware 4. Mounting the netware volume and
reading data from the server works without problems. But if i want to
write a file to the server that is bigger than 128kb I get an I/O-error
(sometimes it's possible to write a file with more than 128kb but then
the I/O-error occurs at 256kb, or 283kb sometimes after storing 192kb
of the data).

workstation:~$ mount
/dev/hda2 on / type ext2 (rw,errors=remount-ro,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
FST01/NETWARE.USER on /home/netware-user type ncpfs (rw)
workstation:~$

The netware volume is mounted to /home/netware-user (with
uid=netware-user and gid=netware, a local linux user).

workstation:~$ cp /home/wk/linux-2.4.17.tar.bz2 /home/netware-user
cp: writing `./linux-2.4.17.tar.bz2': Input/output error
workstation:~$

Now have a look at the file size on the server:

workstation:~$ ls -al /home/netware-user/linux-2.4.17.tar.bz2
-rwxr-xr-x 1 netware- netware 262144 Jan 17 15:00
linux-2.4.17.tar.bz2
workstation:~$

strace output of the cp command:
workstation:~$ strace cp /home/wk/linux-2.4.17.tar.bz2
/home/netware-user
[...]
read(3, "i1L@a\216\27\212Dva\200\344\'.O\306\331\257\232;\367\375"...,
512)
= 512
write(4, "i1L@a\216\27\212Dva\200\344\'.O\306\331\257\232;\367\375"...,
512)
= 512
read(3, "\337\375\337\341\273\257\344\n\264\0302%\231\337\233\261"...,
512)
= 512
write(4, "\337\375\337\341\273\257\344\n\264\0302%\231\337\233\261"...,
512)
= -1 EIO (Input/output error)
[...]

I don't know why this write fails...
Any hints?

Some version information:
workstation:~$ ncpmount -v
ncpfs version 2.2.0.18
workstation:~$

workstation:~$ uname -r
2.4.17
workstation:~$

NCPFS specific kernel configurations:
CONFIG_NCP_FS=y
CONFIG_NCPFS_OS2_NS=y
CONFIG_NCPFS_NLS=y
CONFIG_NCPFS_EXTRAS=y

Please tell me if you need any additional information.

Thanks,
Christoph


2002-01-17 17:18:05

by Petr Vandrovec

[permalink] [raw]
Subject: Re: ncpfs input/output error

On 17 Jan 02 at 17:48, Christoph Pittracher wrote:
>
> read(3, "\337\375\337\341\273\257\344\n\264\0302%\231\337\233\261"...,
> 512)
> = 512
> write(4, "\337\375\337\341\273\257\344\n\264\0302%\231\337\233\261"...,
> 512)
> = -1 EIO (Input/output error)
> [...]
>
> I don't know why this write fails...
> Any hints?

You should see some complaints in kernel log, or, maybe, on server's
console. In kernel log you should see some 'NCP server not responding' or
'ncp_rpc_call: recv error = NN'. Or maybe you are getting 'An NCP request
with an invalid security signature was received from user <you> at
<your address>. Possible intruder or network corruption.'

You also must not send SIGKILL to processes which are in the middle of
NCP transaction. Because of ncpfs does not use its own thread (or bh)
to implement NCP ping-pong protocol, connection becomes invalid after
such action, as ping-pong was not successfully completed.

Are you sure that you do not have directory restriction
on your directory, and that you are not running some ipxripd which
could remove route to server from your routing tables?
Best regards,
Petr Vandrovec
[email protected]

P.S.: It is possible to create 2GB file full of data on ncpfs with 2.4.17,
or 4GB file with few patches here...