qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Nbd] Hibernate and qemu-nbd


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [Nbd] Hibernate and qemu-nbd
Date: Thu, 10 Oct 2013 11:15:54 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Oct 04, 2013 at 07:30:45AM -0700, Mark Trumpold wrote:
> 
> 
> On 9/26/13 10:18 PM, "Stefan Hajnoczi" <address@hidden> wrote:
> 
> >
> >Try the qemu-nbd --persistent option.  That should prevent it from
> >shutting down when nbd-client is disconnected.
> >
> >Stefan
> >
> 
> 
> Hi Stefan,
> 
> Sorry for the delay..
> I tried the following per your suggestion:
> 
>   920  qemu-nbd --persistent -p 2000 /root/qemu/q1.img &
>   921  nbd-client -persist localhost 2000 /dev/nbd0
>   922  fsck /dev/nbd0
>   923  mount /dev/nbd0 /mnt
>   924  ls /mnt
>   925  umount /dev/nbd0
>   ::
> 
>   927  echo reboot >/sys/power/disk
>   928  echo disk >/sys/power/state
>   929  mount /dev/nbd0 /mnt
> 
> This seems to work; that is both sides (client and server) persist
> after the hibernate cycle.
> 
> However, if I don't 'umount' '/dev/nbd0' before the hibernate
> cycle, and try to 'ls /mnt' after, the 'ls' hangs indefinitely.
> 
> For my real use case we have the root filesystem mounted,
> so unmounting is not an option (at least I don't think so).
> 
> I also tried remounting readonly, and also 'blockdev --flushbufs ..'
> before the hibernate cycle -- either or both did not help.
> 
> I had thought about trying a 'chroot' and then a 'umount', but
> have not yet tried this.
> 
> This one was so close..

Too bad.  I'm sure it's solvable but would require more debugging and
writing qemu-nbd.c and kernel nbd.c fixes.  Unfortunately I don't have
time to look into it myself.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]