Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Detach/Unmount Block Devices using GUI #6054

Open
zellchristensen opened this issue Sep 14, 2020 · 6 comments
Open

Unable to Detach/Unmount Block Devices using GUI #6054

zellchristensen opened this issue Sep 14, 2020 · 6 comments
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. C: manager/widget needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@zellchristensen
Copy link

Qubes OS version
4.0.3

Affected component(s) or functionality
Device Manager

Brief summary
Certain Block Devices persist in the device manager list and can't be detached/unmounted via GUI.

To Reproduce
Two separate methods.
Example 1
1.) Make sure Windows Tools are installed sudo qubes-dom0-update qubes-windows-tools
2.) Start new or existing VM with Windows Tools attached. qvm-start <vmName> --install-windows-tools
3.) Observe that Qube starts with windows tools attached.
4.) Shutdown Qube.
5.) Optionally, repeat steps with other Qubes or same Qube to get multiple block devices of the Windows Tools for each time it was used.

OR

Example 2
1.) Load an ISO file on to a USB stick
2.) Insert in to Qubes machine, start USB Qube (sys-usb), assign device to OtherVM (Debian based in my test case).
3.) Mount Block Device in OtherVM and verify it's accessible. ( udisksctl mount -b /dev/xvdi in my test case)
4.) In ThirdVM Settings >> Advanced tab, click button "Boot qube from CDROM"
5.) In popup, select from file in qube and select the OtherVM the device is mounted in and browse to the mounted dir and choose the ISO file. Click OK.
6.) ThirdVM starts up with ISO mounted and new Block Device for that ISO.
7.) Shutdown ThirdVM and verify the device is still in the Device Manager, now unattached.
8.) Attempt to unmount from OtherVM ( sudo umount /mnt/removable in my case)
9.) See error, "target is busy"

Expected behavior
There should be some way to easily manually remove these Block Devices.

Actual behavior
Block devices from dom0 (First example above) remain until system reboot.
Block devices from OtherVM's (Second example above) cannot be unmounted from within the VM and are only removed from the Device Manager when that VM is shutdown.

Screenshots
snapshot_2020-09-14
Note that USB drive was physically removed before image was taken.

Additional context
The screenshot is mostly relating to Example 1 after using the command line to start various VMs with the Windows Tools added leading to multiple versions of the ISO being mounted when no VM is using it.
Also Example 2 with the top ISO which cannot be unmounted from inside that debianQube, It just requires the VM be shut down.
I did not try Example 2 with a Fedora based VM yet.
I'm using a Debian based VM as my USB drive is formatted in exFat and Fedora lacks exFat support and cannot mount it.

Solutions you've tried
Restarting VMs block devices are from or restarting the entire system.

Relevant documentation you've consulted
https://www.qubes-os.org/doc/block-devices/
https://www.qubes-os.org/doc/usb-devices/
https://www.qubes-os.org/doc/windows-tools/

@zellchristensen zellchristensen added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Sep 14, 2020
@zellchristensen zellchristensen changed the title Unable Detach/Unmount Block Devices using GUI Unablen to Detach/Unmount Block Devices using GUI Sep 14, 2020
@andrewdavidwong andrewdavidwong changed the title Unablen to Detach/Unmount Block Devices using GUI Unable to Detach/Unmount Block Devices using GUI Sep 15, 2020
@andrewdavidwong andrewdavidwong added C: manager/widget needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Sep 15, 2020
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone Sep 15, 2020
@marmarta
Copy link
Member

@marmarek , is this not another edition of our favorite "ghost devices" problem?

@marmarta
Copy link
Member

marmarta commented Oct 7, 2020

So, problem #1 is not qui-tools related: qvm-start does not do it's own cleanup, as it should.

@marmarta
Copy link
Member

marmarta commented Oct 7, 2020

Okay, and problem #2 is actually the same problem! Which is good, and also I'm assigning this to @marmarek who just said he knows how to fix it :)

@andrewdavidwong andrewdavidwong added the eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) label Aug 5, 2023
@github-actions
Copy link

github-actions bot commented Aug 5, 2023

This issue is being closed because:

If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment.
(For example, if a bug still affects Qubes OS 4.1, then the comment "Affects 4.1" will suffice.)

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2023
@andrewdavidwong andrewdavidwong removed the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Aug 5, 2023
@marmarta
Copy link
Member

marmarta commented Aug 7, 2023

this persists in at least 4.1, probably also 4.2?

@marmarta marmarta reopened this Aug 7, 2023
@ghost
Copy link

ghost commented Aug 7, 2023

this persists in at least 4.1, probably also 4.2?

I hadn't had the exact issue, probably since I haven't used QWT.

A similar issue I came across though, when trying to manually eject a usb device in sys-usb, it persists to stay connected. Only something like echo 1 > /sys/bus/usb/devices/DEVICE/poweroff would keep it from staying connected, whereas eject /dev/DEVICE shows no error but wouldn't work.

@andrewdavidwong andrewdavidwong removed the eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) label Aug 8, 2023
@andrewdavidwong andrewdavidwong added needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. labels Aug 8, 2023
@andrewdavidwong andrewdavidwong removed this from the Release 4.1 updates milestone Aug 13, 2023
@marmarta marmarta moved this to Backend in Device UX Redesign Sep 20, 2023
@marmarek marmarek removed their assignment Mar 6, 2024
@marmarta marmarta removed their assignment Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. C: manager/widget needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
Status: Backend
Development

No branches or pull requests

4 participants