LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2011, 08:35 AM   #1
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Rep: Reputation: 15
Move mysql stuff to hda1 (mineos(tinycorelinux)) and auto reboot on crash


ok im attempting to run a minecraft server on mineos (which is based on tinycorelinux)

on certain files and folders persist from one reboot to another, i added myql to it and by default it puts the following files
Databases stored in /usr/local/var/mysql
Config file /usr/local/etc/my.cnf

the advice from the creator of mineos is
Quote:
move the relevant files/dirs

/usr/local/var/mysql
/usr/local/etc/my.cnf

to somewhere on your /mnt/hda1. doesnt matter where, but choose an appropriate place.

then, symlink it:

ln -sf /mnt/hda1/database/mysql /usr/local/var/mysql
ln -sf /mnt/hda1/database/my.cnf /usr/local/etc/my.cnf

or better yet:
add these symlink commands to your /opt/bootlocal.sh so on every reboot they are recreated (this is recommended over saving it to filetool.lst). Since its on the HD, it'll always be current, regardless of reboots and filetool.sh saves, and you will have the symlinks on each reboot, so you can just one-and-done it.
but i have no idea how to do that or where to even begin looking!
to me it would seem a better solution would be to tell mysql to save its databases and config file in hda1:/mysql rather then using symlinks(google pretty much describes thema s the same as windows shortcuts)


thats problem 1

problem 2,

the server will be running in a vmware machine which i will not have physical access to (a mate is running it on a true server pc) with putty and winscp this is not a problem 99% of the time BUT its crashed twice and on the screeen to fthe machine was what looked like a load of memory addresses and it could no longer be accessed by putyy or winscp i had to reset it
Im guessing that was tinycorelinux version of windows BSOD can i tell it to reset itself should that happen (in the same way you can have windows reset if it bsods)?


thnx in advance
 
Old 02-15-2011, 01:42 PM   #2
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Original Poster
Rep: Reputation: 15
im guessing tinylinuxcore is not widely used

how would i do this in another linux? maybe the commands are the same

if it helps to edit files i have to type nano and to download mysql i had to type ab mysql.tzx (then pick it from the menu) then bizzarely and counter intuitively i had to press q then i (this is not a noob friendly os)

please help
 
Old 02-16-2011, 08:10 AM   #3
mrgreaper
Member
 
Registered: May 2006
Posts: 167

Original Poster
Rep: Reputation: 15
please i really need some help

i havent just sat here waiting
i tried mv /usr/local/var/mysql /mnt/sda1/database/mysql ...cant rename no such file or folder (there bleeping hell is!)

