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

Jon Nordby jononor at gmail.com
Fri Oct 23 11:22:59 UTC 2009


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 at 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 at 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 at 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...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20091023/874fa330/attachment.htm>
-------------- next part --------------
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


More information about the virt-tools-list mailing list