XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    [Solved] Last XOA from sources and backup with NFS (doesn't work because error in --options argument while mount)

    Scheduled Pinned Locked Moved Xen Orchestra
    5 Posts 3 Posters 631 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      AlexTheBest
      last edited by AlexTheBest

      Have a nice day!

      I have the last for today XOA (ip 192.168.11.50) made from sources and nfs-server for backups (ip 192.168.11.53)

      I can manually mount nfs-shares without errors:

      $ mount | grep -i nfs
      $ sudo mount -v -t nfs 192.168.11.53:/backups/xo/ /backups/xo/
      mount.nfs: timeout set for Thu Jun 29 12:27:32 2023
      mount.nfs: trying text-based options 'vers=4.2,addr=192.168.11.53,clientaddr=192.168.11.50'
      $ mount | grep -i nfs
      192.168.11.53:/backups/xo on /backups/xo type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.11.50,local_lock=none,addr=192.168.11.53)
      

      But when I try to start backup to NFS with XOA I get:

       nfs_xo 
      Start: Jun 29, 2023, 09:03:29 AM
      End: Jun 29, 2023, 09:03:29 AM
      Duration: a few seconds
      Error: Command failed with exit code 1: mount -o -t nfs 192.168.11.53:/backups/xo /run/xo-server/mounts/0e5e9511-8912-48d4-96ad-532979533332 mount: only root can use "--options" option
      

      I did not fill windows with "custom mount options". It is empty one.

      This error does not depend what user starts XOA itself - root or ordinary user. Every time I see "Error: ... only root can use "--options" option".

      Could you tell me please what to do to make XOA correctly mount NFS-share(s)?

      By the way, other options I checked (create, run, stop, kill VM, storages etc) works but not "backup+nfs"...

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hi!

        Just a small typo: XOA meant "Xen Orchestra virtual Appliance", so you use either "XOA" or "XO from the sources", there's no such thing as "XOA from the sources" 😉

        Also, when you use XO from the sources, you are installing it on a system of your choice. There's 0 chances we can guess what distro you are using, which what permissions you are using xo-server, if you correctly followed our official guide to install it and so on.

        That's why it's harder to assist in that case (and why we only provide pro support on our validated/controlled virtual machine, the famous "XOA").

        So, anyway, as usual in those cases, you need to check:

        • if you correctly installed it following our official instruction https://xen-orchestra.com/docs/installation.html#from-the-sources
        • if you are up to date: https://xen-orchestra.com/docs/community.html#report-a-bug
        • describe your environment with many details
        A 1 Reply Last reply Reply Quote 0
        • A Offline
          AlexTheBest @olivierlambert
          last edited by AlexTheBest

          @olivierlambert

          My sorry for not complete info

          That is what I talk about. It is not to argue with you. I suspect that I call things incorrectly but it is new terminology for me.
          XOA - orchestra, installed on Ubuntu server 16.04
          NFS server - CentOs 8

          Manual connection works fine.
          But when I try to "check connection" or start backup with the same settings as with manual connection, every time I see error about "-o" option while mounting

          ronivayR 1 Reply Last reply Reply Quote 0
          • ronivayR Offline
            ronivay Top contributor @AlexTheBest
            last edited by ronivay

            How did you install your XO from sources? Manually following the docs or using some 3rd party script?

            Anyway the error kinda gives a hint "only root can use...", so you're running XO with a non privileged user right? Did you define useSudo configuration option and add proper sudoers configuration as the documentation suggests? That error comes directly from OS's mount command so you either need to run the process as root (which you're not doing properly if you get this error) or add the config option to use sudo when mounting remotes.

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              AlexTheBest @ronivay
              last edited by AlexTheBest

              @ronivay,

              I resolved my problem with orchestra which did not want to make backup with NFS.

              Orchestra wrote errors like:

              Command failed with exit code 1: mount -o -t nfs 192.168.11.53:/backups/xo /run/xo-server/mounts/0e5e9511-8912-48d4-96ad-532979533332 mount: only root can use "--options" option
              

              In general, orchestra tried to use mount option "--options" but mount command rejected this option.
              When I mount my NFS-shares manually everything was ok - mount works, read-write too, umount also.

              I did simplest process. I removed at all "--options" from mount command. (As far as I understand, *BSD mount will not work without this option but my Ubuntu works).

              Background:
              xcp-ng server (centos 8.2) as NFS server
              ubuntu server 16.04 where orchestra is going to be placed

              Orchestra installed 10 days ago from sources according to https://xen-orchestra.com/docs/installation.html#from-the-sources
              I complete followed document before chapter "Installing dependencies".
              I made

              yarn
              

              Then, before "yarn build", I manually edited file:
              /opt/xen-orchestra/@xen-orchestra/fs/src/_mount.js
              at string 68 I replaced
              await this.#execa('mount', ['-o', options, '-t', type, device, realPath], {
              with
              await this.#execa('mount', ['-t', type, device, realPath], {
              I then proceeded to follow the instructions:

              yarn build
              

              a so on...

              Now "patched" orchestra fine makes any kind of backup with NFS.
              At least, I solved this problem.

              Yet another question appeared as backup works
              What kind of Backup should I use to make full copy which enough for restoring (Heaven forbid)?
              I tried simply "Backup". It SUCCESSFULLY (!) created several files with 56 kbytes (no giga, no mega but kilo). I suppose it abnormal. My VM has got 20 Gb of disk space and about one half is already used (ubuntu server, postgres etc).
              As far as I understand (https://xcp-ng.org/forum/topic/7034/backup-with-local-usb-hdd-attached-sr_operation_not_supported/5?_=1688120707451) my version of xcp-ng (8.2.1) does not support "Snapshots" with local disks.
              Now I copy imagine of my VM with cron as temporary option but may be there is some more correct backup option?

              1 Reply Last reply Reply Quote 0
              • First post
                Last post