so i go and create the database folder with mkdir
and then try again
mv: cant preserve ownership of `/mnt/sda1/database/mysql' operation not permited
(one for each file

so i tryed sudo in front of it all ....cant rename .... no such file (arghhhhhhhh)

i have also tried over other option that pops up when you do ab mysql.tcz at one point it downloaded them but refused to install as they were already downloaded

i have googled tiny core linux mysql databse move all the threads i read were no where near what i need
i tried tinycore linux custom install database again nothing of relevence

im at my wits end here i have spent hours trying to fix this, please please please help!


**clarification was hda1 but in my attempts to get this to work i so corrupted the virtual machine i had to reinstall this time i tryed a serial virtual hd instead of a ide one in the hopes that would be the magic key to getting this to work**

Last edited by mrgreaper; 02-16-2011 at 09:24 AM.
 
Old 03-10-2011, 04:21 PM   #4
wfinden01
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 1
Hello

If you still need help with this

I did get it to work, thought in a roundabout way

what is did is i created a script file in /mnt/hda1/ and called it mysql_set.sh
this is what it contains
Code:
!/bin/sh
# put other system startup commands here
sudo rm -r /usr/local/var/mysql/
sudo rm /usr/local/etc/my.cnf

# change hda1 to whatever drive that the file are stored one
# eg if you have it stored on sda1 then it will be this
# ln -sf /mnt/sda1/database/mysql /usr/local/var/mysql

ln -sf /mnt/hda1/database/mysql /usr/local/var/mysql
ln -sf /mnt/hda1/database/my.cnf /usr/local/etc/my.cnf
I then add this to the bootlocal.sh file in /opt/
such that the file now looks like this
Code:
#!/bin/sh
# put other system startup commands here
mnt/hda1/mysql_set.sh
To quickly explain it
When tinycorelinux loads up it create all the directory in the ram this includes the
/usr/local/var/mysql/
and
/usr/local/etc/my.cnf

and as far as i know you can't put symlink to it if it already exist
Therefore I removed them at startup, then symlink them in to where i removed them
from

Hope this helps

P.s I have only just started using tinycore linux

Last edited by wfinden01; 03-10-2011 at 06:00 PM.
 
Old 03-10-2011, 04:38 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I'm not at all familiar with what it is that you're doing , but you may have conflicting addresses:
Quote:
ln -sf /mnt/hda1/database/mysql /usr/local/var/mysql
ln -sf /mnt/hda1/database/my.cnf /usr/local/etc/my.cnf
Quote:
mv: cant preserve ownership of `/mnt/sda1/database/mysql' operation not permited
(one for each file
 
Old 03-10-2011, 05:06 PM   #6
wfinden01
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 1
Can you just explain what you mean by "conflicting addresses" (is newish to linux, been using on and off for 3 years)
but currently I have no problems

Quote:
mv: cant preserve ownership of `/mnt/sda1/database/mysql' operation not permited
(one for each file
I had no problems with that, I stopped the MySQL server before moving them, I also moved them as root

One difference is I am running a clean non-remaster version of tinycore, compared to the orginal problem of "mrgreaper" tincore OS being tinecore re-masted as "MineOS" to support Minecraft server

edit:
--------------------------------------------------------------------------------------------------
My friend was running MineOS for a while, until we started having some issues with it, and then we moved it to another distribution

I have had tinycore crash on me (that was prior to moving it to the databases and htdocs to HDD, tinycore doesn't run to well if you exceed the amount of ram you have and swap)

Last edited by wfinden01; 03-10-2011 at 05:34 PM.
 
Old 03-10-2011, 05:25 PM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
@wfinde01 Are you the original poster?
 
Old 03-10-2011, 05:32 PM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I take this to mean you're not the original poster & your script is most likely the solution that the op needs. What I pointed out on conflicting addresses or devices, I highlighted in red.
Quote:
One difference is I am running a clean non-remaster version of tinycore, compared to the orginal problem of "mrgreaper" tincore OS being tinecore re-masted as "MineOS" to support Minecraft server
 
Old 03-10-2011, 05:44 PM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
@winfind01 I could be wrong though as I see you have the same device names, so I see why you may have been offended by statement. But I did say may have conflicting addresses.
 
Old 03-10-2011, 05:57 PM   #10
wfinden01
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 1
Yer I see what you mean by conflicting address, I did that script based on my own server, will put in comment(s) to suit

if they are running if form a diiferent localion than just hda1 then thre will be a problem with just inserting that script

I think "mrgreaper" is running it on sda

It can be modify to suit

Quote:
Originally Posted by www.thelinuxlink.net
Syntax: ln [option] [target] [link name]

-s, --symbolic: Make symbolic links instead of hard links -S [suffix], --suffix=[Suffix]: Override the usual backup suffix. See below
-target-directory=[directory]: Specify the directory in which to create the links.
-f, --Force: Remove existing destination file(s
^ this is from: http://www.thelinuxlink.net/lvlinux/...mmands/ln.html

Last edited by wfinden01; 03-10-2011 at 06:04 PM.
 
1 members found this post helpful.
Old 03-10-2011, 06:08 PM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Believe me I know nothing about what is to be accomplished, just observing and putting in my 2 cents.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ubuntu/debian: how to : fsck.ext3 /dev/hda1 at the next reboot? frenchn00b Linux - General 2 01-22-2010 12:08 PM
FC4 auto partition gives hda1 and VG and LV drives nickleus Linux - General 2 01-11-2006 07:19 AM
Problems with screen resolution, auto-mounting hda1, unable to save file meiya Debian 1 01-09-2006 09:57 AM
Auto mounting hda1 in FDC# Richard Perry Linux - General 1 03-07-2005 11:16 AM
How can I compile stuff on one computer, and move it to another? kleptophobiac Slackware 6 09-07-2003 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration