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

Unable to mount NFS #40

Closed
poxin13 opened this issue Dec 25, 2020 · 13 comments
Closed

Unable to mount NFS #40

poxin13 opened this issue Dec 25, 2020 · 13 comments
Labels
enhancement New feature or request

Comments

@poxin13
Copy link

poxin13 commented Dec 25, 2020

BurmillaOS Version: (ros os version)
v1.9.0

Where are you running BurmillaOS? (docker-machine, AWS, GCE, baremetal, etc.)
Proxmox KVM

Which console you use (default, ubuntu, centos, etc..)
default

Do you use some service(s) which are not enabled by default?
enabled qemu-guest-agent
enabled volume-nfs

Please share copy of your cloud-init (remember remove all sensitive data first)

hostname: burmilla-docker
mounts:
- - 192.168.1.10:/mnt/zfs-spin-storage
  - /mnt/zfs-spin-storage
  - nfs4
  - ""
rancher:
  console: default
  environment:
    EXTRA_CMDLINE: /init
  network:
    dns:
      nameservers:
      - 192.168.1.1
    interfaces:
      eth0:
        address: 192.168.1.15/24
        dhcp: false
        gateway: 192.168.1.1
  services_include:
    qemu-guest-agent: true
    volume-nfs: true
  state:
    dev: LABEL=RANCHER_STATE
    wait: true
  upgrade:
    url: https://raw.githubusercontent.com/burmilla/releases/v1.9.x/releases.yml
$ system-docker logs console

FINISHED: /sbin/agetty --noclear tty4 linuxtime="2020-12-25T03:11:06Z" level=error msg="Networking not available to load resource"

time="2020-12-25T03:11:06Z" level=error msg="Networking not available to load resource"

mount: /mnt/zfs-spin-storage: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.

time="2020-12-25T03:11:06Z" level=error msg="Failed to mount /mnt/zfs-spin-storage: exit status 32"

[            ] respawn:info: respawn BurmillaOS
built: '2020-12-14T03:55:31Z', v1.9.0
respawn BurmillaOS

Mount has no problem on a standard ubuntu server. Haven't been able to figure this out.

Should I be able to mount this directly from console? Looks like the same error.

rancher@burmilla-docker:/mnt$ sudo mount -t nfs4 -vvvvvv 192.168.1.10:/mnt/zfs-spin-storage /mnt/zfs-spin-storage
mount: /mnt/zfs-spin-storage: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program
@poxin13
Copy link
Author

poxin13 commented Dec 25, 2020

I installed nfs-common on the console and seemed to work after that. Was able to mount manually and via mounts in cloud config.

@poxin13 poxin13 closed this as completed Dec 25, 2020
@olljanat
Copy link
Member

Hmm. We should not require install to console. Will reopen and investigate this later.

@olljanat olljanat reopened this Dec 25, 2020
@olljanat olljanat added bug Something isn't working version/v1.9.x labels Dec 25, 2020
@olljanat olljanat added this to the v1.9.1 milestone Dec 25, 2020
@olljanat olljanat added the documentation Improvements or additions to documentation label Jan 4, 2021
@olljanat
Copy link
Member

olljanat commented Jan 4, 2021

Looks that we need also update documentation. Purpose of volume-nfs service (and volume-cifs) is provide NFS/CIFS support for containers with https://github.com/ContainX/docker-volume-netshare

Mounts to console needs nfs-common / cifs-utils to be installed to console.

@olljanat olljanat removed this from the v1.9.1 milestone Jan 7, 2021
@olljanat olljanat removed the bug Something isn't working label Jan 7, 2021
@msn62
Copy link

msn62 commented Jan 22, 2021

Mounting a nfs volume is something a lot of users struggled with in Rancheros, including myself.
Finally i found a solution that I would like to share.

WAIT until the network is up during the initiation phase.

This can be accomplished in two ways by editing the file: /var/lib/rancher/conf/cloud-config.d

