# External USB HDD

## dageyra

Hey guys, we have an office Gentoo server that I want to configure to run backups on an external USB drive.  I’ve attempted this in the past and ended up purchasing one that was not compatible (I don’t recall the name, started with a B I believe).  I'm talking an actual HDD, not a flash drive.  The issue was lack of Linux drivers/support, only Windows.  So I thought it prudent to see if you guys had an experience with external drives that work well with Gentoo.  It doesn’t need any bells and whistles like some of the secure drives have, but we would consider any such benefits.  We would need at least 1-2TB, price isn’t as much of a concern as it is for a business client.  It is a 64-bit machine, so 32-bit only is out, not sure if that’s as big of a concern anymore.

Thanks for any suggestions you can offer.

----------

## eccerr0r

In general, all USB hard drives that conform to USB-Storage standards should work...  Curious as to see what brand/model it was so it can be blacklisted.

I've only had DIY case external HDDs, and all, though may have their own characteristics, work fine.

----------

## Jaglover

I've seen enclosures that do not let smartctl thorugh, all of them still worked.

----------

## 666threesixes666

"office" settings NAS would be more appropriate than a usb drive.

http://en.wikipedia.org/wiki/Buffalo_network-attached_storage_series

if you are intent upon doing it wrong, ive seen these drives work well....  (and can be acquired at local walmart for the test and return for your self  :Wink: 

http://www.amazon.com/Passport-Portable-External-Storage-WDBY8L0020BBK-NESN/dp/B005HMKKH4

----------

## dageyra

 *666threesixes666 wrote:*   

> "office" settings NAS would be more appropriate than a usb drive.
> 
> http://en.wikipedia.org/wiki/Buffalo_network-attached_storage_series
> 
> if you are intent upon doing it wrong, ive seen these drives work well....  (and can be acquired at local walmart for the test and return for your self 
> ...

 

Thanks everyone for the suggestions and points to consider. The old drive was a 40GB Buslink purchased from Dell, going on 10 years ago.  We have had success in using USB sticks with the backup machine but have not tried an external HDD since then, and we're glad to hear support is fairly standard.

In particular the NAS i find interesting. It seems the machine we have is functioning like a NAS depending on the functions it can serve (apache/php/mysql?). I am going to look into those options more, I hope its OK if I return here if we have questions? 

One point is whether the unit is portable enough to be put into the fire safe (about the size of a small PC case). The client is concerned with a large catastrophe such as fire taking out the workstations and backup (in separate facilities).  He's even hinted at preparation in case of terrorist strike. This is why its important the device can be removed easily for portability & storage and will need to hold approximately 2TB+ of data.  I've pushed for offsite storage in the past, which is quite cheap now, but he is highly mistrustful of anything not in his direct control.  That's not necessarily a bad thing, but cloud systems have evolved significantly into more stable options.

Thanks again for the suggestions.

----------

## DaggyStyle

I had similar needs for my home server so this is what I did:

I got an 3TB internal hdd and an esata based external case.

in addition I got a sata to esata converter and connected them all.

then I've added a udev rule that will start the backup software when the device is connected (my mb supports sata hotplug) and shutdown upon disconnection.

all in all it works great.

----------

## dageyra

 *DaggyStyle wrote:*   

> I had similar needs for my home server so this is what I did:
> 
> I got an 3TB internal hdd and an esata based external case.
> 
> in addition I got a sata to esata converter and connected them all.
> ...

 

Wow, that's a great idea! I've never messed with udev but I like the sound of that. I can look into the implementation, could you share the rule? We do an archival and rsync but both are called from standard bash scripts. I can adopt pretty easily.

----------

## NeddySeagoon

dageyra,

If you want a DIY NAS solution, an HP Microserver with up to 5 HDD, running Gentoo will do nicely,

For just 2Tb, you can fit a few 2Tb or 3Tb drives in raid1.  It will take 5 drives.

My media server has 5x 2Tb WD Greens.  The idea is sound but the WD Greens are dreadful. Stay away from them.

eSATA is much preferred over USB.  Its both faster and more robust.

A single backup is no backup at all.   When your primary data is lost, its all you have, so you no longer have a backup.

Firesafes don't always work either.  Backups need to be rotated with some copies kept off site.

----------

## DaggyStyle

 *dageyra wrote:*   

>  *DaggyStyle wrote:*   I had similar needs for my home server so this is what I did:
> 
> I got an 3TB internal hdd and an esata based external case.
> 
> in addition I got a sata to esata converter and connected them all.
> ...

 

sure, here is all I'm using:

```

dagg@NCC-5001-D ~ $ cat /etc/udev/rules.d/80-backup-disk.rules 

ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_PART_ENTRY_UUID}=="01fdb30e-f5a8-424a-8917-c2e215371416", RUN+="/usr/local/bin/backup.sh start", OPTIONS="last_rule"

ACTION=="remove", KERNEL=="sd[b-z][0-9]", ENV{ID_PART_ENTRY_UUID}=="01fdb30e-f5a8-424a-8917-c2e215371416"", RUN+="/usr/local/bin/backup.sh stop", OPTIONS="last_rule"

dagg@NCC-5001-D ~ $ cat /usr/local/bin/backup.sh

#!/bin/bash

MODE="$1"

function start {

        local sshd_up=0

        while [ true ]; do

                sleep 1s

                rc-status -a | egrep 'xdm|sshd' | grep -q "started"

                if [ $? -eq 0 ]; then

                        break

                fi

        done

        mount /mnt/backup

        if [ $? -ne 0 ]; then

                logger "$0 [Error]: unable to mount /mnt/backup, check dmesg for reason"

                exit 1

        fi

        /usr/bin/rc-config start backuppc

        /usr/bin/rc-config start apache2-backuppc

}

function stop {

        /usr/bin/rc-config stop apache2-backuppc

        /usr/bin/rc-config stop backuppc

        umount -l /mnt/backup

}

if [ "${MODE}" = "start" ]; then

        start &

elif [ "${MODE}" = "stop" ]; then

        stop

else                                                                                                                            

        logger "$0 [Error]: unknown mode ${MODE}"                                                                               

fi                                                                                                                              

dagg@NCC-5001-D ~ $ grep backup /etc/fstab                                                                                   

# backups

UUID=5fd24cd9-7238-40c5-864c-fff6164bc70b       /mnt/backup     ext3,ro defaults,noauto 0 0
```

btw, if you intend to use the backups for a business, I tend to agree with neddy, else, I don't think that one needs more than that for home usage.

----------

## 666threesixes666

sounds like a job for DRBD, with redundant off site backups.

http://www.drbd.org/

----------

## eccerr0r

Curious, how are those WD greens horrible?

They are slow, but are they unreliable as well?

(My PVR has a 2T WD green in it, and I don't back it up... because I can't/don't care about its contents that much...)

----------

## DaggyStyle

 *eccerr0r wrote:*   

> Curious, how are those WD greens horrible?
> 
> They are slow, but are they unreliable as well?
> 
> (My PVR has a 2T WD green in it, and I don't back it up... because I can't/don't care about its contents that much...)

 

imho, all mainstream hdds today are unreliable.

----------

## NeddySeagoon

eccerr0r,

Two of my five died at nine months old with bad sectors.  They run 24/7.  That was really bad news as they are used in LVM over raid 5.

Luckily, I got back everything but 32k from the last drive to die, and that was in an area that stored movies.

I have one trashed DVD but I don't know which one.

Some time after that, I learned about echo repair ....  so I might have got everything back.

The slow is OK in a media server but 2/5 mortality rate inside the warranty period makes them unreliable.

----------

## eccerr0r

It's kind of funny, the drives I buy a lot of are the ones that fail.  I bought three Hitachi 500G disks for a RAID5, and one of those failed (stopped responding to the SATA).  I don't know if it's just coincidence or what.

My 2T WD Green is still going OK - 0 reallocate events, 0 pending.  Currently at 9800 Power On Hours running 24/7 in a PVR (still young compared to some of my 120G disks in my other RAID5, of which some already oveflowed 2^16 hours).

----------

## NeddySeagoon

eccerr0r,

I lost a 4 year old Hitachi from my desktop raid5.  It suddenly wanted to relocate about 80 sectors.

I replaced the drive with another newer Hitachi and put the failed drive into an eSATA enclosure, so I could play with it.  

When I made a filesystem, it made a very nasty noise but it did the relocation and it looks good.  However, it won't get used for anything serious, ever again.

----------

