Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to close a LUKS mounted image-file without ' Device ... is still in use' - need to wait maybe 15 minutes

Featured Replies

I'm running unraid 6.12.4.
This is likely not unRaid specific, but I don't know.

TLDR: I can mount a LUKS drive but sometimes when on luksClose it won't close, but so far waiting 15 minutes helps.

I tried creating a LUKS encrypted file using this guide:

https://blog.tian.it/create-encrypted-luks-sparse-file/

When I unmount the mounted filesystem and then try to close the LUKS using

```
umount /cryptoarchive/stuff
cryptsetup luksClose "/dev/mapper/stuff"
```

then I get the following error:

```
Device /dev/mapper/stuff.img is still in use.
```

Running `df` I can see the unmount worked, and also the `umount` didn't fail. `lsof` shows me that the loop-device file is (of cause) still in use, but no files on the mounted dir `/cryptoarchive/stuff` is shown .

Once after waiting an hour or so, I tried remounting and then umounting immediately afterwards, and that one time luksClose succeeded. I have shared the mount point via samba, but as mentioned umount works.

I have attached my mount and unmount scripts.


Thx, Alex

 

 

luks-unmount.sh

luks-mount.sh

Edited by Alex R. Berg

  • Alex R. Berg changed the title to How to close a LUKS mounted image-file without ' Device ... is still in use' - need to wait maybe 15 minutes

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.