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

Re: [libvirt] Trouble with /var/lib/libvirt/qemu/save mount

On 07/12/2017 10:14 AM, Daniel P. Berrange wrote:
> On Wed, Jul 12, 2017 at 10:11:34AM -0600, Orion Poplawski wrote:
>> I'm trying to get libvirt-guests ON_SHUTDOWN=suspend to work on EL7 with a
>> separate mount point for /var/lib/libvirt/qemu/save.  It appears that during
>> host shutdown that /var/lib/libvirt/qemu/save gets unmounted before
>> libvirt-guests gets run, resulting in the save images running out of space on
>> my system and being mounted over on boot.
>> I've tried adding:
>> RequiresMountsFor=/var/lib/libvirt/qemu/save
>> to /usr/lib/systemd/system/libvirt-guests.service, but that does not appear to
>> help.  Any other ideas?
> Each mount point has a corresponding unit file. eg
>  /mnt/Downloads corresponds to  mnt-Downloads.mount
> so you can put a dependancy between the lbivirt-guests.service
> and the mount unit, that ought to prevent it being unmounted
> Regards,
> Daniel

As I understand it, RequiresMountsFor is supposed to handle that.  With that,
systemctl show libvirt-guests also has:

Requires=var-lib-libvirt-qemu-save.mount -.mount var.mount basic.target
After=machine-qemu\x5cx2d5\x5cx2dipa\x5cx2dboulder2.scope -.mount
machine-qemu\x5cx2d4\x5cx2dad\x5cx2dboulder02.scope basic.target system.slice
systemd-journald.socket machine-qemu\x5cx2d3\x5cx2dmailmirror.scope var.mount
time-sync.target machine-qemu\x5cx2d2\x5cx2dvulcan7.scope libvirtd.service
machine-qemu\x5cx2d1\x5cx2dmock1.scope network.target

but I get:

Jul 12 10:19:15 saga systemd: Stopping Suspend Active Libvirt Guests...
Jul 12 10:19:16 saga libvirt-guests.sh: Running guests on default URI: mock1,
vulcan7, mailmirror, ad-boulder02, ipa-boulder2
Jul 12 10:19:16 saga systemd: Unmounted /var/lib/libvirt/qemu/save.
Jul 12 10:19:16 saga libvirt-guests.sh: Suspending guests on default URI...
Jul 12 10:19:16 saga libvirt-guests.sh: Suspending mock1: ...
Jul 12 10:19:16 saga blkdeactivate: [UMOUNT]: unmounting vg_data-save (dm-32)
mounted on /var/lib/libvirt/qemu/save... done

I wonder if libvirt-guests being of type oneshot is affecting this.

Orion Poplawski
Technical Manager                          720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion nwra com
Boulder, CO 80301                   http://www.nwra.com

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