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.

Suggestions to help avoid errors

Featured Replies

I had a recent experience where I accidentally assigned a data disk to the parity slot (see http://lime-technology.com/forum/index.php?topic=1483.0).  Although it was totally my fault, I had some ideas that I thought Tom might consider to try and protect us from doing stupid things.

 

1. On the devices page, color code or physically separate the parity disk to make it appear separate and distinct from the data disk slots.  This will make it harder to accidentally assign a data disk to the parity slot.

2. Do not bring the array on line if the parity disk is formatted with a reiser fs.  Add a checkbox or something to allow a user to bypass this check and proceed to build parity on what was previously a data disk.

3. Move the “stop” button far away from the “refresh” button.  I keep the Web GUI up and find myself frequently hitting refresh.  I once accidentally hit stop instead.  It was a pain to recover, as multiple files were being copied to the array at the time.

4. Put an “are you sure” check when stopping the array.  This will prevent accidentally hitting the stop button at an inappropriate time.

 

Please respond with other ideas along this line.

 

I like your ideas... all are easy to add and will help many.  You are not the only person who has stopped the array by mistake.

 

There is one tiny wrinkle to implementing your second suggestion.  It will occur f you only have one data drive with a parity drive configured. 

 

unRaid uses even parity... every bit set to a one on the single data drive will have the same bit on the parity drive set to a one to have an even number of ones.  Every bit set to zero will likewise be set to zero on the parity drive.  You can think of it as an inefficient method of making a mirror image of the data.

 

Therefore... with only two drives... one data, and one parity, the parity drive will always have a reiserfs on it.  You will always need to check the added checkbox.

 

Joe L.

3. Move the “stop” button far away from the “refresh” button.  I keep the Web GUI up and find myself frequently hitting refresh.  I once accidentally hit stop instead.  It was a pain to recover, as multiple files were being copied to the array at the time.

 

 

Just never push it.  Unless I am missing something, your browser refresh button does the same thing and it is nowhere close to the stop button.

 

 

Bill

I too like the ideas.  Bulletproofing ideas are almost always cost-effective for any companies tech support budget.

 

2. Joe is correct here, although this seems to be a special case that Tom could easily detect: 2 drives, one is parity, perhaps a read of first couple of blocks of each to check for mirrored contents.  I would like to expand your idea to more than just finding a Reiser system.  It would be good to warn the user of potential data loss if any usable partition exists, and it would be nice if the partition type could be identified, ReiserFS, FAT32, ext3, NTFS, etc.

 

3. I have to agree about moving the Refresh button.  May I suggest:  to the top right corner, or to the bottom left corner.  As an alternative idea for refreshing, I like using the Firefox plugin Tab Mix Plus 'Reload Tab Every' feature, which lets me easily set an auto-refresh from 5 seconds to 30 minutes.  The 30 minute option is fine most of the time, but when running an operation on the unRAID machine, I change it to 30 seconds or quicker.

 

4. I have mixed feelings about this one, as I live in central Florida, an extremely lightning-prone area, sometimes locally known as the 'lightning capital of the world'.  I have wanted to request an 'Emergency shutdown' button, to avoid the current delays after pressing the Stop button, and waiting for all drives to spin up, before I can finally press the Power down button.  We get very used to hearing thunder in the distance, and tend to ignore it, until a clap happens almost overhead, then rush around getting things shut down.  I hate having to push the Stop button and wait a 1/2 to full minute before I can push the Power down, then rush upstairs to shut down other computers, hopefully before it's too late.  I need a click and go option.  I would also prefer the ability of the Emergency Power down to detect that all drives are spun down, and skip the last sync and spin up and any other drive housekeeping, just power off.

 

Having said that, your idea still has merit for most people.  If the Stop button was positioned carefully (not near other buttons), and had an option for 'Require confirmation', that might be suitable for all of us.  Or place one of the 'Are you sure?' check boxes next to it, as is done elsewhere in unRAID.  It acts like one of those switch covers you have seen in certain movies, in the control room, where you have to remove the cover first before you can get to the big red button.  The addition of a separate Emergency shutdown button positioned safely far away would be really nice for me, and others in similar conditions.

 

  • Author

There is one tiny wrinkle to implementing your second suggestion.  It will occur f you only have one data drive with a parity drive configured. 

 

unRaid uses even parity... every bit set to a one on the single data drive will have the same bit on the parity drive set to a one to have an even number of ones.  Every bit set to zero will likewise be set to zero on the parity drive.  You can think of it as an inefficient method of making a mirror image of the data.

 

Therefore... with only two drives... one data, and one parity, the parity drive will always have a reiserfs on it.  You will always need to check the added checkbox.

 

Wow - nice catch!

 

It's probably worse than that, too.  If you have an odd number of drives, esp if they are the same drive type, it seems likely that the "housekeeping" sectors would be quite similar.  This might produce a parity disk that although it isn't right, that reiserfs might still recognize it as a valid FS.  Maybe Tom has an easy way to tell that we don't know.  After all, he has to confront this problem when someone moves a drive from parity to a data slot.  If the disk has an valid looking format, unRAID would somehow have to know that the disk needed to be reformatted, otherwise very screwy things could start happening if you tried to copy data to it!

 

4. I have mixed feelings about this one, as I live in central Florida, an extremely lightning-prone area, sometimes locally known as the 'lightning capital of the world'.  I have wanted to request an 'Emergency shutdown' button, to avoid the current delays after pressing the Stop button, and waiting for all drives to spin up, before I can finally press the Power down button.  We get very used to hearing thunder in the distance, and tend to ignore it, until a clap happens almost overhead, then rush around getting things shut down.  I hate having to push the Stop button and wait a 1/2 to full minute before I can push the Power down, then rush upstairs to shut down other computers, hopefully before it's too late.  I need a click and go option.  I would also prefer the ability of the Emergency Power down to detect that all drives are spun down, and skip the last sync and spin up and any other drive housekeeping, just power off.

 

I can imagine a disabled "STOP" button with 2 check boxes nearby.  One of the check boxes should say "Enable STOP button".  The other would say "Quick Shutdown".  If you hit the enable button, the "Stop" button would be active.  You could then click it to stop the array.  If you hit the "Quick Shutdown" checkbox, the Stop button would be enabled (maybe it would turn red or something), but would act differently.  It would bring down the array as quickly as possible and then shutdown the machine.  If implemented like this, the STOP button could stay where it is.

 

 

- Brian

 

  • 3 weeks later...

I have wanted to request an 'Emergency shutdown' button, to avoid the current delays after pressing the Stop button, and waiting for all drives to spin up, before I can finally press the Power down button.

 

Script 1 - S30-inittab-powerdown

Called from the /boot/config/go script upon startup.

This changes the ctrl-alt-del functionality to switch from reboot to a halt power down.

It expects the second command to be on /boot as powerdown.

Feel free to adjust.

 

 

 

#!/bin/bash

COMMAND=/sbin/powerdown
INSTALL=1

if [ ${DEBUG:=0} -gt 0 ]
   then set -x -v
fi

if [ -f /boot/powerdown -a ! -f /sbin/powerdown -a "${INSTALL:=0}" -gt 0 ]
   then fromdos < /boot/powerdown > /sbin/powerdown
        chmod u=rwx /sbin/powerdown
fi

if [ -x ${COMMAND} ];then
   if ! grep "${COMMAND}" /etc/inittab > /dev/null ; then
      grep -v 'ca::ctrlaltdel:/sbin/shutdown' < /etc/inittab > /etc/inittab.tmp
      cat <<-EOF >> /etc/inittab.tmp
ca::ctrlaltdel:/sbin/powerdown
EOF
   mv /etc/inittab.tmp /etc/inittab
   /sbin/telinit q
   fi
fi

 

 

Script 2 - Calls to power down the system

You might be able to get away without the sync.

Not sure.

Too bad unraid did not use autofs to mount/unmount filesystems based on usage.

This is how I did it on my backup server which housed 20 drives.

I set autofs to unmount them after an hour of usage.

This way if the system crashed, an fsck may not be needed as some of the filesytems may have been unmounted.

 

 

root@unraid:/boot# more powerdown 
#!/bin/bash

/etc/rc.d/rc.samba stop

/bin/sync

for disk in /mnt/disk*
do  umount ${disk}
done

/root/mdcmd stop

# /sbin/poweroff
/sbin/shutdown -t5 -h now

 

For the record, if you were interested, this could somehow be rigged with the X10 environment to be called from a remote control.

Granted it will require the purchase of some hardware, but none the less, you would have control from a distant location.

 

For my purpose, I purchased a viewsonic V210 airpanel.

it has a browser built in. I turn it on, connect, click click and I'm done.

 

I have another webserver with a menu for calls to ether-wake which allows me to turn the servers on with wake on lan.

 

 

  • Author

I think that this post is in the wrong thread - but thanks for the scripts are very helpful for us unix newbs.  8)

 

To power off safely, I think you need to do three commands:

 

sync

stop

powerdown

 

Would it be hard to mod the ctrl-alt-del script to do those?

Would it be hard to mod the ctrl-alt-del script to do those?

 

The scripts I provided do that.

 

But a lil more.

 

A. There is a script called powerdown (like shutdown)

That

1. stops samba

2. syncs the disks

3. unmounts mounted disks on /mnt

4. calls shutdown with the -h (halt parameter) which should power off the machine (does for me).

 

B. The second script

1. copies /boot/powerdown to /sbin/powerdown

2. modifies the /etc/inittab file to bind ctrl-alt-del to call the /sbin/powerdown script instead of the shutdown command.

 

So now when ctrl-alt-del is pressed, the array will shutdown gracefully rather then reboot.

 

 

of course, that's assuming there's a keyboard and monitor hooked up to and it's not running headless like many of ours are  :D

of course, that's assuming there's a keyboard and monitor hooked up to and it's not running headless like many of ours are  :D

 

yes "of course"

but the question posed was

 

Would it be hard to mod the ctrl-alt-del script to do those?

 

I provided a solution for that. I remember someone asking for a way to do things without having a monitor present.

This allows that "IF" a keyboard is present. (and you are willing to walk up to the keyboard LOL).

 

