unraid_rclone_mount icon indicating copy to clipboard operation
unraid_rclone_mount copied to clipboard

The mount is making unraid unable to stop array

Open rqi14 opened this issue 4 years ago • 6 comments

I am using unraid 6.8.3

When clicking stop array, the status is stuck at Array Stopping Retry unmounting user share(s)...

there are two issues.

  1. /mnt/user cannot be unmounted by the system. I have to manually do fusermount -uz /mnt/user
  2. The script left an empty folder in /mnt/user0/mount_rclone. The system cannot delete it automatically and thus failed to umount /mnt/user0 as it is not empty.

Please see the log below Feb 13 19:50:21 unraidServer emhttpd: shcmd (545): exit status: 32 Feb 13 19:50:21 unraidServer emhttpd: shcmd (546): rmdir /mnt/user Feb 13 19:50:21 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy Feb 13 19:50:21 unraidServer emhttpd: shcmd (546): exit status: 1 Feb 13 19:50:22 unraidServer emhttpd: shcmd (548): /usr/local/sbin/update_cron Feb 13 19:50:22 unraidServer emhttpd: Retry unmounting user share(s)... Feb 13 19:50:27 unraidServer emhttpd: shcmd (549): umount /mnt/user0 Feb 13 19:50:27 unraidServer root: umount: /mnt/user0: not mounted. Feb 13 19:50:27 unraidServer emhttpd: shcmd (549): exit status: 32 Feb 13 19:50:27 unraidServer emhttpd: shcmd (550): rmdir /mnt/user0 Feb 13 19:50:27 unraidServer root: rmdir: failed to remove '/mnt/user0': Directory not empty Feb 13 19:50:27 unraidServer emhttpd: shcmd (550): exit status: 1 Feb 13 19:50:27 unraidServer emhttpd: shcmd (551): umount /mnt/user Feb 13 19:50:27 unraidServer root: umount: /mnt/user: target is busy. Feb 13 19:50:27 unraidServer emhttpd: shcmd (551): exit status: 32 Feb 13 19:50:27 unraidServer emhttpd: shcmd (552): rmdir /mnt/user Feb 13 19:50:27 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy Feb 13 19:50:27 unraidServer emhttpd: shcmd (552): exit status: 1 Feb 13 19:50:27 unraidServer emhttpd: shcmd (554): /usr/local/sbin/update_cron Feb 13 19:50:27 unraidServer emhttpd: Retry unmounting user share(s)... Feb 13 19:50:32 unraidServer emhttpd: shcmd (555): umount /mnt/user0 Feb 13 19:50:32 unraidServer root: umount: /mnt/user0: not mounted. Feb 13 19:50:32 unraidServer emhttpd: shcmd (555): exit status: 32 Feb 13 19:50:32 unraidServer emhttpd: shcmd (556): rmdir /mnt/user0 Feb 13 19:50:32 unraidServer root: rmdir: failed to remove '/mnt/user0': Directory not empty Feb 13 19:50:32 unraidServer emhttpd: shcmd (556): exit status: 1 Feb 13 19:50:32 unraidServer emhttpd: shcmd (557): umount /mnt/user Feb 13 19:50:32 unraidServer root: umount: /mnt/user: target is busy. Feb 13 19:50:32 unraidServer emhttpd: shcmd (557): exit status: 32 Feb 13 19:50:32 unraidServer emhttpd: shcmd (558): rmdir /mnt/user Feb 13 19:50:32 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy Feb 13 19:50:32 unraidServer emhttpd: shcmd (558): exit status: 1 Feb 13 19:50:32 unraidServer emhttpd: shcmd (560): /usr/local/sbin/update_cron Feb 13 19:50:32 unraidServer emhttpd: Retry unmounting user share(s)... Feb 13 19:50:37 unraidServer emhttpd: shcmd (561): umount /mnt/user0 Feb 13 19:50:37 unraidServer root: umount: /mnt/user0: not mounted. Feb 13 19:50:37 unraidServer emhttpd: shcmd (561): exit status: 32 Feb 13 19:50:37 unraidServer emhttpd: shcmd (562): rmdir /mnt/user0 Feb 13 19:50:37 unraidServer root: rmdir: failed to remove '/mnt/user0': Directory not empty Feb 13 19:50:37 unraidServer emhttpd: shcmd (562): exit status: 1 Feb 13 19:50:37 unraidServer emhttpd: shcmd (563): umount /mnt/user Feb 13 19:50:37 unraidServer root: umount: /mnt/user: target is busy. Feb 13 19:50:37 unraidServer emhttpd: shcmd (563): exit status: 32 Feb 13 19:50:37 unraidServer emhttpd: shcmd (564): rmdir /mnt/user Feb 13 19:50:37 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy Feb 13 19:50:37 unraidServer emhttpd: shcmd (564): exit status: 1 Feb 13 19:50:37 unraidServer emhttpd: shcmd (566): /usr/local/sbin/update_cron Feb 13 19:50:37 unraidServer emhttpd: Retry unmounting user share(s)... Feb 13 19:50:42 unraidServer emhttpd: shcmd (567): umount /mnt/user0 Feb 13 19:50:42 unraidServer root: umount: /mnt/user0: not mounted. Feb 13 19:50:42 unraidServer emhttpd: shcmd (567): exit status: 32 Feb 13 19:50:42 unraidServer emhttpd: shcmd (568): rmdir /mnt/user0 Feb 13 19:50:42 unraidServer root: rmdir: failed to remove '/mnt/user0': Directory not empty Feb 13 19:50:42 unraidServer emhttpd: shcmd (568): exit status: 1 Feb 13 19:50:42 unraidServer emhttpd: shcmd (569): umount /mnt/user Feb 13 19:50:42 unraidServer root: umount: /mnt/user: target is busy. Feb 13 19:50:42 unraidServer emhttpd: shcmd (569): exit status: 32 Feb 13 19:50:42 unraidServer emhttpd: shcmd (570): rmdir /mnt/user Feb 13 19:50:42 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy Feb 13 19:50:42 unraidServer emhttpd: shcmd (570): exit status: 1 Feb 13 19:50:42 unraidServer emhttpd: shcmd (572): /usr/local/sbin/update_cron Feb 13 19:50:42 unraidServer emhttpd: Retry unmounting user share(s)...

