NFS Share on ZFS Pool: Cannot stat after reboot

Discussion in 'Proxmox VE: Installation and configuration' started by Nafi, Apr 17, 2019.

  1. Nafi

    Nafi New Member

    Joined:
    Apr 17, 2019
    Messages:
    4
    Likes Received:
    0
    Hi

    I want to use Proxmox 5.4 with cifs and nfs shares. nfs-kernel-server is already installed
    A large raidz2 pool is mounted at /pool.

    I created some nfs shares in /etc/export to share some subdirectories of /pool.

    when nfs-kernel-server is started manually, everything works fine, but after reboot i get the following Error for every share:

    Code:
    Cannot stat /pool/shares/... : No such file or directory
    It seems the zfs pool is not mounted at the time the nfs server is started. I already tried specifying
    Code:
    After=zfs-mount.service
    in /etc/systemd/multi-user.target/system/nfs-server.service but even though i can confirm the nfs-server is started after zfs-mount, i still get the error messages. It also happens if i add 60s to ExecStartPre of nfs-server.service.

    Am i missing something?
    I dont have issues with my samba share

    Thanks
     
  2. Stoiko Ivanov

    Stoiko Ivanov Proxmox Staff Member
    Staff Member

    Joined:
    May 2, 2018
    Messages:
    1,386
    Likes Received:
    129
    You could use the 'sharenfs' property of the datasets you want to export via NFS - this works quite reliably
    (see `man zfs`)

    Hope this helps!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Nafi

    Nafi New Member

    Joined:
    Apr 17, 2019
    Messages:
    4
    Likes Received:
    0
    I don't use datasets. :/ Its the pool iself with directories
     
  4. Stoiko Ivanov

    Stoiko Ivanov Proxmox Staff Member
    Staff Member

    Joined:
    May 2, 2018
    Messages:
    1,386
    Likes Received:
    129
    hmm - any chance to create datasets and move the data there ? (with rsync)
    (you can rename the datasets after the move)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mir

    mir Well-Known Member
    Proxmox Subscriber

    Joined:
    Apr 14, 2012
    Messages:
    3,483
    Likes Received:
    97
  6. Nafi

    Nafi New Member

    Joined:
    Apr 17, 2019
    Messages:
    4
    Likes Received:
    0
    i'll try the zfs dataset sharing. If it works fine I may be able to copy the files over.

    thank you so far!
     
  7. Nafi

    Nafi New Member

    Joined:
    Apr 17, 2019
    Messages:
    4
    Likes Received:
    0
    It seems to work with zfs's share option. I'll copy over the data to datasets tonight. Thank you.
     
  8. timonych

    timonych Member

    Joined:
    Aug 8, 2017
    Messages:
    32
    Likes Received:
    3
    #8 timonych, Apr 18, 2019
    Last edited: Apr 18, 2019
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice