Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Redundant local external storage that's not always on
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
maiku
Guru
Guru


Joined: 24 Mar 2004
Posts: 592
Location: Escaping from NY

PostPosted: Mon Sep 16, 2024 2:49 pm    Post subject: Redundant local external storage that's not always on Reply with quote

I need a local configuration where I can store data with the following considerations.

1) It's really just local.
2) I can easily use it on another at least Linux machine.
3) Has redundancy so it can suffer at least partial failure.
4) Is encrypted.
5) Can be powered on only when I need it (which will not be enough times to justify a NAS in my mind).
6) Does not require an infinite money budget.

In my primitive mind the only thing I know that serves this purpose is USB so I default to getting a dumb USB enclosure that supports 2 drives and buying two rust platter drives and putting them in a ZFS RAID, etc.

Is there a better way? Seems like the pitfalls of ZFS RAID over USB might make things interesting.
_________________
Michael
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1128
Location: Richmond Hill, Canada

PostPosted: Mon Sep 16, 2024 2:58 pm    Post subject: Reply with quote

If there is no performance requirement. I would suggest use two USB storage and just ext4. redundancy is base on automated file system level copy.

This way you can have long longevity as well as easy to move, plus possible versioning to reduce human error.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 439

PostPosted: Mon Sep 16, 2024 3:01 pm    Post subject: Re: Redundant local external storage that's not always on Reply with quote

Quote:

5) Can be powered on only when I need it (which will not be enough times to justify a NAS in my mind).


My Raspberry Pi 3 NAS draws less than 500mA at idle, and the disks spin down when not in use. Obviously it's a higher energy usage than an uplugged USB stick, but it's something I'm willing to tolerate for the convenience.

I offset the energy wastage by making one fewer car journey a year ;)

BR, Lars.
Back to top
View user's profile Send private message
maiku
Guru
Guru


Joined: 24 Mar 2004
Posts: 592
Location: Escaping from NY

PostPosted: Tue Sep 17, 2024 6:24 pm    Post subject: Re: Redundant local external storage that's not always on Reply with quote

pingtoo wrote:
If there is no performance requirement. I would suggest use two USB storage and just ext4. redundancy is base on automated file system level copy.

This way you can have long longevity as well as easy to move, plus possible versioning to reduce human error.


Interesting solution. Thanks for this.

lars_the_bear wrote:
Quote:

5) Can be powered on only when I need it (which will not be enough times to justify a NAS in my mind).


My Raspberry Pi 3 NAS draws less than 500mA at idle, and the disks spin down when not in use. Obviously it's a higher energy usage than an uplugged USB stick, but it's something I'm willing to tolerate for the convenience.

I offset the energy wastage by making one fewer car journey a year ;)

BR, Lars.


Can you tell me a bit more about your set up? Like

1) Is it all out in the open or did you build an enclosure?
2) How are you cooling it and ARE you cooling it?
3) What drive types?

Thanks for the response.
_________________
Michael
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 439

PostPosted: Wed Sep 18, 2024 7:17 am    Post subject: Reply with quote

@maiku

Sorry -- I forgot I had upgraded to a Pi 4, because the Pi 3 doesn't support USB 3 (as I recall). I have an open-frame enclosure made from plywood that I had laser-cut so the bits would fit together nicely. There are three compartments -- in the bottom compartment are the mains transformers, the middle compartment has the Pi, and the top compartment two (at present) 8TB USB 3 disks. The disks have their own cooling. The Pi has a propietary heatsink case, so it doesn't need any additional cooling (or, at least, has not so far).

In earlier incarnations of this set-up I managed the disk spin-down using scripts, and it was pretty aggressive -- I never let them spin idle for more than a couple of minutes. But these new disks take 30 seconds to spin up, so I leave the default power-saving mode, which is to spin down after twenty minutes. The spin-up time is inconvenient, but I consider it a price worth paying, to keep the power consumption low. I'll be moving to SSDs when I can afford them.

