[SOLVED] hard drive options for a raspberry pi 2 backup server
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154
Rep:
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.
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.
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
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.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154
Rep:
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 ).
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.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.