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.

Can you schedule drive spinup?

Featured Replies

Without the funds from my wife this year to upgrade my existing setup I am now looking for ways to perfect my existing configuration.  One thing that's always annoyed me was when I got home from work and I turn on the TV and try to use XBMC's file browser it takes a good 30+ seconds for all the drives to spinup.  I would love to have a scheduled script running that spins the drives up at 4:30PM MTWTF and 8:00AM Saturday and Sunday.  Anybody doing something like this now?

I would be interested on doing this too.  For now, I am manually spinning up all the drives right before I settle into my home theater for the evening.

The command to spinup a drive is as follows, where # is the array slot number, starting at 0 for the parity drive. You could create a script consisting of a number of these spinup commands as needed, and then schedule it using cron.

/root/mdcmd spinup #

 

For instance, this will spinup drive slots 1 and 3

/root/mdcmd spinup 1
/root/mdcmd spinup 3

 

Thanks BRiT.

 

I will read up on cron and hopefully don't have to manually spin up my drives anymore.

I personally run the cache_dirs script. It keeps all your drives contents cached in memory so when you click around it appears to be looking through your files without actually spinning up your drives. When you click on something there is a quick delay and it launches, but you have the advantage of low power usage and quick viewing.

 

Unless of course you have a very specific reason for wanting your drives up and running then my suggestion is a moot one.  ;D

I also have the cache_dirs running and it is great for browsing the directories when the drive are spun down.  However, there is a delay of a few seconds when I actually try to launch a media file.  Which is fine at the start of a movie.

 

However, sometime if I resume a previously watched movie, some of the content in is still in RAM and so the movie starts immediately.  But then it would pause a few seconds to spinup the drive when more data is needed and so the movie pauses a few seconds which becomes very annoying.

OK this is what I plan to do, please advise if I missed something:

 

01. Create a /boot/custom/bin directory

 

02. Create a script file, /boot/custom/bin/spinup_drives.sh, to spin up the drives as follows:

#!/bin/bash

/root/mdcmd spinup 2
/root/mdcmd spinup 3
/root/mdcmd spinup 4
/root/mdcmd spinup 5
/root/mdcmd spinup 6
/root/mdcmd spinup 7
/root/mdcmd spinup 8
/root/mdcmd spinup 10
/root/mdcmd spinup 11
/root/mdcmd spinup 12
/root/mdcmd spinup 13

 

03. Add the following lines to the end of my go script:

#Schedule daily spinup of drives

# Extract root's crontable. Removing any prior spinup calls. 
crontab -u root -l | grep -v /boot/custom/bin/spinup_drives.sh > /tmp/crontab.root

# Append new entries to root's crontable
cat <<-EOF >> /tmp/crontab.root
# Daily Automatic /sbin/powerdown
00 19 * * * /boot/cutsom/bin/spinup_drives.sh
EOF

# Update root's crontable.
crontab /tmp/crontab.root -u root

rm /tmp/crontab.root

 

04. Currently the permission on the /boot/custom/bin/spinup_drives.sh is 777.  Should I change it to something else?

 

05. I would like to add something so that an entry is made in the syslog to let me know that it is scheduled and when it is executed daily, unless the mdcmd spinup will automatically log an entry.

The update commands will add log entries of their own.

 

Looks good.

 

Joe L.

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.