[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [BUG] mounting of NFSv4 pools fails in virt-manager



The problem is due to libvirt using mount.nfs instead of mount.nfs4 for NFSv4 shares.

virt-manager tries the following command (see attached file):
[jon jon-laptop ~]$ sudo /bin/mount 10.0.0.2:/libvirt_install /var/lib/libvirt/images/server-install
mount.nfs: access denied by server while mounting 10.0.0.2:/libvirt_install

When it should be something like this instead:
[jon jon-laptop ~]$ sudo /bin/mount -t nfs4 10.0.0.2:/libvirt_install /var/lib/libvirt/images/server-install

Because mount apparently considers NFSv4 to be a different type than previous NFS versions:
[jon jon-laptop ~]$ mount.nfs
mount.nfs   mount.nfs4 

OS: Arch Linux Current on both server and client. nfs-utils 1.2.0-4 and kernel 2.6.31

I don't believe there is a good way to programatically check which version a share is, but one can catch the error and try again with "-t nfs4".
Or perhaps trying nfs4 first is better...
Error starting pool 'server-install': internal error '/bin/mount 10.0.0.2:/libvirt_install /var/lib/libvirt/images/server-install' exited with non-zero status 32 and signal 0: mount.nfs: access denied by server while mounting 10.0.0.2:/libvirt_install

Traceback (most recent call last):
  File "/home/jon/local/share/virt-manager/virtManager/host.py", line 425, in start_pool
    pool.start()
  File "/home/jon/local/share/virt-manager/virtManager/storagepool.py", line 65, in start
    self.pool.create(0)
  File "/usr/lib/python2.6/site-packages/libvirt.py", line 817, in create
    if ret == -1: raise libvirtError ('virStoragePoolCreate() failed', pool=self)
libvirtError: internal error '/bin/mount 10.0.0.2:/libvirt_install /var/lib/libvirt/images/server-install' exited with non-zero status 32 and signal 0: mount.nfs: access denied by server while mounting 10.0.0.2:/libvirt_install

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]