Network Shares (NFS)
The Network (NFS) device (nfs:) opens NFS exports on a Linux or BSD server or a NAS, over NFSv4.0. NFS shares are saved with the SMB shares, at the end of LAUNCHSTATION.CNF, and edited in the same place. Not yet tested on a console.
- A console with a network adapter (or built-in Ethernet) on the same LAN as the server.
- An export on the server that lets the PS2 in, with NFSv4.0 enabled (on Linux,
cat /proc/fs/nfsd/versionslists+4without-4.0). - An IP address for the PS2 (Settings > Network), and Legacy Ethernet drivers off.
- At least one NFS share, added in Settings > Network > NFS shares (or as text, below).
How it works
Network (NFS) is listed in Files once an NFS share is saved. Nothing touches the network until you open it. The first time, Launchstation starts the network with the address in IPCONFIG.DAT, loads the NFS driver and connects every saved NFS share. nfs:/ then lists one folder per connected share, named by its NAME: nfs:/LINUX, nfs:/NAS.
The driver speaks NFSv4.0 on TCP port 2049: it needs no portmapper and no MOUNT protocol, and reaches the export from the server’s root, as mount -t nfs4 does. It connects from a port below 1024, so the export does not need the insecure option. A share that does not connect is left out of nfs:/ and the browser says why; opening the device again tries it again, at most every 30 seconds.
The PS2 sends the user and group IDs of the share (0 when not set) as AUTH_SYS credentials. With the usual root_squash, 0 is the server’s anonymous user, so files must be readable by everyone, and a folder writable by everyone to copy into it. Set the IDs of a server account instead to read and write as that account.
A connection the server closes, or that drops, is connected again on the next use, and open files and folders carry on: NFS keeps no state for them on the server.
Where shares are saved
An NFS share is a block among the SMB shares, after the # SMB shares line at the end of LAUNCHSTATION.CNF (see SMB shares). The URL’s scheme makes it an NFS share. It has two keys:
| Key | Value | Longest (bytes) |
|---|---|---|
NAME | The share’s folder name in nfs:/. Required, unique among all shares (in any case), no / \ : * ? " < > | | 31 |
URL | nfs://<IP address>[:<port>]/<export path>[?uid=N&gid=N]; the port is 2049 when left out, and the IDs are 0 | 255 |
USERNAME,PASSWORD,PLAINTEXTandVERSION = 1do not apply: an NFS share with one of them is refused, and the browser says so.- Use the server’s IP address: the driver has no DNS.
- The export path is the path the server exports, from its root:
/srv/ps2for/srv/ps2 192.168.1.0/24(rw)in/etc/exports. A path below the export opens there. - Up to 8 shares are read, SMB and NFS together.
# /srv/ps2 on a Linux box, as nfs:/LINUX, reading and writing as uid/gid 1000
NAME = LINUX
URL = nfs://192.168.1.100:2049/srv/ps2?uid=1000&gid=1000
# The games folder of a NAS export, as nfs:/NAS, as the anonymous user
NAME = NAS
URL = nfs://192.168.1.20/volume1/ps2/games
What you can do
- Browse, copy, rename, make and delete folders inside a share. File dates and attributes are not set on the server. Rename works inside one share, and replaces a file of the new name.
- Nothing can be made in
nfs:/itself: it only lists the connected shares. - Launch an ELF from a share. Not yet tested.
- PS2 ISO games through Neutrino are not supported from
nfs:yet: Neutrino needs an NFS backing store first.
Stack rules
- NFS uses the same Ethernet stack as SMB, FTP, PS2Link and Google Drive, so they can be used together. UDPFS uses a different one: opening NFS after UDPFS (or the other way) resets the IOP, and copying between
udpfs:andnfs:is refused. - NFS uses DEV9: it does not start while PC CARD CF owns the bus, and copying between NFS and PC CARD CF is refused.
- NFS needs the current Ethernet drivers. With Legacy Ethernet drivers on, the device says so and does not start.
Troubleshooting
- No Network (NFS) in Files. It is listed once an NFS share is saved: add one in Settings > Network > NFS shares.
- “Server did not answer on the NFS port”. Check the server’s IP address, that the NFS server runs, and that a firewall lets TCP 2049 in (firewalld:
firewall-cmd --add-service=nfs). - “Server does not answer NFSv4.0”. The server has NFSv4.0 turned off (some distributions now ship with 4.1 and 4.2 only); turn 4.0 on in its NFS configuration. The Windows NFS server does not offer 4.0.
- “No such export on the server”. The export path is not exported: check
/etc/exports(exportfs -v). - “The export refused this PS2”. The PS2’s address is not in the export’s client list.
- Files are listed but cannot be read or written. The IDs the PS2 sends do not have the rights: set the share’s User ID and Group ID to those of the files’ owner, or make the files readable (and a folder writable) by everyone.
The nfs: device uses Ronnie Sahlberg’s unfs4, a minimal NFSv4.0 client and the sibling of the usmb2 SMB client. See Credits.