Sunday, October 25, 2020

ULTRIX 4.00 problems writing to devices hosted on a Linux NFS server

When the VAX ULTRIX 4.00 Rev. 158 /usr/diskless/genvmunix kernel does a non-appending write to a device, like "echo foo > /dev/console", that fails if the device is located on a x86_64 Ubuntu 20.10 Linux 5.8.0-25-generic NFS server.

ULTRIX seems to be at fault. It sends an NFS V2 SETATTR call setting the length of that device file (eg. /dev/console) to zero, and that fails. This behaviour was observed after netbooting ULTRIX, on the root NFS file system, and is a problem for running netbooted ULTRIX. Even if I mount another NFS file system read-only, ULTRIX still sends the SETATTR there. Surely it shouldn't be trying to change things on a file system that's mounted read-only! 

Use of SETATTR to truncate a file is standard behaviour when overwriting a file, like "echo foo > bar". In that case it works fine on a writable file system. Also, ULTRIX doesn't make attempts to change ordinary files on read-only mounted NFS file systems.

Appending to devices, like "echo foo >> /dev/console" works properly, both on writable and read-only file systems. 

No comments: