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

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    4 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]

    • Mir@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 months ago

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

  • schizo@forum.uncomfortable.business
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    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.

    • Mir@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      4 months ago

      Thank you

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

      • schizo@forum.uncomfortable.business
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 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.

    • Mir@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 months ago

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

  • poVoq@slrpnk.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    4 months ago

    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.

    • Mir@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 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

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    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.

    • Mir@programming.devOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 months ago

      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

      • hendrik@palaver.p3x.de
        link
        fedilink
        arrow-up
        1
        ·
        4 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.