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

Uninstaller: error deleting APFS volume <auto generated issue. almost> #988

Open
ink-splatters opened this issue Jun 5, 2024 · 1 comment

Comments

@ink-splatters
Copy link

Error

Uninstaller is broken and never succeeds. It's easy reproducible on latest macOS with volume encryption enabled (I didn't try not to encrypt Nix volume)

Possible issue

you can't delete a volume to which you have open file descriptors

Possible solution

Force-unmounting a volume prior to deletion has always worked for me, unless volume was used by kernel

Error: 
   0: Error reverting
   0: Action `create_apfs_volume` errored
      Failed to execute command with status 1 `"/usr/sbin/diskutil" "apfs" "deleteVolume" "Nix Store"`, stdout: Started APFS operation
      Deleting APFS Volume from its APFS Container
      Unmounting disk4s5
      The volume "Nix Store" on disk4s5 couldn't be unmounted because it is in use by process 18543 (zsh)

      stderr: Error: -69888: Couldn't unmount disk



Metadata

key value
version 0.19.0
os macOS
arch aarch64
@ink-splatters ink-splatters changed the title Uninstaller: error deleting APFS volume Uninstaller: error deleting APFS volume <auto generated issue. almost> Jun 5, 2024
@cole-h
Copy link
Member

cole-h commented Jun 5, 2024

We already run diskutil unmount force [disk] (

Command::new("/usr/sbin/diskutil")
.process_group(0)
.args(["unmount", "force"])
.arg(name)
), and that's where this is failing. As far as I'm aware, that's the only way to force unmount a volume -- is that right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants