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.

Cannot unmount /mnt/cache/appdata to stop array

Featured Replies

While restarting the server, it always happens that it won't be a clean shutdown because there are unmounted disks.

I found this thread, but there is no solution: https://forums.unraid.net/topic/91696-solved-cannot-unmount-mntcache-to-stop-array/

I see the problem that /mnt/cache/appdata cannot be unmounted. It's my cache pool formatted with ZFS.

May 10 03:31:13	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:31:13	UNRAID-Server	emhttpd:	shcmd (338594): exit status: 1	
May 10 03:31:13	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:31:13	UNRAID-Server	emhttpd:	shcmd (338594): /usr/sbin/zpool export -f cache	
May 10 03:31:13	UNRAID-Server	emhttpd:	Unmounting disks...	
May 10 03:31:08	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:31:08	UNRAID-Server	emhttpd:	shcmd (338593): exit status: 1	
May 10 03:31:08	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:31:08	UNRAID-Server	emhttpd:	shcmd (338593): /usr/sbin/zpool export -f cache	
May 10 03:31:08	UNRAID-Server	emhttpd:	Unmounting disks...	
May 10 03:31:04	UNRAID-Server	root:	Fix Common Problems Version 2025.08.07	System
May 10 03:31:04	UNRAID-Server	rc.local_shutdown:	Generating diagnostics...	
May 10 03:31:04	UNRAID-Server	rc.local_shutdown:	fuser -mv /dev/md1p1 /dev/md2p1	
May 10 03:31:04	UNRAID-Server	rc.local_shutdown:	Active pids left on /dev/md*	
May 10 03:31:04	UNRAID-Server	rc.local_shutdown:	fuser -mv /mnt/addons /mnt/cache /mnt/disks /mnt/remotes /mnt/rootshare	
May 10 03:31:04	UNRAID-Server	rc.local_shutdown:	Active pids left on /mnt/*	
May 10 03:31:04	UNRAID-Server	rc.local_shutdown:	losetup -a	
May 10 03:31:04	UNRAID-Server	rc.local_shutdown:	Status of all loop devices	
May 10 03:31:04	UNRAID-Server	rc.local_shutdown:	Forcing shutdown...	
May 10 03:31:03	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:31:03	UNRAID-Server	emhttpd:	shcmd (338592): exit status: 1	
May 10 03:31:03	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:31:03	UNRAID-Server	emhttpd:	shcmd (338592): /usr/sbin/zpool export -f cache	
May 10 03:31:03	UNRAID-Server	emhttpd:	Unmounting disks...	
May 10 03:30:58	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:30:58	UNRAID-Server	emhttpd:	shcmd (338591): exit status: 1	
May 10 03:30:58	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:30:58	UNRAID-Server	emhttpd:	shcmd (338591): /usr/sbin/zpool export -f cache	
May 10 03:30:58	UNRAID-Server	emhttpd:	Unmounting disks...	
May 10 03:30:53	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:30:53	UNRAID-Server	emhttpd:	shcmd (338590): exit status: 1	
May 10 03:30:53	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:30:53	UNRAID-Server	emhttpd:	shcmd (338590): /usr/sbin/zpool export -f cache	
May 10 03:30:53	UNRAID-Server	emhttpd:	Unmounting disks...	
May 10 03:30:48	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:30:48	UNRAID-Server	emhttpd:	shcmd (338589): exit status: 1	
May 10 03:30:48	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:30:48	UNRAID-Server	emhttpd:	shcmd (338589): /usr/sbin/zpool export -f cache	
May 10 03:30:48	UNRAID-Server	emhttpd:	Unmounting disks...	
May 10 03:30:43	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:30:43	UNRAID-Server	emhttpd:	shcmd (338588): exit status: 1	
May 10 03:30:43	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:30:43	UNRAID-Server	emhttpd:	shcmd (338588): /usr/sbin/zpool export -f cache	
May 10 03:30:43	UNRAID-Server	emhttpd:	Unmounting disks...	
May 10 03:30:38	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:30:38	UNRAID-Server	emhttpd:	shcmd (338587): exit status: 1	
May 10 03:30:38	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:30:38	UNRAID-Server	emhttpd:	shcmd (338587): /usr/sbin/zpool export -f cache	
May 10 03:30:38	UNRAID-Server	emhttpd:	Unmounting disks...	
May 10 03:30:33	UNRAID-Server	emhttpd:	Retry unmounting disk share(s)...	
May 10 03:30:33	UNRAID-Server	emhttpd:	shcmd (338586): exit status: 1	
May 10 03:30:33	UNRAID-Server	root:	cannot unmount '/mnt/cache/appdata': pool or dataset is busy	
May 10 03:30:33	UNRAID-Server	emhttpd:	shcmd (338586): /usr/sbin/zpool export -f cache

But what can I do about that? That has happened since the update to Unraid 7.2, as far as I remember. That is really not nice.

UNRAID-ServerEnhancedLog.csv unraid-server-diagnostics-20260510-2223.zip

  • Community Expert

Disable Docker and VM service and reboot in safe mode, start the array and see if it stops, if yes, retest again after booting in normal mode to rule out a plugin issue, leave the services still disabled, if still OK enable one of the services and retest, then the other, note that if the issue happens with the docker service enabled only, you may need to try enabling one or a few containers at a time to find the culprit.

  • Author

@JorgeB let's say I did this and find one container causing it (which is hard anyway because I got more than 120), how should I fix this then?

  • Community Expert

Recommend looking for the support thread for that cotnainer:

docker support.JPG

3 hours ago, sasbro97 said:

@JorgeB let's say I did this and find one container causing it (which is hard anyway because I got more than 120)...

Use a binary search to more quickly narrow down the troublesome container.

  • Author

In the process of migrating to an internal boot drive with no VM or Docker service running, I can see that the problem seems to be my ZFS dataset cache/appdata itself, or maybe the underlying cloud folder:

image.png

  • Community Expert

open terminal and type in lsof /mnt/cache/appdata and it will spit out a process, then type in kill -9 <process_ID> replace <process_ID> with the actual number. might have to repeat this depending on how many processes are accessing appdata.

  • Author

@MowMdown I know it should be like this, and I have had this very often now, but nothing that was stated in any thread here was correct. I did what you said, and 20 other things, and nothing worked. Because if you get rid of the particular dataset /mnt/cache/appdata, it was saying that the cache pool itself is busy or whatever. I hope this stops now after formatting. It appeared out of nowhere.

Fun fact: I'm pretty sure it was this folder that was problematic. As I moved all the files in the process of migrating to an internal boot drive, everything worked fine. appdata was moved, and 150 containers simply work. Just the appdata/cloud folder was not correctly moved, and my config is gone. As I have not moved or replicated the ZFS snapshots, it's lost, but I can live with that.

Edited by sasbro97

  • Community Expert
17 hours ago, sasbro97 said:

@MowMdown I know it should be like this, and I have had this very often now, but nothing that was stated in any thread here was correct. I did what you said, and 20 other things, and nothing worked. Because if you get rid of the particular dataset /mnt/cache/appdata, it was saying that the cache pool itself is busy or whatever. I hope this stops now after formatting. It appeared out of nowhere.

Fun fact: I'm pretty sure it was this folder that was problematic. As I moved all the files in the process of migrating to an internal boot drive, everything worked fine. appdata was moved, and 150 containers simply work. Just the appdata/cloud folder was not correctly moved, and my config is gone. As I have not moved or replicated the ZFS snapshots, it's lost, but I can live with that.

Yeah it was just something to try as a way to troubleshoot if something was keeping the disk from unmounting. Sorry to hear it didnt work.

  • Author

@MowMdown no way I wanted to blame you. It's just a very complicated topic if you have this issue. Really, finding the problem is not easy.

  • 2 weeks later...

I've discovered i have the same issue over the past few updates, since i never reboot otherwise and haven't had any other issues. The last 2 updates I've stopped all VMs and docker containers fully, spun down disks, and then rebooted and both times it still get stuck on the same spot and then kills it and calls it an "unclean shutdown" and finds no array errors (since nothing was running or being written to the array).

Reading this thread, I'm still not clear what the issue is though. @sasbro97 did you ever figure it out or did it resolve itself when the cloud folder in your case was moved/deleted?

  • Author

@john_smith I have no evidence, but I'm pretty sure it had something to do with ZFS datasets/snapshots and, in my case, with the cloud folder within appdata.

If you do not depend on these datasets, you could try to delete them and try it again, but I guess this will do nothing. Maybe the dataset itself needs to be wiped and recreated. It's worth a try. After formatting the pool and recreating everything, it works normally again, knocking on wood.

4 hours ago, sasbro97 said:

@john_smith I have no evidence, but I'm pretty sure it had something to do with ZFS datasets/snapshots and, in my case, with the cloud folder within appdata.

If you do not depend on these datasets, you could try to delete them and try it again, but I guess this will do nothing. Maybe the dataset itself needs to be wiped and recreated. It's worth a try. After formatting the pool and recreating everything, it works normally again, knocking on wood.

How did you determine it was that specific folder? I'm curious to find which is the issue for mine, as I'm also using zfs

  • Author

While trying everything to stop the array, I found some commands that showed me cache/appdata/cloud is busy. As I said, I have no evidence, but I think this could have been the reason.

  • Community Expert
4 hours ago, sasbro97 said:

While trying everything to stop the array, I found some commands that showed me cache/appdata/cloud is busy. As I said, I have no evidence, but I think this could have been the reason.

Like I think I said, if a path is kept open for read by something, it will not allow the array to fully stop. That's why I suggested using lsof /mnt/cache/ which you might have to drill down like lsof /mnt/cache/cloud/ to find out if there is a process open on that folder. Then you can run pkill -9 <PID> to try and stop it.

I did some testing before shutdown and in my case it looks like its the /mnt/user directory for me show up as a loop in the syslog:

root: rmdir: failed to remove '/mnt/user': Device or resource busy

after unmounting it directly (umount -l /mnt/user), the loop blocking stop of the array ended and it stopped

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.