It's not a blazingly fast system, but I find it OK for daily backups. And it's cheap. Also, because it's a real Linux, I can run other stuff on it as well, which isn't always easy with a proprietary NAS.

BR, Lars.
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 633
Location: Ásgarðr

PostPosted: Wed Sep 18, 2024 2:15 pm    Post subject: Reply with quote

I've built my own "NAS" with decade old parts for this exact purpose. It was way more cheaper than buying usb enclosure since I've had already every parts necessary (not easy to find quality USB enclosure too in the >=4 bay range) with much more capability (proper PSU, proper cooling for drives during long transfer, lots of sata ports, possibility to add a raid card if needed..)
I call it NAS because that's what it is, it runs fully headless, only connected to my router, without any display and fully encrypted too.
I only turn it on for backup / archive purpose since it wouldn't be so good to let that watt monster 24/7 on. (server parts from 2008 are not exactly energy efficient :lol: )
It runs gentoo of course with a trimmed down kernel, boots under 10s and use like 80m of ram.
Before that I was long time user of various USB enclosures but there was always an issue at some point (shitty USB chipset, too high temps due to lack of fans..); I still use some USB enclosures though but only with SSD for quick transfer.
I don't know what your storage requirements are but an old laptop (with 2x internal SATA + one extra reusing the optical bay for example) could do the job (assuming you're fine with 2.5" hdd) with the added bonus of embedded UPS (the battery :o )


Last edited by sdauth on Wed Sep 18, 2024 4:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 439

PostPosted: Wed Sep 18, 2024 2:58 pm    Post subject: Reply with quote

sdauth wrote:

Before that I was long time user of various USB enclosures but there was always an issue at some point (shitty USB chipset, too high temps due to lack of fans..); I still use some USB enclosures though but only with SSD for quick transfer.


Unbranded USB enclosures can be cheap, but I have found them unreliable, as you say. On the other hand, a proprietary USB 3 external drive unit only costs about the same as the basic drive itself -- at large capacities, at least. I guess as the drive itself becomes more expensive, the enclosure part becomes a smaller part of the cost. Whatever, I've used Seagate and WD external USB drives for decades, and mostly been happy with the reliability.

USB 3 can probably handle data faster than a Raspberry Pi. Even in a much faster computer, network speed is likely to be the limiting factor, rather than the disk interface. For a long time I used a spare laptop with USB drives, and it worked fine. But a Raspberry Pi uses much less power than a laptop, even with the screen off, and still (probably) won't be the limiting factor in performance.

But the costs and speeds of this kind of thing change almost every day -- I guess you need to do the math, and work out what suits your needs best. I'm looking forward to SSDs becoming cheap enough that I don't need to use magnetic disks any more.

Quote:

I don't know what your storage requirements are but an old laptop (with 2x internal SATA + one extra reusing the optical bay for example) could do the job (assuming you're fine with 2.5" hdd) with the added bonus of embedded UPS (the battery :o )


In my experience, a bad combination is a laptop with external drives. I had to take the battery out. Otherwise, if there's a power failure, but laptop will keep running, but the disks will fail. They will get marked as RAID failures and, when the power comes back, you'll have to do a full RAID reconstruction. Or take the change and tell mdadm that you're sure the array is clean.

BR, Lars.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9760
Location: almost Mile High in the USA

PostPosted: Wed Sep 18, 2024 3:13 pm    Post subject: Reply with quote

What is your churn rate (how many GB do you write every month) and how much total storage is another question.
I'm using desktop PCs with a pile of hard drives acquired free or minimal cost, connected to them as a software NAS, and shutting them down when not used because buying a pile of USB3 hardware is out of the question. My RPi0W is too slow to do this job as I have a couple disks with enough churn rate that doing rsync backups would take an annoying amount of time to work with USB2 (indeed I think a RPi4 is minimum -- though with the old PCs I get SATA connections -- USB2 with cheap hardware/cables is not reliable enough for RAID).

