Showing posts with label storage. Show all posts
Showing posts with label storage. Show all posts

Tuesday, July 5, 2016

Cloud storage on the Raspberry Pi

,


I recently started playing around with cloud storage on the Raspberry Pi. Im already using it as a web server and a media server, why not this as well.

I started hacking up something to make Dropbox work and then decided that was stupid and found some open source solutions instead.

I found two options that were easy to install and seemed to work decently.

The first one is Owncloud


If you already have apache installed and running, this one is easy (If not see here).

All you have to do is install the packages required, download the files and do some simple setup.

sudo apt-get update && sudo apt-get install curl libcurl3 php5-curl sqlite3 php5 php5-sqlite php5-gd php-xml-parser php5-intl

cd /var/www/
sudo wget http://download.owncloud.org/community/owncloud-5.0.2.tar.bz2
sudo tar -xvf owncloud-5.0.2.tar.bz2
sudo chown -R www-data:www-data owncloud
sudo nano /etc/apache2/sites-enabled/000-default
Then change the line AllowOverride None to AllowOveride All in the /var/www/ section.
sudo a2enmod rewrite
sudo a2enmod headers
sudo service apache2 restart

Now just go to your http://ip-address/owncloud/ with a separate computer or go to http://localhost/owncloud/ on the Raspberry Pi and pick a username and password.

Pros:

  • Can access local data from your external drives easily.
  • Can access your dropbox data.
  • Doesnt require its own service.
  • Password protected (storing the salted hash of the password!).
Cons:
  • Unencrypted SQL database that anyone can download.
  • Slow!
  • Doesnt automatically sort through your data like its features imply. You have to manually upload everything.


The second one is Seafile


This one is also pretty easy to install and has a Raspberry Pi specific version.
I put my stuff in a directory in my home folder but you could put it wherever. For more security, consider creating a special user for seafile.

sudo apt-get update && sudo apt-get install python2.7 python-setuptools python-simplejson python-imaging sqlite3
cd
mkdir cloud
cd cloud
wget http://seafile.googlecode.com/files/seafile-server_1.5.1_pi.tar.gz
tar -xzf seafile-server_*
mkdir installed
mv seafile-server_* installed
cd seafile-server-*
./setup-seafile.sh

The last script will install it and ask some easy questions for you to answer to set up things.
To run the seafile server, you have to do the following:

sudo ./seafile.sh start
sudo ./seahub.sh start

This has to be done every time your Raspberry Pi restarts, which is fairly easy using a cron script
crontab -e

then add:
@reboot sudo /home/pi/cloud/seafile-server-1.5.1/seafile.sh start
@reboot sudo /home/pi/cloud/seafile-server-1.5.1/seahub.sh start

Then save and exit.
For more help, see here.
Now just go to your http://ip-address:8000 with a separate computer or go to http://localhost:8000

Pros:

  • Fast!
  • Doesnt run if you dont want it to.
  • Doesnt have all of its files accessible over the normal webserver.
  • Requires username and password.
Cons:
  • Takes time to start up and sometimes seahub.sh doesnt start properly
  • Unencrypted SQL database (Though I havent found a way to easily grab this db).
  • Cant access your dropbox data..

After a quick trial with the two of them, Im going with seafile. I havent removed OwnCloud but Im seriously considering it do to the speed and security issues.

Please let me know your experiences with the two of them and any more options to try out!


Consider donating to further my tinkering.


Places you can find me
Read more

Tuesday, April 12, 2016

Fix the Problem Ejecting USB Mass Storage Device error

,
This must have happened to each of us many times that when we click the “Safely Remove Hardware” icon in the system tray to remove hardware, we get an error message saying “The device ‘Generic Volume’ cannot be stopped right now. Try stopping the device again later”.


One of the reason for this problem may be that the pen drive is still in use and some data is either being read from it or being written into it. That means some process is using the drive but we do not know what the processes are that are accessing the drive.

Steps to Fix the Problem Ejecting USB Mass Storage Device:
1. End the processes that are using the USB drive:
Download and install this software called as Unlocker, now open My Computer, right click on your USB drive icon, click on Unlocker.


Now click on Unlock All to kill all the processes using the Drive. Now the drive should get safely removed.

2. Clean the system infected by viruses:
If the first step fails that means the process that is accessing the pen drive is a virus for sure. So to clean the system just scan the computer with a good updated Anti Virus and delete the viruses that are found. The problem would certainly get solved.
Read more
 

Computer Info Copyright © 2016 -- Powered by Blogger