Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "mount.nfs: an incorrect mount option was specified" on Ubuntu 22.04 Jammy when nfs_udp is true #12758

Closed
richard-to opened this issue May 4, 2022 · 3 comments

Comments

@richard-to
Copy link

richard-to commented May 4, 2022

Vagrant version

Vagrant 2.2.19

Host operating system

MacOS Monterey 12.3.1

Guest operating system

I'm using this box: ubuntu/jammy64

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "ubuntu/jammy64"

  config.vm.network "private_network", ip: "172.31.1.10"
  config.ssh.forward_agent = true

  config.vm.synced_folder ".", "/vagrant", type: "nfs"

  config.vm.provider "virtualbox" do |vb, override|
    vb.memory = 3072
  end

end

Please ensure the Vagrantfile provided is a minimal Vagrantfile which contains
only the required configuration to reproduce the behavior. Please note that if
your Vagrantfile contains an excess of configuration unrelated the the reported
issue, or is in a different format, we may be unable to assist with your issue.
Always start with a minimal Vagrantfile and include only the relevant configuration
to reproduce the reported behavior.

Debug output

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 172.31.1.1:/Users/richard/Projects/my-repo /vagrant

Stdout from the command:



Stderr from the command:

mount.nfs: an incorrect mount option was specified

Expected behavior

The volume should have been mounted

Actual behavior

I got the error message: mount.nfs: an incorrect mount option was specified

Steps to reproduce

  1. vagrant up

Notes

It works if I change the command to:

config.vm.synced_folder ".", "/vagrant", type: "nfs",  nfs_udp: false

So seems like the mount option changed for udp in Jammy?

@lucaskanashiro
Copy link

This is expected in Ubuntu 22.04, take a look at the section "UDP disabled for NFS mounts" in the release notes:

https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668

@richard-to
Copy link
Author

Ah thanks for pointing that out @lucaskanashiro. That's good to know. I also missed the Notes section in the vagrant docs about NFS v4: https://www.vagrantup.com/docs/synced-folders/nfs#other-notes

Closing this issue.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants