1

I have a drive mounted at /home/ftpuser/uploads, and the /home/ftpuser folder is also exported via NFS. FTP uploads to the uploads folder work as intended. If I unmount the drive, the files disappear, then reappear when I mount the drive.

On another client, I do a cp file /nfsmnt/uploads/subdir (where /nfsmnt is the local mount point and /home/ftpuser is exported on the server.) and it copies to the NFS server. The problem is that NFS copies to the server copy to the mount point on the server, instead of to the drive mounted at the mount point. The files uploaded from FTP are there, but I can't see the NFS copied files until I unmount the drive.

Am I missing some server-side option(s)?

EDIT UPDATE: User proposed something I had suspected, that NFS server was starting before the secondary disk was mounted and this was causing files to be copied to the mount point instead of the mounted disk. nfs-kernel-server is started pretty early. I looked through some of the scripts in /etc/rc5.d and didn't see any reference to mounting disks. rc5.d startup scripts

  • 1
    Is it possible that the /home/ftpuser/uploads mount is done after starting NFSd? – Julie Pelletier May 11 '16 at 0:51
  • That's what I was thinking, but if the mount point isn't empty. I could swear you had to supply an explicit option to make a FS mount to a non-empty directory. I'm doing some testing now with loop devices and they can be mounted to a non-empty location. I'll try with NFS disabled on startup. It didn't work if I stopped NFS, then started. – user208145 May 11 '16 at 3:10
  • That's not promising then. – Julie Pelletier May 11 '16 at 3:24
  • Theoretically, I could reorder the startup scripts in /etc/rc5.d to start NFS later. I could potentially brick my machine though. I'll edit the question to pose this. – user208145 May 11 '16 at 5:04
  • Normally these startup scripts are run in alphabetical order to allow easy order change. – Julie Pelletier May 11 '16 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.