From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VS6PT-0006F2-6P for qemu-devel@nongnu.org; Fri, 04 Oct 2013 10:31:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VS6PL-00046B-TT for qemu-devel@nongnu.org; Fri, 04 Oct 2013 10:31:15 -0400 Received: from atl4mhob10.myregisteredsite.com ([209.17.115.48]:41728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VS6PL-00045m-Ou for qemu-devel@nongnu.org; Fri, 04 Oct 2013 10:31:07 -0400 Received: from mailpod.hostingplatform.com ([10.30.71.211]) by atl4mhob10.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id r94EV6CB031584 for ; Fri, 4 Oct 2013 10:31:06 -0400 Date: Fri, 04 Oct 2013 07:30:45 -0700 From: Mark Trumpold Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Subject: Re: [Qemu-devel] [Nbd] Hibernate and qemu-nbd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: nbd-general@lists.sourceforge.net, Wouter Verhelst , bonzini@stefanha-thinkpad.redhat.com, Paul Clements , "qemu-devel@nongnu.org" On 9/26/13 10:18 PM, "Stefan Hajnoczi" 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.. Thank you for all your attention on this. Best Regards, Mark T.