The powerdown script part of what i provided can also be run via telnet if choosen.

 

 

In my particular instance, I plan to link it in with my X10 system.

Flip a remote control button on my X10 and it will run a the script remotely

 

 

 

I have wanted to request an 'Emergency shutdown' button, to avoid the current delays after pressing the Stop button, and waiting for all drives to spin up, before I can finally press the Power down button.

 

Script 1 - S30-inittab-powerdown

Called from the /boot/config/go script upon startup.

This changes the ctrl-alt-del functionality to switch from reboot to a halt power down.

It expects the second command to be on /boot as powerdown.

Feel free to adjust.

 

code snipped ...

 

Script 2 - Calls to power down the system

You might be able to get away without the sync.

 

I can confirm that the scripts work well.  Thank you very much.

 

I recalled that someone had mentioned a Telnet Scripting tool quite awhile back, and found the thread here:  http://lime-technology.com/forum/index.php?topic=812.0.  That thread just happens to be a way to shut down an unRAID server from a Windows machine using scripted commands and the Telnet Scripting Tool.  So I have combined the work of WeeboTech and adelias in a powerdown 'package' in that thread, where we should probably continue any further discussion related to power down methods. (currently a little slow getting it all written up and posted over there though)

 

For the record, if you were interested, this could somehow be rigged with the X10 environment to be called from a remote control.

Granted it will require the purchase of some hardware, but none the less, you would have control from a distant location.

I do have several boxes of X10 stuff, never unboxed after a move, but don't know if I have the right adapters.  After thinking about it, it seemed easier to setup an icon on my Windows desktops that calls the automated powerdown scripts.  That works fine for now, but I will certainly be interested in whatever you write up as to what is needed to make an X10 / unRAID connection work.

 

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.