Skip to main content
edited tags
Link
goldilocks
  • 60.1k
  • 17
  • 115
  • 230
Tweeted twitter.com/#!/StackRaspi/status/406418133369769984
Source Link
Loko
  • 629
  • 3
  • 10
  • 23

hdd mount for server

I succesfully installed owncloud on my raspberry pi, but I want to upload files to my hdd when I upload on owncloud. So I did this:

cd /var/www/owncloud/config
sudo nano config.php

and I changed the

'datadirectory' => 'mnt/usbdrive/owncloud'

/mnt/usbdrive/ is a directory on the raspberry where the hdd is mounted

/owncloud/ is a directory I made on the hdd.

So this should work, but the problem is. It doesn't since the

/mnt/usbdrive/

is empty when I reboot. And when I manually try to mount it again, the url: serverip/owncloud (so basically the owncloud page) is empty. ( I think it's because I changed something while it was still running). Now dont take my word on the this but I thought about some possible situations/solutions, but I also have no idea how to solve this:

  1. I think that the raspberry must be automatically mounted at booting since the owncloud automatically boots as well.

  2. The owncloud should be stopped, with a command(no idea which command) , then I can manually mount the hdd and I can start it again.

I have no idea if this would work, if I am right or how to do this>

So I'll just ask a couple of questions first.

Is one of the listed situations the situation I am in now? ( So will one of the solutions work?)

Why is there a blank page on the owncloud url when I manually boot the hdd while the owncloud is still running?

If one of the listed situations is the situation, how do I execute the solution?

Also, if I dont change the data directory to the directory on my hdd,but keep it the same, it works perfectly. Of course I dont want it to keep it the standard since I dont wanna upload on the raspberry but on the hdd.

Before mounting the hdd and accessing the owncloud will just give me the header of owncloud + an error saying: "Failed to connect to database" That's probably because the data directory doesn't exist because the hdd isn't mounted yet.

So overall I think the thing that is wrong right now is: I boot the raspberry pi, so owncloud boots as well. The hdd isn't automatically connected, so I have to manually connect it while owncloud is still running. After mounting, I try to go to: raspberrypi-ip/owncloud and it's a white screen. In order to lose the white screen, I should reboot the raspberry. Which brings me back to the beginning.

NOTE: I do use a powered usb hub