qemu-block
[Top][All Lists]
Advanced

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

Re: kernel: block nbd0: shutting down sockets


From: Eric Blake
Subject: Re: kernel: block nbd0: shutting down sockets
Date: Thu, 19 May 2022 10:09:29 -0500
User-agent: NeoMutt/20220429-71-6f7d3e

On Thu, May 19, 2022 at 04:40:27PM +0200, Pascal wrote:
> hi,
> 
> my system is a Linux (5.10.83) with SystemD (249.7) and Qemu (6.1.0) and
> I've a poor small Bash script:
> 
> #!/usr/bin/bash
> systemd-cat -p warning <<< "script running..."
> qemu-nbd -r -s -f raw -c /dev/nbd0 /dev/sdb |& systemd-cat -p warning
> 
> after loading nbd module, if I plug a blank disk (/dev/sdb with no
> partition) and call the script (as root) then all is ok and my disk is
> accessible via /dev/nbd0.
> 
> after rebooting and reloading nbd module, I install a Udev rule that calls
> my script when a device is added to the system, plug the disk and observe
> the system events with journalctl -f.
> the script is called (eg. script running...) and /dev/nbd0 seems to be
> linked with /dev/sdb but 2 seconds later, the message kernel: block nbd0:
> shutting down sockets appears and /dev/nbd0 becomes unreachable.
> 
> where can the problem come from ?

git grep 'shutting down sockets'

does not have any hits in qemu.git, so the message is coming from the
kernel module, and not from the qemu-nbd side of things.  Is the
qemu-nbd process still alive when you see the error message?  Could it
be a permissions issue, where running your script via a udev rule
creates sockets with different permissions than when running the
script as root, such that the qemu-nbd process is locked out of access
to sockets needed to drive the kernel module?

Can you add a --trace parameter to qemu-nbd to cause it to log more
details about what is going on?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




reply via email to

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