Thanks,
In your log I see that stopping remote file systems and libvirtd
properly was ordered AFTER libvirt-guests tried to shut down the guest.
I've checked this in a few ways
1. libvirt/libvirt-guests vs remote fs (e.g. NFS)
2. libvirt/libvirt-guests vs NBD
#1 Remote-FS - well ordered
Apr 23 14:37:02 ps01ubx libvirt-guests.sh[51404]: Starting shutdown on guest:
psw10x64
..
Apr 23 14:39:00 ps01ubx libvirt-guests.sh[51071]: Waiting for 1 guests to shut
down, 5 seconds left
Apr 23 14:39:04 ps01ubx libvirt-guests.sh[52102]: Timeout expired while
shutting down domains
Then libvirtd.service stops/fails and eventually
Apr 23 14:39:05 ps01ubx systemd[1]: Stopped target Remote File Systems.
So this isn't totally looking as I first assumed which was
1. NFS with the NTFS images on it disconnected
2. shutdown guest (fails due to missing NFS)
Since the shutdown of libvirt-guests has a 120s timeout that is like a bit of
breathing room in the shutdown.
A lot happens before, a lot happens after - but we see that there is nothing
concurrently going on while waiting for the guest shutdown to complete.
What we see before is the I/O errors that you mentioned.
19221 Apr 23 14:37:04 ps01ubx kernel: block nbd0: NBD_DISCONNECT
19222 Apr 23 14:37:04 ps01ubx kernel: block nbd0: Disconnected due to user
request.
19223 Apr 23 14:37:04 ps01ubx kernel: block nbd0: shutting down sockets
...
19229 Apr 23 14:37:04 ps01ubx kernel: blk_update_request: I/O error, dev nbd0,
sector 1637875585 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
#2 NBD - too early
Since the rest is behaving well it might be more the question "why is NTFS
exiting early".
# Set up via:
Apr 22 12:00:02 ps01ubx ntfs-3g[2059]: Mounted /dev/nbd0p2 (Read-Write, label
"psData", NTFS 3.1)
# guest shutdown starts
Apr 23 14:37:02 ps01ubx libvirt-guests.sh[51404]: Starting shutdown on guest:
psw10x64
# NBD shut down via
Apr 23 14:37:04 ps01ubx kernel: block nbd0: NBD_DISCONNECT
# Then I/O errors happen
Apr 23 14:37:04 ps01ubx kernel: blk_update_request: I/O error, dev nbd0, sector
1637875584 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
So it could be that NBD disconnect just waited until the guest shutdown was
"kicked" but not until it completed?
The log does not contain via which config/service you have configured your
NTFS/NBD.
It is just a old style /etc/fstab entry or anything more explicit in regard to
ordering control like a .mount target or a custom .service?
Could you please outline in detail the config that you use for that NBD/NTFS
setup?
If you have a target/unit/service for the NTFS .
If you have any kind of such could you add to your config
Requires=virt-guest-shutdown.target
After=virt-guest-shutdown.target
That would be what you add to anything that you want to have done/ordered into
libvirt shutdown.
That should ensure correct order.
Waiting to see how your NTFS setup looks like ...
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924494
Title:
Systemd shutdown order unmounts filesystem used by qemu/kvm guest
before shutting down the guest
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1924494/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs