LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-01-2016, 06:04 PM   #1
Garrett85
Member
 
Registered: Jan 2011
Posts: 332

Rep: Reputation: 6
hard drive options for a raspberry pi 2 backup server


I've been wanting to build a backup server for my Mint desktop as well as for my Debian media server for a while now. To save money I purchased a Raspberry Pi 2 and I'm going to store it at a friends house who owns an ISP and thus has plenty of bandwidth, and I've lived through one house fire already so I don't feel safe about backing everything up here. As for backing up my home directory I could purchase an SSD or a traditional HD, but for all the media stored on my Debian media server I simply can not afford an SSD due to the massive storage capacity needed. I'd like some suggestions on HDs for my media and my Mint home directory should I decide to go with a HD. Here are some things that are on my mind. I'm a little leery of external HDs because I've seen them fail a lot but I don't see much of a way around it because the Raspberry Pi 2 will simply not have the ability to power an internal HD. So given that I will probably have to go with an external drive, should I use one that doesn't require a separate power source with USB being it's only connection or should I go with one that has an independent power source? I'm also concerned about power down issues. I would feel better if the drive would power down when it's not being used and thus would have a longer lifespan but I don't know if the RP 2 will power down the external drives or not. Also, if the RP 2 does power down the drives how will the machine know to to spin the drive up again? I think I'll be using `backuppc` or is it `pcbackup`, to perform these backups, will the RP 2 see `backuppc` trying to connect and then spin up the drives? Thanks for any input.
 
Old 02-01-2016, 07:44 PM   #2
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
External HDD...

You will foremost need a robust enough power source for an external HDD, whether it's in an enclosure with it own power or connected to a powered USB hub. However, your Pi 2 might better find a connection to a HDD if it were connected directly with a USB cable.

For the Pi 2 inself, remember a good two-ampere-plus power supply and a minimum 24 awg USB cable.

You might be able to use cron to spin down, mount, or unmount a HDD, but a Pi 2 itself doesn't have a sleep state to spin down a drive. It boots and runs or not. There are add-on boards to be found to give you a sleep state and more control at a price.

One cheap way would be to put the HDD power supply on a timer and set crontab to issue mount and umount and other commands after starting and before stopping the drive.

I did this with a signage setup using crontab to run the display command feh a few minutes after a timer turns the power on to boot the Pi 2 and start a TV for a picture sequence.

Just before the timer shuts off the power, crontab gives a command to kill feh and run shutdown.

The display runs from eight in the morning to midnight in the window of an art gallery, Galleri Nybro, in Copenhagen.

Your post was hard to read as a massive text block. Try to spread things out next time.

Last edited by thorkelljarl; 02-01-2016 at 08:34 PM.
 
1 members found this post helpful.
Old 02-01-2016, 08:38 PM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
As thorkelljarl said you will definatly need an externally powered HD, you should not need to bother manually putting the disks to sleep aa most modern usb disks will go to sleep by themselves after a while, you may be able to adjust how long they wait for access before sleeping by using hdparm to set the disk options, if your disk supports that.

I use a pi2 as a web/email server, as a lot of people do and the attached disks have been up and running constantly for over two years now ( aside from a small amount of maintainence down time ), I also use the pi's disks as backup for my desktop as the pi is in my shed away from the house.
 
1 members found this post helpful.
Old 02-02-2016, 03:12 AM   #4
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Looked on the Internet...

Internet posts I found on using hdparm and other sleep commands mention that not all external HDD work equally well with these commands.

A question is whether you want to have any external drive to run continuously, but at times in a reduced state, or have it shut down.

Might Keith Hedger be so kind as to post more detailed information on how he made his successful arrangements?

Last edited by thorkelljarl; 02-02-2016 at 03:18 AM.
 
1 members found this post helpful.
Old 02-02-2016, 05:04 AM   #5
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
The link for setting up the email server:
https://samhobbs.co.uk/raspberry-pi-email-server

Be warned it is really complicated!

The web server is just set up using apache2, that's pretty simple just have a look at the man pages and the example config files that come with the installation ( /etc/apache2/* ), and a quick search on google.
 
1 members found this post helpful.
Old 02-02-2016, 06:17 PM   #6
Garrett85
Member
 
Registered: Jan 2011
Posts: 332

Original Poster
Rep: Reputation: 6
PI2 HDD options

I've been planing from the beginning to connect the HDD to the PI2 via the USB but what would be better, a HDD that has it's own power cord or one that can be powered by the PI2 through the USB? If it's the latter option then what do I need to look for when HDD shopping? And any suggestions? I usually prefer Seagate to WD.

Quote:
Originally Posted by thorkelljarl View Post
External HDD...

You will foremost need a robust enough power source for an external HDD, whether it's in an enclosure with it own power or connected to a powered USB hub. However, your Pi 2 might better find a connection to a HDD if it were connected directly with a USB cable.

For the Pi 2 inself, remember a good two-ampere-plus power supply and a minimum 24 awg USB cable.

Your post was hard to read as a massive text block. Try to spread things out next time.
 
Old 02-02-2016, 07:40 PM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
As has been said use a hdd with its own psu, tne pi can power usb disks but its a lot of strain on the pi, why take risks, use an external psu.

I have a mixture, seagate, wd, iomega they're all made in korea anyway, just pick a good make in your price range with the capacity you think you will need ( then times it by two ).
 
1 members found this post helpful.
Old 02-02-2016, 07:44 PM   #8
Garrett85
Member
 
Registered: Jan 2011
Posts: 332

Original Poster
Rep: Reputation: 6
Amazon -> Seagate Expansion 5TB Desktop External Hard Drive USB 3.0 (STEB5000100)

How does that one look?
 
Old 02-02-2016, 07:46 PM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Quote:
Originally Posted by Garrett85 View Post
Amazon -> Seagate Expansion 5TB Desktop External Hard Drive USB 3.0 (STEB5000100)

How does that one look?
You do actually need to make some decisions yourself.
 
Old 02-02-2016, 07:52 PM   #10
Garrett85
Member
 
Registered: Jan 2011
Posts: 332

Original Poster
Rep: Reputation: 6
This is a lot of money and I'll have to invest a day in putting everything together. I don't want to F this up. I was also worried about all the BS firmware being impeded in a lot of hard drives now that can't be removed and I was wondering if someone here would throw up a red flag concerning the issue. Along those same lines I see that this particular HDD is being sold as an Xbox One expansion but I'm hoping I wont have a lot of trouble formatting and using it with my PI2.
 
Old 02-02-2016, 07:59 PM   #11
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Most ( external ) usb drives come pre-formated for Windows, just re-format.
Remember the pi uses usb2 so a usb3 drive will not operate at full usb3 speeds only at usb2 speed.
Theres not a lot that can be done about what's in the firmware, but really only the tinfoil hat brigade worry about that.
 
1 members found this post helpful.
Old 02-02-2016, 08:00 PM   #12
Garrett85
Member
 
Registered: Jan 2011
Posts: 332

Original Poster
Rep: Reputation: 6
Thanks. I just ordered it and I hope to have a working remote backup server my the end of this coming weekend.
 
  


Reply

Tags
hhd, linux, ssd



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
[SOLVED] Copy main hard drive to backup hard drive jaredR Linux - Newbie 5 12-13-2012 11:34 PM
What's Best Way to Backup a web server with one hard drive Running live kitek Linux - Server 12 03-13-2011 07:28 PM
Ubuntu 9.04 Server - looking for utility to backup entire hard drive mike34341 Linux - Software 1 12-26-2009 08:54 PM
file backup on rehat server to WD my book external usb hard drive justintime24 Linux - Server 2 05-09-2008 12:31 PM
Server Backup Options? Rackemup Linux - General 4 05-24-2001 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:00 AM.

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