rancher:
#do a dummy call to a datasource to initiate the network
cloud_init:
datasources:
- url:http://somefile
#or wait until dhcp lease is done
network:
interfaces:
eth1:
dhcp_timeout: 0
dhcp: true
#enable nfs service in systemdocker
service_include:
volume-nfs: true

Both options, initiating the network by a dummy call or wait until a dhcp address is assigned (dhcp_timeout: 0) worked in my case.

Hope this helps somebody. Iam quite a Linux noob btw.

@olljanat
Copy link
Member

Mounting a nfs volume is something a lot of users struggled with in Rancheros, including myself.
Finally i found a solution that I would like to share.

WAIT until the network is up during the initiation phase.

Thanks this was useful tip. I guess that we can include some wait network logic to volume-nfs container https://github.com/burmilla/os-services/blob/v1.9.0/images/20-volumenetshare/Dockerfile

@alesnav
Copy link

alesnav commented Jan 4, 2022

After upgrading from RancherOS console version to BurmillaOS console version (that was my fault when I did the upgrade...) I cannot longer use NFS mount on nodes.

I see this comment at the beggining, but I don't know how to install nfs-common package, can you explain that?

I installed nfs-common on the console and seemed to work after that. Was able to mount manually and via mounts in cloud config.

Thanks!!

EDIT: Ok, it's so simple... It's enough to perform an apt-get update && apt-get install nfs-common. Will nfs-common be included in default BurmillaOS console?

@olljanat
Copy link
Member

olljanat commented Jan 4, 2022

Will nfs-common be included in default BurmillaOS console?

Good question. Based on https://packages.debian.org/buster/nfs-common it looks to be quite small and there is already couple of persons who need it so maybe it would be easiest include lt as part of next update.

@alesnav
Copy link

alesnav commented Jan 4, 2022

It requires some other dependencies and I saw a 26,2 MB installation space in total, so it is not as small as it looks like, but I vote for its addition anyway.

@priceaj
Copy link

priceaj commented Feb 17, 2023

I've just had the same issue, migrated from RancherOS yesterday (as the existing RancherOS docker version didn't support Ubuntu Jammy images as per https://docs.linuxserver.io/faq#jammy ). The upgrade was seamless btw so thanks for that!!

NFS mounts seemed to work fine until I reset the default console via

sudo ros console switch default

as per everyone else the way I had previously gotten NFS to work on RancherOS was as follows in my config:

mounts:
- - nasbox.local:/Folder
  - /NAS
  - nfs4
  - ""

services_include:
    volume-nfs: true

Worked around as above by Installing nfs-common via

EDIT: Ok, it's so simple... It's enough to perform an apt-get update && apt-get install nfs-common. Will nfs-common be included in default BurmillaOS console?

I assume that this will need to be done every-time the console is reset (i.e. every upgrade)?

@olljanat
Copy link
Member

I assume that this will need to be done every-time the console is reset (i.e. every upgrade)?

Yes if you do console reset as part of upgrade. However it does not happen automatically (like discussed #150 ) so you can choose just updating packages with apt-get update+upgrade like on any Debian based distro.

Or automate that package installation https://burmillaos.org/docs/configuration/advanced/running-commands/ and use reset option.

@olljanat olljanat closed this as completed Mar 5, 2024
@alesnav
Copy link

alesnav commented Aug 7, 2024

I've just faced the same NFS problem when trying to deploy a new environment, and I finished in this same issue to realize that I need to install nfs-common package.

@olljanat will this package finally be included in the base image?

Thanks!!

@olljanat
Copy link
Member

olljanat commented Aug 9, 2024

It is a bit unclear when next version will be released but there is already some other changes waiting in v2.0.2-rc1 so if someone creates pull request about this it will more likely get included.

@olljanat olljanat reopened this Aug 9, 2024
@olljanat olljanat added enhancement New feature or request and removed documentation Improvements or additions to documentation version/v1.9.x labels Aug 9, 2024
@olljanat
Copy link
Member

Fixed in v2.0.2-rc2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants