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.

Unclean shutdown: what to do on reboot

Featured Replies

I needed to shutdown my unRAID system (4.4.2) in order to fix an ethernet

card which had fallen out of its slot. I used the web gui to stop the

array, but this did not work cleanly because one of the disks could not

be unmounted. (All of the other disks unmounted cleanly.) The was because

a stuck process was using a file or directory on the disk. I suspect

the process was stuck because of some file system issue because the

syslog recorded reiserfs warnings on the disk the process was accessing

on the the same day that the process was started.  Eventually I had to

run poweroff to stop the system.

 

This suggests that I should use reiserfsck to check the disk that could

not be unmounted. I assume that I need to wait until the parity checking

process on the array is complete before I do this. I assume that while the

parity checking process is running, there will be no access allowed to

the disk file systems. Therefore I should let the system boot normally and

let the array start automatically and complete the parity checking process

before I start reiserfsck. However, the super-cautious sysadmin in me says

to boot into single user mode and run parted -l to see whether the

cleanly unmounted disks have valid partition tables. Is this advisable?

Is it possible?

I needed to shutdown my unRAID system (4.4.2) in order to fix an ethernet

card which had fallen out of its slot. I used the web gui to stop the

array, but this did not work cleanly because one of the disks could not

be unmounted. (All of the other disks unmounted cleanly.) The was because

a stuck process was using a file or directory on the disk. I suspect

the process was stuck because of some file system issue because the

syslog recorded reiserfs warnings on the disk the process was accessing

on the the same day that the process was started.  Eventually I had to

run poweroff to stop the system.

Understood

 

This suggests that I should use reiserfsck to check the disk that could

not be unmounted.

Probbly not, not unless it was corrupted to start with.  The file-system is able to recover nicely in most situations from its transaction journal
I assume that I need to wait until the parity checking

process on the array is complete before I do this. I assume that while the

parity checking process is running, there will be no access allowed to

the disk file systems.

Not true, as it occurs below the file-system level.  You can run the file-system check as described in the wiki even while the parity check is ongoing.
Therefore I should let the system boot normally and

let the array start automatically and complete the parity checking process

before I start reiserfsck. However, the super-cautious sysadmin in me says

to boot into single user mode and run parted -l to see whether the

cleanly unmounted disks have valid partition tables. Is this advisable?

No, not needed and the odds of you making it far worse is high.  You need to let the MD driver take control of the disks as usual and go from there.  If a file-system is un-mountable, unRAID will tell you.  Just be forwarned, it will probably say it is un-formatted if it is unable to mount it. 

DO NOT PRESS THE FORMAT BUTTON.  DO NOT PRESS THE REFRESH BUTTON (if you have one).

Post a syslog if you find anything abnormal.  unRAID will do a full parity check since you did not cleanly shut down. 

 

Consider installing the "powerdown" package as written by WeeboTech, or the unMENU add-on.  Either would have given you the ability to stop the array cleanly.  Either would have killed off the process keeping the disk busy as part of its shutdown processing.

 

Joe L. 

  • Author

Thank you for the clarification. Just one point. I did install the powerdown package, run it, and it was not able to kill the stuck process.

 

I will now restart the machine with more understanding of what will happen.

Thank you for the clarification. Just one point. I did install the powerdown package, run it, and it was not able to kill the stuck process.

 

I will now restart the machine with more understanding of what will happen.

If you just typed "powerdown" you would have invoked the command added by lime-technology in recent versions.  All it does is attempt to press the button on the web-interface.   You would have gotten it instead of the add-on package you installed since it is first in the search path and has the same name.  The "button" on the web-interface will not stop process that are accessing disks.  It will loop forever waiting for them to terminate on their own.  Furthermore, if the web-interface is non-responsive, the attempt to press the button will do nothing.

 

If you invoked the add-on "powerdown" command with a full (and explicit) path as:

/sbin/powerdown

you would have gotten WeeboTech's version that does kill process holding disks busy..  It should be able to cleanly stop the server.

 

There are times when it will not work either, but in those situations the out-of-memory kennel process is killing everything it thinks it can, and often will not let any script complete.  In those situations, the only thing you can do is issue the individual commands:

 

Stop SAMBA from accessing the disks.

/root/samba stop

 

Kill processes accessing the disks. Type the:

fuser -k /dev/mdX

command and let it kill the processes on disk /dev/mdX   (where X = 1 through 19)

 

Then un-mount each of the disks

umount /dev/md1

umount /dev/md2

etc...

 

Lastly, stop the array

/root/mdcmd stop

 

Then power off by typing

poweroff

 

 

 

 

ReiserFS is a journaling file system, so you do not need to run 'reiserfsck' after unclean shutdown.

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.