Please put bug reports on the bug tracker under https://dev.haiku-os.org
Okay, but is it a bug? I don’t want to fill your tracker with bogus entries. Maybe i just configured something erroneously or something.
even if you misconfigure something, generall system error is too unspecific to figure out (as a user) what went wrong, so this can likely be improved anyhow.
If it is a user error the ticket can just be closed, which is fine too, but bug reports on the forum usually tend to get lost.
I don’t usually use the mount_nfs
command. Maybe you should try NFS4 with the regular mount command, like mount -t nfs4 server:/share /mntpnt
I always get a “no such file or directory” message when I try mount. And I never know what it’s talking about because the directories (remote and local) do, in fact, exist.
I never got NFS mount to work, no matter if v3, v4 and whatever server. NFS just doesn’t work under Haiku. Gave up on it.
I tried to
mount -t nfs4 192.168.10.100:/root /mnt/nfs
and all i got is
mount: No such file or directory
Exactly as it happened to MrEntropy. I tried to use -t nfs3
too.
mount_nfs is for nfs v2. mount -t nfs4 is what you want, however it has a few bugs still.
Also check https://www.haiku-os.org/blog/paweł_dziepak/2013-03-15_nfsv4_client_finally_merged/
So, the correct method was to use the -p
flag.
mount -t nfs4 -p 192.168.10.100:/root /mnt/nfs
That worked and the NFS device has been mounted. This is why i did not wanted to create a bug ticket.
However, it is really buggy. It can create and delete files, but i delete a file from the other side and then try to echo into it, then it crashes the entire system: http://oscomp.hu/depot/haiku_kernel_panic.png
Check if it has been already reported https://dev.haiku-os.org/query?status=!closed&component=File+Systems%2FNFS4
Does not seem so. I’ve changed the bugreport, except for the title. By the way, thank you for the manual page, that helped.
I tried the command with the -p
flag, as
mount -t nfs4 -p 192.168.1.253:/partilha_casa /boot/home/Desktop/partilha_casa/
but get mount: Invalid Argument
Is there anything missing after the -p
that should be there?
I don’t see any missing part…
Try putting quotes around the -p
value: -p "192.168.1.253:/partilha_casa"
Below are the scripts that I use to access to my NFS. Edit the MOUNT_POINT
, NFS_SERVER
, and NFS_PATH
to suit your needs. Hope it helps.
nfs_connect
#!/bin/bash
MOUNT_POINT="/boot/home/Desktop/NFS"
NFS_SERVER="0.0.0.0"
NFS_PATH="/path/on/server"
NFS="$NFS_SERVER:$NFS_PATH"
if [ ! -d "$MOUNT_POINT" ]
then
mkdir "$MOUNT_POINT"
else
unmount "$MOUNT_POINT" 2> /dev/null
fi
mount -t nfs4 -p "$NFS" "$MOUNT_POINT"
open $MOUNT_POINT
exit
nfs_disconnect
#!/bin/bash
MOUNT_POINT="/boot/home/Desktop/NFS"
unmount "$MOUNT_POINT"
if [ -d "$MOUNT_POINT" ]
then
rm -rf "$MOUNT_POINT"
fi
exit
The command
mount_nfs 192.168.0.10:Music /boot/home/nfs_music 500 1000
works for my NAS.
It would be nice to use the command
mount -ro -t nfs4 -p “192.168.0.10:/Music” /boot/home/nfs_music
to use the read-only option. But I receive the “Invalid Argument” Error too.
~> mount -ro -t nfs4 -p “192.168.0.10:/Music” /boot/home/nfs_music
mount: Invalid Argument
Any ideas which argument is invalid?
Ugh, I hate errors like that…we might do that a bit too often in our command-line tools.
I think all your command-line arguments are supported but this error comes up when the actual fs_mount_volume
is called. One nice thing about Haiku is that it isn’t too hard to find the source for things:
https://git.haiku-os.org/haiku/tree/src/bin/mount.c#n95
I don’t personally know a lot about this function but I would suspect that it either doesn’t like nfs4
as the file system type or it doesn’t like the parameters “192.168.0.10:/Music”
. You aren’t actually using smart quotes in the command are you?
I don’t see a bug related to this but NFS4 does seem to cause a lot of KDLs
I do not have a system to test this right now, but does that mount version supports the “-ro” command written that way ?
At work, all the *nix and linuxes seem to require “-o ro” , so much that it has become something on auto-pilot to type mount -o ro -t ntfs …
You should check /var/log/syslog for messages. The nfs4 addon does log some things there. I have no problem mounting shares as read-only using the same syntax you have used.
THANKS Lrrr and leavengood. The code and the entries in /var/log/syslog leaded to the solution
/var/log> tail -n5 syslog
KERN: nfs4: Error not B_OK or empty stream!
KERN: nfs4: Decode Error!
KERN: Last message repeated 2 times.
KERN: nfs4: nfs4_mount()Error mounting filesystem: Invalid Argument
The arguments looked OK and as you use the exact same syntax I checked that on another NAS in the network. It works!
Shame on me! The mistake was that the NAS protocol on the old NAS was set to NFS2/NFS3 but NFS4 was disbaled. PEBKAC!