Rclone mount exported to NFS - new files don't show up

What is the problem you are having with rclone?

So i am mounting as400 folder on my rclone server with mount command bellow (as service).
This folder is then exported as NFS for AiX server.
I am mounting this folder then as NFS on aix server.
Problem is that new files on as400 shows on rclone server but on AiX only folders are shown. New files are missing.
This happens few minutes after i start service (or restart server).
It helps then if I restart service but same happens in few minutes again.
It helps for few minutes also if i manually remount NFS on AiX, but again only for few minutes.

I have tried adding ls command (to keep folder refreshed every 5 minutes) for that folder in cron but it didn’t help.

Any suggestion would be nice because I don’t know what to do anymore :slight_smile:
I had similar system running on centos 7 with sshfuse package (but since it is deprecated our security team is pushing to get rid of it).

I have changed my logs to DEBUG so i can provide that later.

Run the command 'rclone version' and share the full output of the command.

rclone v1.71.0
- os/version: rocky 9.6 (64 bit)
- os/kernel: 5.14.0-570.58.1.el9_6.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.24.6 (Red Hat 1.24.6-1.el9_6)
- go/linking: dynamic
- go/tags: none

The command you were trying to run (eg rclone copy /tmp remote:tmp)

<!--
[Unit]
Description=Mount for as400
After=network-online.target nfs-server.service rpcbind.service
Wants=network-online.target

[Service]
Type=simple

ExecStart=/usr/bin/rclone mount as400:/FOLDER1/folder /NFSMOUNT \
  --allow-other \
  --vfs-cache-mode writes \
  --dir-cache-time 15s \
  --cache-info-age 30s \
  --buffer-size 16M \
  --transfers 4 \
  --multi-thread-streams=1 \
  --multi-thread-cutoff=10M \
  --vfs-read-chunk-size=64M \
  --vfs-read-chunk-size-limit=512M \
  --retries=10 \
  --low-level-retries=20 \
  --log-level INFO --log-file "/var/log/rclone-mount.log" \
  --config "/root/.config/rclone/rclone.conf"



ExecStartPost=/bin/bash -c "while ! mountpoint -q /NFSMOUNT; do sleep 1; done"

ExecStartPost=/bin/systemctl restart nfs-server rpcbind


ExecStartPost=/bin/sleep 10
ExecStartPost=/usr/bin/sshpass -p '********' ssh -o StrictHostKeyChecking=no root@Aix_server "[ -d /MOUNT ] && mount | grep '/MOUNT ' && umount -f /MOUNT || echo 'Not mounted, skipping unmount'"
ExecStartPost=/usr/bin/sshpass -p '********' ssh -o StrictHostKeyChecking=no root@Aix_server "mount -o rw,hard,intr RCLONE_SERVER:/NFSMOUNT /MOUNT"

ExecStop=/bin/umount -f NFSMOUNT || /bin/umount -l /NFSMOUNT

Restart=always
RestartSec=10
TimeoutStopSec=30

User=root
Group=root

[Install]
WantedBy=multi-user.target
--!>

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[as400]
type = sftp
host = XXX
user = XXX
pass = XXX
shell_type = unix
md5sum_command = none
sha1sum_command = none
### Double check the config for sensitive info before posting publicly

Exports file on rclone server

/NFSMOUNT AIX_SERVER_IP(insecure,rw,sync,no_all_squash,no_subtree_check,fsid=24)

NFS mount command on AiX (if i run manually, but in my case this is done via sshpass in srevice)

mount -o rw,hard,intr RCLONE_SERVER:/NFSMOUNT /MOUNT

Welcome to the forum!

After a bit of chatGPT and doc reading, I have a stab in the dark for you XD

Have you tried changing the AIX mount settings so that “actimeo=0”

This should mean AIX always re-fetches the fresh directory listing from the NFS server

I tried that → mount -o rw,hard,intr,actimeo=1

but problem persist unfortunately.

You could try rclone serve nfs instead of mounting and exporting which might give a different result?

I have tried that
I stopped the mount service and started the serve nfs command

rclone serve nfs as400:/FOLDER/SUBfolder --addr 0.0.0.0:2048 --vfs-cache-mode full --nfs-cache-type disk

On AiX i then tried multiple combinations of mount commands but no luck. On all combinations I get

mount -v nfs -o port=2048,mountport=2048,proto=tcp X.X.X.X:/ /NFSMOUNT

mount: 1831-010 server x.x.x.x not responding: RPC: 1832-019 Program not registered
mount: retrying

looks like aix needs portmapper rpc service on other side. (there is no firewall, telnet goes trough on this port)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.