owaizshareef
Posts: 14
Joined: Wed Apr 06, 2016 1:33 pm

Mounting drives [rpcbind]

Sat May 21, 2016 8:16 pm

hi,

i am building a cluster of pi's,

i am using "sudo service rpcbind start" and "sudo update-rc.d rpcbind enable" , to set mount drives and auto update on reboot. but this commands are not working.
the tutorial i am following is for prior version of rpi-2 i believe.

epoch1970
Posts: 4145
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Mounting drives [rpcbind]

Sun May 22, 2016 11:05 am

Nobody uses NFS these days it seems :)

I just had to install nfs-kernel-server on a Pi 3 and got into the issue where mounts from remote hosts fail until you've restarted nfs-common (and perhaps nfs-kernel-server ?) meaning there is a freaking boot order problem in systemd.

Turns out that 2 years ago a nice guy had it all sorted out but his solution is still not applied to standard installs.
The mailing-list post is spot-on except for the temporary files business "Created my own /etc/tmpfiles.d/rpcbind.conf"; This dir doesn't exist on my Pi. I disregarded this part and it seems to work perfectly fine.

If you want to stay on this forum, this is what I just tried:
1) Boot (raspbian-lite, current) and try to mount an export from another host: no joy.
2) On the Pi, add:
2.a) /etc/systemd/system/nfs-common.services

Code: Select all

[Unit]
Description=NFS Common daemons
Wants=remote-fs-pre.target
DefaultDependencies=no

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/etc/init.d/nfs-common start
ExecStop=/etc/init.d/nfs-common stop

[Install]
WantedBy=sysinit.target
2.b) /etc/systemd/system/rpcbind.service

Code: Select all

[Unit]
Description=RPC bind portmap service
After=systemd-tmpfiles-setup.service
Wants=remote-fs-pre.target
Before=remote-fs-pre.target
DefaultDependencies=no

[Service]
ExecStart=/sbin/rpcbind -f -w
KillMode=process
Restart=on-failure

[Install]
WantedBy=sysinit.target
Alias=portmap
3) Run "systemctl enable nfs-common" and "systemctl enable rpcbind"
4) Reboot and try to mount an export from another host: works.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

broe23
Posts: 903
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Mounting drives [rpcbind]

Sun May 22, 2016 4:46 pm

You have to only have the Boot Loader on the SD card, and the OS on the USB pocket drive. It will never work with just using thr SD card.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

Return to “Troubleshooting”