What do you want in a custom unRAID package (BubbaRaid)


Recommended Posts

  • Replies 929
  • Created
  • Last Reply

Top Posters In This Topic

apcupsd question.

 

I just had a powerfailure that lasted for 45 minutes.  This was long enough for my unRAID to cleanly powerdown, but I noticed that the UPS did not turn off, so when the power was restored I had to start the server manually.

 

I got looking into this to see why and think I found a problem with the bubbaRAID install.

 

For the UPS to kill the power lines, you have to tell it to do so.  From the manual you need to insert:

 

    # See if this is a powerfail situation.               

    if [ -f /etc/apcupsd/powerfail ]; then             

        echo                                                             

        echo "APCUPSD will now power off the UPS"                 

        echo                                                           

        /etc/apcupsd/apccontrol killpower                       

        echo                                                           

        echo "Please ensure that the UPS has powered off before rebooting"

        echo "Otherwise, the UPS may cut the power during the reboot!!!" 

        echo                                                             

    fi                                                                 

 

somewhere it will be called if the system is shutdown.  There are a couple places you could put it, in /etc/rc.d/rc.6 so that it is the last thing done before the shutdown happens, or you could put it in the doshutdown script that apccontrol calls when shutting down the computer.

 

This is nowhere in the system that I can find.

 

Secondly, and I"m a little shakey here, the existence of the /etc/apcupsd/powerfail file is used to detect a power failure induced shutdown.  I believe this file is created by apcupsd when it sees a power failure.  However, this file is installed from the flash in /boot/bubba/apcupsd so it will always exist.  I think this is wrong.  Anyone else?

 

With the powerfail file existing, if part one is done, then all shutdowns will cause the UPS to kill the power.  So I think we need to remove powerfail from /boot/bubba/apcupsd and put in the changes to killpower on detection of the powerfail file.

 

Or am I just missing something?

 

thanks,

dave

Link to comment

I did not put the power kill in the script, because on my system, and some others, there is other equip in the same UPS.  In my case, it is a switch.  I also use WOL to wake the unRAID server back up.  Neither of these will work if the UPS powers off.

 

I intend to make a wizard for configuring the UPS daemon, that will give users an option in this regard.

Link to comment

I did not put the power kill in the script, because on my system, and some others, there is other equip in the same UPS.  In my case, it is a switch.  I also use WOL to wake the unRAID server back up.  Neither of these will work if the UPS powers off.

 

I intend to make a wizard for configuring the UPS daemon, that will give users an option in this regard.

 

That makes sense.  I don't mind making my changes, I just use sed commands in go2, but thought others may have a better idea.

 

A setup would be great!

 

thanks,

dave

Link to comment

I'm back again, with more questions about the 'U-notify' script failing.  I saw the posts where people said that the reason the script would fail is that for some reason status of one of the disks was not being reported.  So, I see in the main 'bubba' page of my server, the following message: 3 device(s) active, 0 sleeping, 1 did not return SMART data.

 

That is probably why my u-notify script is failing on one of the drives.  So, does anyone have any idea why 1 of my drives is not returning SMART data?  I can do a 'smartctl --all' for each of my drives and get a report back, so I don't understand why one of the drives wouldn't be reporting SMART data.  Does this make sense to anyone?

 

Thanks,

Chris

Link to comment

I'm back again, with more questions about the 'U-notify' script failing.  I saw the posts where people said that the reason the script would fail is that for some reason status of one of the disks was not being reported.  So, I see in the main 'bubba' page of my server, the following message: 3 device(s) active, 0 sleeping, 1 did not return SMART data.

 

That is probably why my u-notify script is failing on one of the drives.  So, does anyone have any idea why 1 of my drives is not returning SMART data?  I can do a 'smartctl --all' for each of my drives and get a report back, so I don't understand why one of the drives wouldn't be reporting SMART data.  Does this make sense to anyone?

 

Thanks,

Chris

 

The one not returning the smart data is more than likely your flash drive.  I get the same report from BubbaRaid.

Link to comment

The one not returning the smart data is more than likely your flash drive.  I get the same report from BubbaRaid.

 

That makes sense.  So, how do other people deal with this?  Does everyone modify the script itself to put quotes around every variable in case some drive doesn't report any information?

 

Actually, I have three disks in my array, one parity and two data.  Wouldn't those be the three disks?  If the flash drive is reporting as one of the disks, then shouldn't bubba report that there are 4 drives?

Link to comment

well you have a point there

 

I have nine disks (so it should be ten if I count the flash).

 

System reports:

 

2 device(s) active, 7 sleeping, 1 did not return SMART data.

 

Bubba means that you are to have the total of ALL three numbers to get the correct number (inc. your flash).

 

I agree it's easy to misunderstand though.

In fact someone would think that since flash NEVER returns SMART data, it should be removed from the report altogether.

 

 

Link to comment

SMARTHistory is a separate, standalone application.  It is included in BubbaRaid, like NZBGet, etc., but it is not "part" of BubbaRaid.

 

