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.

unraid server log tail process preventing /user unmount

Featured Replies

Hi!

  This has been going on for a while, but I've just been living with it--but it needs to be fixed.

When I try to stop the array, I'm getting stuck on the retry unmounting user share(s) message. When I look in the log, I get this:

Jan  7 00:31:45 unServer emhttpd: shcmd (1843561): exit status: 1
Jan  7 00:31:45 unServer emhttpd: shcmd (1843563): /usr/local/sbin/update_cron
Jan  7 00:31:45 unServer emhttpd: Retry unmounting user share(s)...
Jan  7 00:31:50 unServer emhttpd: shcmd (1843564): /usr/sbin/zfs unmount -a
Jan  7 00:31:50 unServer emhttpd: shcmd (1843565): umount /mnt/user
Jan  7 00:31:50 unServer root: umount: /mnt/user: target is busy.
Jan  7 00:31:50 unServer emhttpd: shcmd (1843565): exit status: 32
Jan  7 00:31:50 unServer emhttpd: shcmd (1843566): rmdir /mnt/user
Jan  7 00:31:50 unServer root: rmdir: failed to remove '/mnt/user': Device or resource busy

and when running lsof:

root@unServer:~# lsof | grep /mnt/user
tail       7695                       root    1w      REG               0,39   139995 10414574175015971 /mnt/user/Logs/unServer-syslog-2024-12-29T043441

 

Now, I have a Logs directory set to cache -> disk that I use as the log server storage location for other network devices, but it seems that pointing the unraid syslog at that directory is killing me here. I don't want to pile logs onto the Flash, so what's the best way to handle this issue?

 

Manually stopping the array with a kill  command works, but I need the shutdown process to work when triggered by the UPS.  Much appreciated!!

 

 

Solved by uiuc_josh

  • Community Expert

I cannot reproduce when saving the log to a zfs pool, are you saving to the array or a pool?

  • Author

JorgeB,

  It saves to the cache pool (old btrfs pool), with the mover pushing files to the array. 

image.thumb.png.a5429b817c14b3f5bc7b66858a369471.png

 

 

  • Community Expert

And the pool is still btrfs correct?

  • Author

Yes, it's still a btrfs cache pool.

  • Community Expert

Also cannot reproduce with a btrfs pool, does that happen every time you stop the array? Also, what release are you running?

  • 2 weeks later...
  • Author
  • Solution
On 1/9/2025 at 12:23 PM, JorgeB said:

Also cannot reproduce with a btrfs pool, does that happen every time you stop the array? Also, what release are you running?

 

I'm running 6.12.14. The issue was nearly every time, but I finally found the culprit. I'd (some time ago) put a user script to copy the log to the array so I didn't lose the log on a crash.

It started on array start, but I guess I didn't make it stop when the array stopped...

 

#!/bin/bash

FILENAME="/mnt/user/Logs/unServer-syslog-$(date +%FT%H%M%S)"
tail -f /var/log/syslog > $FILENAME

 

So I killed that, and I think that's my issue. 

Is there a best practice for writing system logs to the array so you're not killing the flash drive?

  • Community Expert
42 minutes ago, uiuc_josh said:

Is there a best practice for writing system logs to the array so you're not killing the flash drive?

Setup syslog server

  • Author
28 minutes ago, trurl said:

Oof. RTFM, indeed. Extra stupid thing is that I'd enabled syslog server for my firewall and voip. Just never got rid of the manual tail process script b/c I didn't realize the server logs were going to the same place. 

 

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.