Libvirt NFS mount on boot.

Bug #351307 reported by William King
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Expired
Low
Unassigned

Bug Description

I have setup /etc/fstab to mount the nfs share on boot. I then realized that it wasn't being mounted on boot, but that I could mount the nfs drive with 'sudo mount -a' after boot. So I added mount -a to rc.local.

libvirt fails to start if an image is on a remote nfs drive that isn't mounted yet. especially when the virtual image is set to auto start.

Tags: lucid
Revision history for this message
Alvin (alvind) wrote :

Is it really the libvirt management daemon itself that does not start, or do you want libvirt to start virtual machines, as soon as the images become available?

Revision history for this message
Chuck Short (zulcss) wrote :

Hi,

I was wondering if this is still a problem for you?

Regards
chuck

Changed in libvirt (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Chuck Short (zulcss) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Revision history for this message
Alvin (alvind) wrote :

I can confirm that NFS mounts are not automatically mounted, when libvirtd is started during boot. I don't know if that's the actual bug, because it's new in karmic I think.

Revision history for this message
Alvin (alvind) wrote :

Due to bug #461133 NFS drives are not mounted at boot when using a static network interface (also see bug #446031).
There could be other reasons for not having NFS at boot.

When using autostart of virtual machines, should libvirt not wait for the netfs storage pool to become available? This would also fix bug #491273.

Revision history for this message
Alvin (alvind) wrote :

A workaround for this bug is restarting libvirt-bin in rc.local
However, this will also restart autostarted virtual machines (that do not reside on NFS drives), often resulting in a crash of those virtual machines.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I recently migrated libvirt to use Upstart for boot.

Can you still reproduce this bug in Lucid?

Revision history for this message
Alvin (alvind) wrote :

I upgraded a karmic machine with libvirt and a netfs storage pool.
It's still reproducible. The pool is not activated at boot.

tags: added: lucid
Revision history for this message
Anton Altaparmakov (aia21) wrote :

I am using a fresh install of Ubuntu 10.04 LTS Server and have used virt-manager to set up an NFS storage repository (located on another machine).

On boot the storage fails to mount.

First it was failing with "statd not running" and I fixed that by editing /etc/init/statd.conf making this change:

-start on (started portmap or mounting TYPE=nfs)
+start on ((started portmap and local-filesystems) or mounting TYPE=nfs)

Statd is now started but the NFS mount still does not happen at boot!

When I then launch virt-manager, and click on the "Play/Start" button in the Storage tab after selecting the NFS storage, it then mounts it. But I want it to be mounted automatically at boot rather than having to do it by hand each time the machine boots...

Note the server has a static (non-dhcp) IP address as all servers should have! I don't want booting to fail because the dhcp server has gone away...

Best regards,

Anton

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Since libvirt-bin.conf comes up a runlevel [2345] .. its possible that the network is not up yet.

This is because runlevel 2 is triggered when all automount filesystems are mounted, and the loopback is up.

You can probably correct this issue by changing libvirt-bin.conf to be

start on net-device-up IFACE=eth0

But I don't think we could make that a generic change, since many (most?) libvirt users will be just fine with runlevel 2.

We could do

start on runlevel [2345] or net-device-up IFACE=eth0

But that assumes that it fails to start when the network is unavailable.. does it fail to start, or just start without the NFS storage pool?

Revision history for this message
William King (quentusrex) wrote : Re: [Bug 351307] Re: Libvirt NFS mount on boot.

It would start but without the network.

On 12/16/2010 01:40 AM, Clint Byrum wrote:
> Since libvirt-bin.conf comes up a runlevel [2345] .. its possible that
> the network is not up yet.
>
> This is because runlevel 2 is triggered when all automount filesystems
> are mounted, and the loopback is up.
>
> You can probably correct this issue by changing libvirt-bin.conf to be
>
> start on net-device-up IFACE=eth0
>
> But I don't think we could make that a generic change, since many
> (most?) libvirt users will be just fine with runlevel 2.
>
> We could do
>
> start on runlevel [2345] or net-device-up IFACE=eth0
>
> But that assumes that it fails to start when the network is
> unavailable.. does it fail to start, or just start without the NFS
> storage pool?
>

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for libvirt (Ubuntu) because there has been no activity for 60 days.]

Changed in libvirt (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers