Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: salmankhalid on January 28, 2014, 03:05:47 PM
-
Hi all
I am trying to start mongodb on system startup. I have added the following line to the bootlocal.sh
/usr/local/bin/mongodb/bin/mongod --dbpath /mnt/sda1/own/db --journal --fork --syslog
this doesn't start mongodb but if i change the --dbpath option to /data/db it works and starts up. As
tiny core is booting from sda1, so i imagine that sda1 will be mounted .. i have also tried
/usr/local/bin/mongodb/bin/mongod --dbpath /mnt/sda1/own/db --journal --fork --syslog &
/usr/local/bin/mongodb/bin/mongod --dbpath /mnt/sda1/own/db --journal
/usr/local/bin/mongodb/bin/mongod --dbpath /mnt/sda1/own/db --journal &
but still mongodb won't start, I want save the db on disk so that i don;t lose any data on system crash and restarts
Thanks in advance
-
Core does not know where it booted from.
Unless the tce, home, or opt are on sda1, it will not be mounted.
Mount it in bootlocal.sh before you start the database.
-
Add "sudo mount /mnt/sda1" and then enter ur code in bootlocal.sh may be it work for u.
Malik Awan
-
Do not use sudo in bootlocal.sh. It runs as root.
just add
mount /mnt/sda1
-
Thanks guys for the quick responses ... but it I'm still unable to start the db with the --dbpath /mnt/sda1 option ... :( ... i have put the mount command in bootlocal.sh before the db startup .. The machine is currently at a remote location so i can't see boot errors on screen also i can;t find mongodb in dmesg but i am not sure if that is the right place look for errors that happen in bootlocal.sh ...
-
You could use boot code "syslog" and check /var/log/messages
-
Thank you tinypoodle for the tip ... it truns out that the --journal option was stopping mongodb to start as the 32 bit version limits the DB size to less then 2GB with journalling and sadly my db has crossed that limit .. backed up the old db and created a new one and now it starts.. mount /mnt/sda1 was the correct option to use ..
thank you very much, a great team and great OS
-
Hi! I'd like to know: does this persist the data while OS is running or only after reboot? If it doesn't persist on OS running, maybe 2GB of RAM is not enough. I'm asking because I'm thinking on running my server non-stop (for as long as possible) on this OS.