rqi14 avatar Feb 13 '21 12:02 rqi14

Having the same issue. Did you figure out a resolution?

Justawebguy avatar May 03 '21 10:05 Justawebguy

I was having the same problem, found a script that southloven posted over on the unraid forums and customized it for my use.

Run "lsof | grep /mnt/user/ " when the array is stuck unmounting disks and customize the script for your needs.

#!/bin/bash

#######################

unmount Script

#######################

Version 0.0.1

#######################

echo "$(date "+%d.%m.%Y %T") INFO: *** Starting rclone_unmount script ***"

umount -l /mnt/user/RcloneRemoteName/RcloneRemoteName umount -l /mnt/user/mount_mergerfs/gdrive_vfs umount -l /mnt/user/mount_mergerfs/RcloneRemoteName umount -l /mnt/user/mount_rclone/gdrive_vfs umount -l /mnt/user/mount_rclone/RcloneRemoteName umount -l /mnt/user0/mount_rclone/cache/RcloneRemoteName umount -l /mnt/user/local/RcloneRemoteName

echo "$(date "+%d.%m.%Y %T") INFO: *** Ending rclone_unmount script ***"

exit

thegreenemachine55 avatar Jun 01 '21 13:06 thegreenemachine55

Same issue here. Confirmed fixed by @thegreenemachine55's suggestion.

I've updated the the unmount script to use the share location variables used in the rclone_mount script and will issue a pull request this weekend.

Torqu3Wr3nch avatar Jun 03 '21 19:06 Torqu3Wr3nch

Same problem here. Can this #30 please get merged?

thekiefs avatar May 01 '22 01:05 thekiefs

@BinsonBuzz Works fine here, should we merge?

NineBall8 avatar Jul 08 '22 18:07 NineBall8

I have the same problem. I used the script, and also added "umount -l /mnt/user0/" but now i stucked in rmdir: failed to remove '/mnt/user0': Directory not empty and rmdir: failed to remove '/mnt/user': Directory not empty

Sildenafil99 avatar Aug 14 '22 18:08 Sildenafil99