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.

Open files lock array stop.

Featured Replies

unRAID OS Version: 6.0-beta6

 

Description: If a process holds any open file handles for files on an array disk, the Stop command will never complete.

 

How to reproduce:

login to console or telnet session, type:

cd /mnt/disk1/somedir

 

Now try to Stop - it won't.

 

Other information:

Maybe implement something like Windows shutdown screen asking user to whether to force Stop (by killing processes).

I would suggest any solution to this defect would contain a number of options to help reduce the risk of data loss:

 

1. Via the web GUI present users with information to help them locate the lock for a manual fix i.e. process information.

2. Via the web GUI present users with the option to kill specific processes that are causing the lock (with appropriate warnings)

3. Your "implement something like Windows shutdown screen " solution above

 

A critical change is that emHTTP should not try to stop the array if detectable locks exist. If an array stop is requested and locks exist the user tools listed above should be made available with an error message but the array stop should not be instigated.

 

If by chance the array stop happens at the instant after the lock detection has completed and also after a new lock has started, emHTTP should not, as it currently does, go into an infinite loop trying to stop the array; rather it should immediately return to normal operation and present the options above.

How does this concept, of prompting user to take some action, fit with the idea of a comprehensive powerdown script tied to a UPS?

 

Power fail => server running on battery => array can't stop => ??

I would think that an forced shutdown is an unavoidable consequence of a serious power loss event. In an ideal world we would never have file locks or we could inform users that a shutdown is being prevented and intervention is required but I would not over complicate it.

 

In the event of a serious power loss event a forced shutdown is the lesser of two evils (better some broken file locks than some broken disks).

 

There is little point complicating the process by asking users to intervene as in a home/SOHO environment its likely the devices they need to use to access unRAID to intervene will not all be available.

 

I would however suggest that we log the locks/files carefully so that users can at least test after the fact.

What about some check box that enables a forced shutdown.

 

emhttp can loop for some externally defined number of seconds and after that start doing the forced kills

Just as unix does when a shutdown is initiated. A kill is issued(sigterm), a wait and another forceable kill (sigkill) is issued.

 

My only concern would be to use the standard sigterm first and if that fails within a time period, then use sigkill.

 

This is what the powerdown package has been doing all this time as a last resort.

 

Since we have events, the shutdown needs to go through the process and trigger the events to 'try' and do a graceful shutdown.

 

if force is enabled, then doing the timeout, sigterm, timeout sigkill is needed.

  • 1 year later...

Sorry, has there been any further development on this?

I am on 6.1.6, I have the powerdown package installed and also the openfiles plugin - but it seems to be to no avail: Whenever Unraid stumbles and I need to reboot, both packages don't do the job (sigkill fails); the files remain open (smbd) and all I can do is an unclean shutdown.

Given the wear on the HDs afterwards for the parity check, I am having those way too often.

Thanks for any help with this, I do appreciate the effort.

 

Archived

This topic is now archived and is closed to further replies.

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.