Jump to content

[SOLVED] MySQL creates /mnt/disk1 with test database on start? (5.0b12a)


Recommended Posts

I've been researching all weekend, and I have not been able to come up with a solution to my problem.  It's almost as if MySQL starts up before the array is online.  Here is what happens on bootup:

 

* MySQL starts and make a temp database on /mnt/disk1

* UnRAID does not start the array, nor provides any errors

 

I then telnet in and kill mysqld, start the array manually, and then restart mysqld.  Everything works 100% after I do this.  MySQL starts and attaches to the correct /mnt/disk1/mysql (not the fake or virtual one) and I cannot seem to find a solution to having the array start up first and then MySQL startup and access the database on /mnt/disk1/mysql :(

 

I am running the latest unraid beta.

 

ADDED: Guess I have balls going full production on 5.0b12a with many terabytes of data?  :)

 

ADDED2: Just purchased 2 x Pro licenses tonight... GO GO GO!

 

ADDED3: I have 10 x Samsung F4 2TB with firmware updates ready to blow up ASAP - LOL!  Running on 3 for about a week with 5 clients and no problems besides my perpetual MySQL issue.

 

SOLUTION  (Updates to /flash/config/go file):

 

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

# Start the array
echo "Starting the array"
sleep 5
/usr/bin/wget -q -O - localhost/update.htm >/dev/null
/usr/bin/wget -O - --post-data 'startState=STOPPED&cmdStart=Start' localhost/update.htm >/dev/null

# Wait for disk1 of the array to come online
while ! test -d /mnt/disk1;do sleep 5;done;sleep 5

# Start unmenu
/boot/unmenu/uu

# Start Addon Packages
cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

Link to comment

I've been researching all weekend, and I have not been able to come up with a solution to my problem.  It's almost as if MySQL starts up before the array is online.  Here is what happens on bootup:

 

* MySQL starts and make a temp database on /mnt/disk1

* UnRAID does not start the array, nor provides any errors

 

I then telnet in and kill mysqld, start the array manually, and then restart mysqld.  Everything works 100% after I do this.  MySQL starts and attaches to the correct /mnt/disk1/mysql (not the fake or virtual one) and I cannot seem to find a solution to having the array start up first and then MySQL startup and access the database on /mnt/disk1/mysql :(

 

I am running the latest unraid beta.

 

ADDED: Guess I have balls going full production on 5.0b12a with many terabytes of data?  :)

 

ADDED2: Just purchased 2 x Pro licenses tonight... GO GO GO!

 

ADDED3: I have 10 x Samsung F4 2TB with firmware updates ready to blow up ASAP - LOL!  Running on 3 for about a week with 5 clients and no problems besides my perpetual MySQL issue.

Before allowing mysql to start you need to check for the existence of (in your case) /mnt/disk1.

Link to comment

Is there a way to move the execution of "mysql-unmenu-package.conf" to the end of the startup process?

there is more than likely a way to delay the install and start. I have not looked at that package so can’t be sure.  If you look at any of mine and can understand what I am doing you should be able to adapt it into the mysql-unmenu-package.conf file.

Link to comment

Is there a way to move the execution of "mysql-unmenu-package.conf" to the end of the startup process?

easiest, before the line in the "go" script finding and invoking all the auto_install files, put this line:

 

while ! test -d /mnt/disk1;do sleep 10;done;sleep 10

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

 

Link to comment

Wow, that did the trick - thanks for the help!  I think I now see what the problem is:

 

Beta 5.0b12a is not auto starting the array.  The modified go script hangs and waits for me to press START on the array and then MySQL mounts correctly and all is well.  Any tips on the 5.0b12a auto start issue?

Link to comment

Wow, that did the trick - thanks for the help!  I think I now see what the problem is:

 

Beta 5.0b12a is not auto starting the array.  The modified go script hangs and waits for me to press START on the array and then MySQL mounts correctly and all is well.  Any tips on the 5.0b12a auto start issue?

Yeah, enable auto start in the unRAID webGUI.  You can find it in Settings -> Disk Settings.

Link to comment

Ok, thanks again for the help.  I'm an UnRAID noob, but I believe I will have everything 100% once I get the auto-start going.

 

Originally I was going to run on Intel Matrix RAID, but my Samsung F4's were having fits with it.  I was just about to switch to an LSI SAS controller with SF8282 breakout cables - but I realized that the chances were good my F4's wouldn't play nicely with dedicated hw RAID either.

 

I'm up to 6 x Samsung F4 2TB drives online and they seem to be holding out just fine so far.  ;D

Link to comment

See the beta12a announcement thread.  I put some code in there that may work.  I use it on a beta6a machine without issue.

 

I just browsed what I thought was the entire B12A announcement thread and couldn't find the code you are talking about.  Can you point me in the right direction?

 

ADDED: Disregard.

 

# Start the array

echo "Starting the array"

sleep 30

/usr/bin/wget -q -O - localhost/update.htm >/dev/null

/usr/bin/wget -O - --post-data 'startState=STOPPED&cmdStart=Start' localhost/update.htm

sleep 120

Link to comment

Why the massive delays on this script?

 

ADDED: And why not > /dev/null the second line?  It just pumps the HTML results to the console as it is.

 

ADDED 2: It works :)  Thanks for the tips.  Going to reduce the delays I think.

It can easily take several minutes for the array to come online.  Do as you wish, but be aware of what can happen if you start some processes before the disks and file-systems are mounted.
Link to comment

The following is working 100% for me:

 

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

# Start the array
echo "Starting the array"
sleep 5
/usr/bin/wget -q -O - localhost/update.htm >/dev/null
/usr/bin/wget -O - --post-data 'startState=STOPPED&cmdStart=Start' localhost/update.htm >/dev/null

# Wait for disk1 of the array to come online
while ! test -d /mnt/disk1;do sleep 5;done;sleep 5

# Start unmenu
/boot/unmenu/uu

# Start Addon Packages
cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

Link to comment
  • 4 weeks later...

The following is working 100% for me:

 

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

# Start the array
echo "Starting the array"
sleep 5
/usr/bin/wget -q -O - localhost/update.htm >/dev/null
/usr/bin/wget -O - --post-data 'startState=STOPPED&cmdStart=Start' localhost/update.htm >/dev/null

# Wait for disk1 of the array to come online
while ! test -d /mnt/disk1;do sleep 5;done;sleep 5

# Start unmenu
/boot/unmenu/uu

# Start Addon Packages
cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

 

This worked for me as well.. I was having an issue of losing the databases after restart and this worked like a charm.. thanks!!!

Link to comment

Archived

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

×
×
  • Create New...