Adventure Time - Backing up an AS/400 Model 170 over NFS
Two years ago I picked up a vintage IBM AS/400 Model 170 — you know, just for fun.
Since then, my first goal has been to back the system up before messing around too much. And, as usual with this platform, things are never as simple as they look.
I’m preparing a full write-up on this adventure, but for now here’s the key point: my solution relies on an NFS server. And not just any NFS server — the system is from ~1998, so it only speaks NFSv2.
I spent a fair amount of time figuring all this out, so instead of keeping it buried inside some forgotten bash script in a private repo, I’m sharing it here.
Prerequisites
Most modern Linux distributions dropped NFSv2 support.
Fortunately, Debian 11 hits the sweet spot: old enough to support NFSv2, but new enough to run smoothly on modern hardware and virtualization.
I’m running it on Apple Silicon (M4 Pro) using UTM via the pre-configured image in their gallery, but you can just download the ISO from Debian and install anywhere you like.
Once the system is up, the steps are pretty simple — once you actually know them ;).
Installation and configuration
Install the required package:
sudo apt update
sudo apt install nfs-kernel-server
Enable NFSv2 in the service config:
sudo nano /etc/default/nfs-kernel-server
- RPCNFSDCOUNT=8
+ RPCNFSDCOUNT="--nfs-version 2 8"
Restart the service:
sudo systemctl restart nfs-kernel-server
Verify that NFSv2 is active:
sudo cat /proc/fs/nfsd/versions
should return something like:
+2 +3 +4 +4.1 +4.2
and
sudo rpcinfo -p | grep nfs
should produce something like
[...]
100003 2 udp 2049 nfs
[...]
Creating the export
Create a directory to share:
mkdir -p /srv/nfs/shared
Edit the exports file (assuming 192.168.177.50 is your AS/400 IP):
sudo nano /etc/exports
+ /srv/nfs/shared 192.168.177.50(rw,sync,no_subtree_check,insecure,no_root_squash)
Reload exports:
sudo exportfs -ra
Check your export:
sudo exportfs -v
And that’s it — you now have a working NFS server exposing /srv/nfs/shared to 192.168.177.50 with full NFSv2 support.
Happy retro-computing!