One thing I noted is that encryption is slow. The first machine I want to get rid of is my Athlon II X2 PC that is backing up my PVR. The full disk encryption plus ssh encryption is double encryption and consumes considerable CPU cycles and does feel sluggish while doing backups - the cpu is pretty much fully consumed to maintain the Gigabit Ethernet plus disk encryption. I also have an old Atom server board used for backing up my main server -- it has AES-NI and this is much faster at full disk encryption but ssh encryption is a bit slow -- at least until I figure out how to get it to use AES-NI as well. I haven't gotten remote power working on the Atom board but that may be a long term solution -- once I can get more SATA ports on it as well as how to deal with FDE that requires a password to unlock the LUKS RAID5 (currently only grub/kernel is not encrypted.)

I've been pondering how to reallocate my machines as of late because of the Atom, might have to use it as my main server but again it's slow and pretty much useless as a distccd machine which the current machine contributes to.

Fortunately for me electricity is cheap and my homemade grid tie solar panels is cutting into my power consumption...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 439

PostPosted: Wed Sep 18, 2024 3:37 pm    Post subject: Reply with quote

eccerr0r wrote:

Fortunately for me electricity is cheap and my homemade grid tie solar panels is cutting into my power consumption...


I think if I were generating my own electricity, I'd make a lot of technical decisions differently.

A RPi NAS uses little power, but I'm aware that it's still mostly power wasted. Still, I estimate that running it for a whole year uses the same amount of energy as driving for forty minutes, or running my central heating for about two hours. So, clearly, I can save energy in better ways than switching off my Rpi NAS when I'm not using it.

BR, Lars.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9760
Location: almost Mile High in the USA

PostPosted: Wed Sep 18, 2024 3:45 pm    Post subject: Reply with quote

I don't sweat it as a even a full blown PC, not just a RPi, that's turned on for a few hours a month it's not going to be a huge electrical cost.

I have other PCs running 24/7/365 (they're my distccd/httpd/smptd/nfsd/bind/ssh/... and pvr boxes) and yes those do add up, but that's another thing...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 439

PostPosted: Wed Sep 18, 2024 4:13 pm    Post subject: Reply with quote

eccerr0r wrote:
I don't sweat it as a even a full blown PC, not just a RPi, that's turned on for a few hours a month it's not going to be a huge electrical cost.


Sure. I went the RPi route so I can leave it on all the time, with minimal guilt.

BR, Lars.
Back to top
View user's profile Send private message
maiku
Guru
Guru


Joined: 24 Mar 2004
Posts: 592
Location: Escaping from NY

PostPosted: Wed Sep 18, 2024 5:41 pm    Post subject: Reply with quote

lars_the_bear wrote:
@maiku

Sorry -- I forgot I had upgraded to a Pi 4, because the Pi 3 doesn't support USB 3 (as I recall). I have an open-frame enclosure made from plywood that I had laser-cut so the bits would fit together nicely. There are three compartments -- in the bottom compartment are the mains transformers, the middle compartment has the Pi, and the top compartment two (at present) 8TB USB 3 disks. The disks have their own cooling. The Pi has a propietary heatsink case, so it doesn't need any additional cooling (or, at least, has not so far).

In earlier incarnations of this set-up I managed the disk spin-down using scripts, and it was pretty aggressive -- I never let them spin idle for more than a couple of minutes. But these new disks take 30 seconds to spin up, so I leave the default power-saving mode, which is to spin down after twenty minutes. The spin-up time is inconvenient, but I consider it a price worth paying, to keep the power consumption low. I'll be moving to SSDs when I can afford them.

It's not a blazingly fast system, but I find it OK for daily backups. And it's cheap. Also, because it's a real Linux, I can run other stuff on it as well, which isn't always easy with a proprietary NAS.

BR, Lars.


Any pics?
_________________
Michael
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum