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.

Attempting to stop array for the last 2 hours... zfs pool is busy?

Featured Replies

Solved by JorgeB

On 2/6/2025 at 4:33 PM, JorgeB said:

That's not what I'm asking, I'm asking to disable the docker service, start the array and then see if it stops.

Ok, now I tried what you said:

1. Stopped VM service

2. Stopped Docker service

3. Forced reboot

4. Started the array and DID NOT started VM and docker services

5. Stopping the array was successfull...

 

But I do not know what to do now ;-) 

46 minutes ago, independence said:

But I do not know what to do now ;-)

In my case I restart emhttpd and install the „shell stop“ plugin. Since then I do not have any issues stopping the array. 
But thats more like symptom supression than cause control. I'm not really satisfied, but it does what it's supposed to

The "Shell Stop" Plugin of Dynamix was already installed. I will try to restart emhttpd

14 minutes ago, independence said:

The "Shell Stop" Plugin of Dynamix was already installed. I will try to restart emhttpd

I only did this so that I didn't have to force a restart while stopping the array. In operation, I wouldn't just do it like that

  • Community Expert
15 hours ago, independence said:

But I do not know what to do now

Enable the VM service and retest, if still OK, enable the docker service (but leave all containers off) and retest, if still OK, start enabling the containers one by one and retesting each time.

  • 2 weeks later...

I did what @JorgeB said and it looks like I found the 2 (!) Containers which cause the problem. 

- Krusader

- Synology DSM

 

If those containers are stopped, the array is able to stop, too. 

Synology is not really necessary for me anymore but I´m using Krusader sometimes. I will try to reinstall Krusader and check if that will help.

  • Community Expert
14 minutes ago, independence said:

I will try to reinstall Krusader and check if that will help.

It could be the container mappings.

Yes, that will absolutely be the problem - the mappings in krusader are:

 

image.png.5a827a3394bc5ac9db0bc8bfe4a93b39.png

 

I watched a video as I installed Krusader where these mappings were suggested.

  • 1 month later...

Back again.

Now I stopped stopped docker service and vm mananger and after that the array does not stop. So I think it has nothing to do with the services. Correct me, if I'm wrong.

When I start it an stop it like 2 h later it works great. Only if I want to stop it after about a week it hat no desire.

I installed the zfs master plugin to see some snapshots. This one was huge!

grafik.thumb.png.94b742cd81d334de96cdc36e6517a0ba.png

There are like 500-700 more lines. Does this look normal? The docker storage is set to native. This was recommended to me here in the forum.

The server exists only for about four month and I have about 40 dockers.

The command

zfs list -r cache

also shows all of these entries from above.

I clean my server about every two weeks and shut it down for this purpose.

It's never worked before for the server to shut down without errors after a few minutes. It always freezes at the exact same point.

I've already tried the usual suspects, like

fuser -mv /mnt/cache
lsof /mnt/cache

If I boot in safe mode, I can start and stop the array normally. I haven't tried it for a period longer than a week yet.

What is the best way to proceed, considering that the error only occurs after a certain amount of time?

 

 

Is there anything I can do to prevent this, like stopping before the array, to see if it will work? I'm currently trying a script that prepares everything, but it's not working. I keep getting the same error.

#!/bin/bash

echo "Starting array shutdown script..."

### 1. Unmount all SMB (CIFS) shares mounted on this server
echo "Unmounting all SMB (CIFS) shares mounted on this server..."

mount | grep -i cifs | awk '{print $3}' | while read -r share; do
    if [ -n "$share" ]; then
        echo "Unmounting $share"
        umount "$share"

        # Check if unmount was successful
        if mountpoint -q "$share"; then
            echo "Failed to unmount $share. Forcing unmount..."
            umount -l "$share"
        fi
    fi
done

### 2. Stop all Docker containers
echo "Stopping all Docker containers..."
docker ps -q | xargs -r docker stop

### 3. Terminate SSH sessions accessing the array
echo "Terminating SSH sessions accessing the array..."

# Get the PID of the current script to avoid killing itself
current_pid=$$

pids=$(lsof -t /mnt/disk* /mnt/user* 2>/dev/null | grep sshd | uniq | grep -v "^${current_pid}$")

if [ -n "$pids" ]; then
    echo "Terminating SSH sessions with PIDs: $pids"
    echo "$pids" | xargs -r kill
else
    echo "No SSH sessions accessing the array found."
fi

### 4. Close any open files on the array
echo "Closing any open files on the array..."

pids=$(lsof -t /mnt/disk* /mnt/user* 2>/dev/null | uniq | grep -v "^${current_pid}$")

if [ -n "$pids" ]; then
    echo "Terminating processes with PIDs: $pids"
    echo "$pids" | xargs -r kill
else
    echo "No processes accessing the array found."
fi

### 5. Stop VMs
echo "Stopping all VMs..."

virsh list --name | while read -r vm; do
    if [ -n "$vm" ]; then
        echo "Shutting down VM: $vm"
        virsh shutdown "$vm"

        # Initialize countdown
        max_wait=150  # Maximum wait time in seconds
        interval=10   # Interval between checks
        elapsed=0

        while [ $elapsed -lt $max_wait ]; do
            sleep $interval
            elapsed=$((elapsed + interval))
            echo "Checking if VM '$vm' has shut down... (Elapsed: ${elapsed}s)"

            if ! virsh list --name --state-running | grep -qw "^${vm}$"; then
                echo "VM '$vm' has shut down gracefully."
                break
            fi
        done

        # After timeout: force shutdown
        if virsh list --name --state-running | grep -qw "^${vm}$"; then
            echo "VM '$vm' did not shut down in time. Forcing shutdown..."
            virsh destroy "$vm"
            sleep 5

            if ! virsh list --name --state-running | grep -qw "^${vm}$"; then
                echo "VM '$vm' has been forcefully terminated."
            else
                echo "Failed to forcefully terminate VM '$vm'. Manual intervention may be required."
            fi
        fi
    fi
done

### 6. Stop SMB services
echo "Stopping SMB services..."
/etc/rc.d/rc.samba stop

### 7. Stop NFS services
echo "Stopping NFS services..."
/etc/rc.d/rc.nfsd stop

### 8. Stop additional services (optional)
echo "Stopping additional services..."
# Example: /etc/rc.d/rc.plexmediaserver stop

Is this a known problem with any plugin?

  • Community Expert
29 minutes ago, Xerxes said:

There are like 500-700 more lines. Does this look normal? The docker storage is set to native. This was recommended to me here in the forum.

The server exists only for about four month and I have about 40 dockers.

Since 7.0 we recommend suing overlay2, if you upgrade to 7.1 and delete the current docker folder, it will get rid of all those legacy datasets.

44 minutes ago, JorgeB said:

Since 7.0 we recommend suing overlay2, if you upgrade to 7.1 and delete the current docker folder, it will get rid of all those legacy datasets.

Do you think it's related to that?
When I have a minute, I'll try to change it

  • Community Expert
11 minutes ago, Xerxes said:

Do you think it's related to that?

Could be, and even if it isn't, docker folder with native zfs is not recommended, so I would recommend changing it anyway, and personally, I don't recommend any kind of docker folder, as I often see users with weird issues when using them, but if you want to use one, use it with the overlay2 driver.

  • Community Expert
8 hours ago, JorgeB said:

I don't recommend any kind of docker folder

I think many do this because they don't know why they are filling docker.img

On 7/11/2023 at 4:16 AM, JorgeB said:

You can update to v6.12.3-rc2 to test, should be fixed, need to switch to the next branch.

This is marked as solution, but Im having exact same problem on 6.12.6

  • Community Expert
19 hours ago, moosehunter said:

This is marked as solution, but Im having exact same problem on 6.12.6

Update to latest stable, and if you still have the issue, recommend starting a new thread.

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.