Hello,
I'm trying to mount a nfs share within a photos os 3 image but it fails; i took the plain photonos:3.0 image, installed the nfs-utils using "tdnf install -y nfs-utils" but a plain "mount -t nfs foo.bar.com:/ISO /mnt/target" fails with " Invalid argument". A "showmount -e foo.bar.com" gives "clnt_create: RPC: Unknown host"
The same mount
works fine.
Any ideas?
regards,
Fabrizio
Hi,
Here a sample code snippet which might help.
# distro-sync and prerequisites
if [ `cat /etc/yum.repos.d/photon.repo | grep -o "packages.vmware.com/photon" | wc -l` -eq 0 ]; then
cd /etc/yum.repos.d/
sed -i 's/dl.bintray.com\/vmware/packages.vmware.com\/photon\/$releasever/g' photon.repo photon-updates.repo photon-extras.repo photon-debuginfo.repo
fi
tdnf distro-sync -y
# nfs utils
tdnf install -y nfs-utils
iptables -A INPUT -i eth0 -p tcp --dport 111 -j ACCEPT
iptables -A INPUT -i eth0 -p udp --dport 111 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 2049 -j ACCEPT
iptables -A INPUT -i eth0 -p udp --dport 2049 -j ACCEPT
systemctl enable rpcbind
systemctl start rpcbind
# reboot
systemctl enable rpc-statd
systemctl start rpc-statd
systemctl enable nfs-mountd
systemctl start nfs-mountd
# Only for nfs4
systemctl enable nfs-idmapd
systemctl start nfs-idmapd
systemctl restart nfs-client
# list nfs related daemons
systemctl list-unit-files | grep nfs
# example nfs file share on Azure
mkdir -p /mount/nfs3123/nfs
mount -t nfs nfs3123.file.core.windows.net:/nfs3123/nfs /mount/nfs3123/nfs -o vers=4,minorversion=1,sec=sys
Ciao,
I'm running a photon os 3 container, so it doesn't have systemd running, anyway
/usr/sbin/rpcbind -w
/usr/sbin/rpc.statd
/usr/sbin/mount.nfs goanas01.costa.it:/ISO /mnt/goanas01/
3. oddly a "mount -t nfs ..." fails with "Invalid argument"
regards,
Fabrizio
So, as mount.nfs works what do you mean with oddly? any journal logs ?
Ciao,
I always thought that "mount.nfs .." and "mount -t nfs .." was the same.
Now I have to understand why the same mount works in photos image and fails in powercli image (which looks based on photon).
regards,
Fabrizio
Nice finding Fabrizio !
mount
mount.nfs
Now I have to understand why the same mount works in photos image and fails in powercli image (which looks based on photon).
You might check the behavior of the PowerCLI docker container after replacing FROM photon:3.0 with FROM photon:4.0 , as 4.0 includes newer command versions. From a Photon OS package builder perspective, they haven't been backported to 3.0. Including newer versions always means testing, testing, testing, and backporting the same again.
Hope this helps, Daniel
Ciao!
I have to mount a nas share, fortunately it offers nfs and cifs both, so I'll use cifs initially. Then (so never..) I'll try to understand what's going wrong with the nfs client.
regards,
Fabrizio