SMARTHistory, being a standalone application, works in any system, not just unRAID.  For that reason, it reports on ALL devices, and can not exclude something specific to unRAID.  The flash *is* a drive.  SMARTHistory can't tell the difference between a flash that doesn't return smart data, and a flakey drive that is also not returning smart data.

 

If you don't want to see results from one device, you can exclude it on the command line or in your config file.

Link to comment

OK clear - but as BubbaRAID is provided as a single package, it could be preset properly for this environment.

 

The provisioning of default setup vs. custom setup during updates (as seen in all the other modules) could be the case with SMARTHistory too. Even more since in both sides is the same developer. :)

 

 

Link to comment

I'm trying to config the apcupsd to work with my apc Backups usb device.  When I try to edit the config file and change the settings to usb, blank out the device type, etc, I get an error when trying to save it, error 122, "An Error occured while trying to save, sorry......FO...Do we have a wizard for this yet?

 

Thanks

Link to comment

Conceptually, the statement below makes sense.  However, I guess I don't understand how anyone reading this thread can use this out of the box.  If the flash drive is a drive and it won't report smart data and drives that don't report smart data cause the unraid notify script to fail, how does anyone get this to work?  Does everyone modify their config file?  Does everyone modify the u-notify script to put quotes around variables?  It just seems odd that it took 50 or so pages of responses before someone figured out that the script could be failing because of a drive not reporting data.  I haven't seen anyone ask about how to modify the config file to exclude their flash drive.

 

I'm not trying to be intentionally obtuse, I just feel like I am missing something obvious that everyone else here understands.  If someone could point me in the right direction, I would appreciate it.

 

Thanks for your help,

Chris

 

SMARTHistory is a separate, standalone application.  It is included in BubbaRaid, like NZBGet, etc., but it is not "part" of BubbaRaid.

 

SMARTHistory, being a standalone application, works in any system, not just unRAID.  For that reason, it reports on ALL devices, and can not exclude something specific to unRAID.  The flash *is* a drive.  SMARTHistory can't tell the difference between a flash that doesn't return smart data, and a flakey drive that is also not returning smart data.

 

If you don't want to see results from one device, you can exclude it on the command line or in your config file.

Link to comment
It just seems odd that it took 50 or so pages of responses before someone figured out that the script could be failing because of a drive not reporting data.

 

SmartHistory and u-Notify are two different applications.  The flash is treated as a drive to SmartHistory.  It is NOT treated as a drive by u-Notify, which only scans the drives assigned to the unRAID array.

Link to comment

I'm trying to config the apcupsd to work with my apc Backups usb device.  When I try to edit the config file and change the settings to usb, blank out the device type, etc, I get an error when trying to save it, error 122, "An Error occured while trying to save, sorry......FO...Do we have a wizard for this yet?

 

Thanks

 

is this the right thread to ask about the apcupsd config error?  If I click on it from the dashboard and just hit the Save button, I get the error 122, without changing anything???  The service also stops running after a short time ,but that is most likely because it isn't configured correctly.

 

Help please.

Link to comment

Yes, stopping after running for a shot initial period is a sign of misconfiguration.

 

I will look into this in the next version.

 

Thanks bubba.  So that would imply that everyone is having this issue where you can't change the configuration and get the error.  Is that correct?

 

BTW, when is the next version coming?  :)

Link to comment

Yes, stopping after running for a shot initial period is a sign of misconfiguration.

 

I will look into this in the next version.

 

Thanks bubba.  So that would imply that everyone is having this issue where you can't change the configuration and get the error.  Is that correct?

 

BTW, when is the next version coming?  :)

 

Nope I have always been able to run u-notify.  I have not had a problem getting it to run and configured.

 

The next version will probably be out when 4.5 becomes stable, although he might release a new BubbaRaid for 4.4.2.

Link to comment

Yes, stopping after running for a shot initial period is a sign of misconfiguration.

 

I will look into this in the next version.

 

Thanks bubba.  So that would imply that everyone is having this issue where you can't change the configuration and get the error.  Is that correct?

 

BTW, when is the next version coming?  :)

 

Nope I have always been able to run u-notify.  I have not had a problem getting it to run and configured.

 

The next version will probably be out when 4.5 becomes stable, although he might release a new BubbaRaid for 4.4.2.

 

S

So you added the missing lib files and corrected the smartdrv info stuff by recompiling or editing the code, right?  Becaues it doesn't work on a fresh install unless you do that.  I don't know how to do that so I'm hoping that a new version that works is released.  Right now, unotify emails aren't working, not even the test ones and based on what I read, the likely cause is the missing lib files and issues with smartdrv being reported.  My ups isn't working either, as I can't change the config, and the apcupsd service quits after a few minutes.  Mine is far from being dialed in, to say the least....  ???

 

help!

Link to comment

So you added the missing lib files and corrected the smartdrv info stuff by recompiling or editing the code, right?  Becaues it doesn't work on a fresh install unless you do that.  I don't know how to do that so I'm hoping that a new version that works is released.  Right now, unotify emails aren't working, not even the test ones and based on what I read, the likely cause is the missing lib files and issues with smartdrv being reported.  My ups isn't working either, as I can't change the config, and the apcupsd service quits after a few minutes.  Mine is far from being dialed in, to say the least....   ???

 

help!

 

There is a package that has to be added for SSL support but after that was added I got everything set up with my gmail account just fine.  I get regular emails from my server about its status throughout the day.

 

As for the apcupsd problem; that I do not have an answer for.  I have always been able to edit the config files and save them so I don't know why it might be causing a problem.

Link to comment

First I'll apologize in case this isn't the best place for my question.  I just stood up my array yesterday and have been searching and searching but I've not been able to find much.

 

I'm running bubbaraid and installed Slimserver.  Slimserver itself installs and runs just fine.  However, I can't point it at anything under the main user share for the library.  It'll use anything on /mnt/disk*, but not /mnt/user.

 

It definitely appears to be a permissions issue.  I can su to the slimserver user and try to access /mnt/user and get the following:

 

root@unARRAY:/mnt# su slimserver

slimserver@unARRAY:/mnt$ ls -al

ls: cannot access user: Permission denied

total 0

drwxr-xr-x  8 root root  0 Apr  1 20:03 .

drwxr-xr-x 16 root root  0 Apr  2 00:55 ..

drwxr-xr-x  3 root root  48 Apr  1 20:03 cache

drwxr-xr-x  5 root root 104 Apr  2 01:21 disk1

drwxr-xr-x  3 root root  48 Apr  1 20:04 disk2

drwxr-xr-x  3 root root  48 Apr  1 19:32 disk3

drwxr-xr-x  3 root root  48 Apr  1 19:32 disk4

d?????????  ? ?    ?      ?            ? user

slimserver@unARRAY:/mnt$ cd user

sh: cd: user: Not a directory

 

So what's up with the perm's on /mnt/user, and how can I fix?  I can access it as root just fine, and as any samba user as well via the share.  I've attempted creating other users locally and they all have the same issue.  I've also tried chmod to 777 with no luck.  I also tried adding the slimserver user to the root group, still no dice.

 

I'm guessing running slimserver as root would solve this, since root can see and access /mnt/user without issue.  But I'm not sure at the moment how to run it as root, and I'm honestly very curious what is causing /mnt/user to behave this way.

 

I'm hoping there is a fix somewhere - I'd really like to split level my music share and have slimserver be able to see it all

 

Any insight or information (or solution!) greatly appreciated.

 

Thanks!

 

-Chris

 

Link to comment

First I'll apologize in case this isn't the best place for my question.  I just stood up my array yesterday and have been searching and searching but I've not been able to find much.

 

I'm running bubbaraid and installed Slimserver.  Slimserver itself installs and runs just fine.  However, I can't point it at anything under the main user share for the library.  It'll use anything on /mnt/disk*, but not /mnt/user.

 

It definitely appears to be a permissions issue.  I can su to the slimserver user and try to access /mnt/user and get the following:

 

root@unARRAY:/mnt# su slimserver

slimserver@unARRAY:/mnt$ ls -al

ls: cannot access user: Permission denied

total 0

drwxr-xr-x  8 root root   0 Apr  1 20:03 .

drwxr-xr-x 16 root root   0 Apr  2 00:55 ..

drwxr-xr-x  3 root root  48 Apr  1 20:03 cache

drwxr-xr-x  5 root root 104 Apr  2 01:21 disk1

drwxr-xr-x  3 root root  48 Apr  1 20:04 disk2

drwxr-xr-x  3 root root  48 Apr  1 19:32 disk3

drwxr-xr-x  3 root root  48 Apr  1 19:32 disk4

d?????????  ? ?    ?      ?            ? user

slimserver@unARRAY:/mnt$ cd user

sh: cd: user: Not a directory

 

So what's up with the perm's on /mnt/user, and how can I fix?  I can access it as root just fine, and as any samba user as well via the share.  I've attempted creating other users locally and they all have the same issue.  I've also tried chmod to 777 with no luck.  I also tried adding the slimserver user to the root group, still no dice.

 

I'm guessing running slimserver as root would solve this, since root can see and access /mnt/user without issue.  But I'm not sure at the moment how to run it as root, and I'm honestly very curious what is causing /mnt/user to behave this way.

 

I'm hoping there is a fix somewhere - I'd really like to split level my music share and have slimserver be able to see it all

 

Any insight or information (or solution!) greatly appreciated.

 

Thanks!

 

-Chris

 

 

If I remember correctly slimserver cannot work the User Shares (i.e. /mnt/user directory).  It is a limitation, especially if you have a music collection on more then one disk, but you may be able to select more then one "music" folder (I have never messed with that.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.