this post was submitted on 14 Jul 2024
2 points (100.0% liked)

Selfhosted

44306 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I'm new to selfhosting and I find myself rarely using the server, only when I need to retrieve a document or something.

I was thinking of implementing something to make it power on, on demand, but I'm not sure if this might be harmful for the HDDs, and I'm not sure how to implment it if so.

What's your recommendation to do so? I'm running a dell optiplex 3050

top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 8 months ago* (last edited 8 months ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
PSU Power Supply Unit
PiHole Network-wide ad-blocker (DNS sinkhole)
RAID Redundant Array of Independent Disks for mass storage
SSD Solid State Drive mass storage

4 acronyms in this thread; the most compressed thread commented on today has 10 acronyms.

[Thread #869 for this sub, first seen 14th Jul 2024, 19:25] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] 0 points 8 months ago (1 children)

Wake-on-LAN is probably what you want, if your specific hardware supports it which it probably does. This is a case of figuring out your exact hardware and a little RTFM-ing about how to enable and use WOL.

As for the drives it, in theory, would add more load/unload cycles to them and thus reduce their lifespan. But, in the real world, that almost certainly doesn't matter, unless you're turning the system on and off every 5 minutes: modern drives expect to go in and out of power saving modes and most controllers (especially usb enclosures!) do this pretty aggressively, so a couple more load cycles more-or-less are unlikely to actually cause your drive to fail any quicker than it would anyways.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago) (1 children)

Thank you

I think it has wake on Lan, so that means any connection attempt would wake it?

[–] [email protected] 1 points 8 months ago

Not quite. Wake on LAN requires a special packet be sent, the OS to boot, then you can attempt to connect to whatever's running.

It's fairly manual (though you COULD maybe automate it, if you have other infrastructure that's watching for things: ex. using home assistant to send the packet when you come home), and has a delay since the system has to boot before it'll respond to anything.

[–] [email protected] 0 points 8 months ago (1 children)

Something like an old laptop will make a power-saving homeserver. But that won't work if you want to attach lots of storage.

I don't think an Optiplex is the most energy-efficient choice. They seem somewhat okay, but you'd need to put some effort in and read some tests and reviews to find a really efficient mainboard and PSU. That's not easy

You can spin down your harddisks. I have some udev rule that executes hdparm -S60 /dev/sdb after boot. That'll spin down the hdd after 5 minutes of inactivity. It's alright for low usage scenarios. And it doesn't spin up that often because the hdd contains my photos, backups and a few movies. And my operating system and files that are accessed often, are on a SSD. Starting and stopping disks like once a day should work for many years. But don't cycle it every few minutes.

And obviously, you can also shut off your server over night or just wake it on demand, if that fits your use-case.

[–] [email protected] 2 points 8 months ago (1 children)

Right now I'm turning it over night but during the day I find that I might use it one day a few times and another day not at all. Wake up on demand would be great, I'm worried about the wear from doing it like 3-4 times a day

[–] [email protected] 1 points 8 months ago

I'm not sure if 3-4 times a day is a lot. I had computers (especially laptops) which were way more aggressive with spinning up and down the disks. Maybe you can look it up. A decent (enterprise(?)) hdd should have some datasheet available including info about how often you can powercycle or spin them up/down.

And I wouldn't wake up disks deliberately. If you don't mind the 5-10s waiting, you can just spin them down at the end of the day and leave them that way. The next day they'll either spin up on first access, or they won't. And save that one cycle. I'm not sure though if you can change the spindown timeout during the day without also waking it up. I mean you could run a script that spins them down at 22:00 and sets the timeout to 1h, and at 07:30 you run a script to keep them awake for a 6h period. But you'd need to test if changing that setting wakes them up. Or I'd rather not run a script like that. Sometimes executing hdparm spins up a disk, even if unnecessary.

[–] [email protected] 0 points 8 months ago* (last edited 8 months ago) (1 children)

If you only use it so rarely, why not just connect a USB drive to your network router? Most have an option to serve files from that over the network.

[–] [email protected] 1 points 8 months ago

That's a great idea that I haven't thought about, but I'm using couple of apps to view and the network thing is less convenient albeit attractive solution that I might look into. Thank you

[–] [email protected] 0 points 8 months ago* (last edited 8 months ago) (1 children)

Wake On LAN maybe?

But that requires a full startup sequence before the file is available.

[–] [email protected] 1 points 8 months ago

I don't mind the wait, I'm however worried about the wear from doing that a few times a day

[–] [email protected] 0 points 8 months ago* (last edited 8 months ago) (1 children)

I had an optiplex 3060 micro with 8500t, 24gb ram and 2 ssds idling around 3-5watts.

[–] [email protected] 1 points 8 months ago

That's impressive! I have less everything, how can I know how much it takes while idle? External device?