Received: from eggs.gnu.org ([2001:4830:134:3::10]:53838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi3FS-0002eT-Gp for qemu-devel@nongnu.org; Thu, 08 Sep 2016 13:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bi3FP-0006lz-3j for qemu-devel@nongnu.org; Thu, 08 Sep 2016 13:36:25 -0400 Received: from indium.canonical.com ([91.189.90.7]:48682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi3FO-0006lt-Tj for qemu-devel@nongnu.org; Thu, 08 Sep 2016 13:36:23 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1bi3FO-0001oE-4A for ; Thu, 08 Sep 2016 17:36:22 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 1DB032E80AE for ; Thu, 8 Sep 2016 17:36:22 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 08 Sep 2016 17:27:42 -0000 From: Alexandre <1587065@bugs.launchpad.net> Reply-To: Bug 1587065 <1587065@bugs.launchpad.net> Sender: bounces@canonical.com References: <20160530134240.21929.85128.malonedeb@wampee.canonical.com> Message-Id: <20160908172742.13845.9413.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1587065] Re: btrfs qemu-ga - multiple mounts block fsfreeze List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I also have a path mounted twice, but this time it's devicemapper and not AUFS like tim, so maybe not fs type related. virsh version: Compiled against library: libvirt 1.3.1 Using library: libvirt 1.3.1 Using API: QEMU 1.3.1 Running hypervisor: QEMU 2.5.0 KVM/QEMU Host command: virsh snapshot-create-as $VM_NAME \ ${VM_NAME}_snapshot \ "${VM_NAME} snapshot $(date +%Y-%m-%d-%H%M%S)" \ --diskspec vda,file=3D${VM_QCOW_FILE}-snap.qcow2 \ --disk-only \ --atomic \ --no-metadata \ --quiesce VM similar mount source: /dev/mapper/delve--vg-root on / type ext4 (rw,relatime,discard,errors=3Dr= emount-ro,data=3Dordered) /dev/mapper/delve--vg-root on /var/lib/docker/devicemapper type ext4 (rw,= relatime,discard,errors=3Dremount-ro,data=3Dordered) In the VM logs: Sep 8 12:48:45 xxxxxxxx qemu-ga: info: guest-fsfreeze called -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1587065 Title: btrfs qemu-ga - multiple mounts block fsfreeze Status in QEMU: New Bug description: Having two mounts of the same device makes fsfreeze through qemu-ga impos= sible. root@CmsrvMTA:/# mount -l | grep /dev/vda2 /dev/vda2 on / type btrfs (rw,relatime,space_cache,subvolid=3D257,subvol= =3D/@) /dev/vda2 on /home type btrfs (rw,relatime,space_cache,subvolid=3D258,sub= vol=3D/@home) Having two mounts is rather common with btrfs, so the feature fsfreeze is unusable on these systems. = Below more information about how we encountered this issue... Message send to qemu-discuss@nongnu.org: Message 1: ---------- I use external snapshots to backup my guests. I use the 'quiesce' option = to flush and frees the guest file system with the qemu guest agent. With the exeption of one guest, this procedure works fine. On the 'unwill= ing' guest, I get this error message: "ERROR 2016-05-25 00:51:19 | T25-bakVMSCmsrvVH2 | fout: internal error: u= nable to execute QEMU agent command 'guest-fsfreeze-freeze': failed to free= ze /: Device or resource busy" I don't think this is not some sort of time-out error, because activation of the fsfreeze and the error message happen immediately after each other: $ grep qemu-ga syslog.1 May 25 00:51:19 CmsrvMTA qemu-ga: info: guest-fsfreeze called This is the only entry of the qemu guest agent in syslog. $ sudo virsh version Compiled against library: libvirt 1.3.1 Using library: libvirt 1.3.1 Gebruikte API: QEMU 1.3.1 Draaiende hypervisor: QEMU 2.5.0 $ virsh qemu-agent-command CmsrvMTA '{"execute": "guest-info"}' {"return":{"version":"2.5.0", ... ,{"enabled":true,"name":"guest-fstrim",= "success-response":true},{"enabled":true,"name":"guest-fsfreeze-thaw","succ= ess-response":true},{"enabled":true,"name":"guest-fsfreeze-status","success= -response":true},{"enabled":true,"name":"guest-fsfreeze-freeze-list","succe= ss-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze","success-= response":true}, ... } For making an external snapshot, I use this command: $ virsh snapshot-create-as --domain CmsrvMTA sn1 --disk-only --atomic --q= uiesce --no-metadata --diskspec vda,file=3D/srv/poolVMS/CmsrvMTA.sn1 Piece of reply 1: ----------------- I have encountered this before. Some operating systems may have bind-mounts that let a device appear multiple times in the moun= t list. Unfortunately the guest agent is not smart enough to consider a dev= ice that has been frozen as succesfull and keep going. This causes this spe= cific error. Piece of reply 2: ----------------- Ok, that seems to be it. I=E2=80=99ve got the =E2=80=98/=E2=80=99 and =E2=80=98/home=E2=80=99 on t= he same device formatted as btrfs on two separate sub volumes. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1587065/+subscriptions