• 1 Post
  • 41 Comments
Joined 3 years ago
cake
Cake day: October 4th, 2023

help-circle






  • If you’re a developer for an important open source project, they might.

    Attacking the xz project wasn’t done because the attacker cared about anything that the xz maintainer had. It was because he was trusted and the software he maintained had been given a fair bit of trust by certain maintainers and could be compromised and used as a vector into other systems that indirectly relied on that open-source project.


  • I don’t use Mastodon, but I don’t know if it’s possible to do this particular combination:

    without owning a domain

    users on the local server should still be able to follow accounts on other Mastodon servers

    Like, a client that supports having accounts on multiple Mastodon servers would work. Then they have a local account, and they have an unrelated account elsewhere on another Mastodon server and follow people using that, so that the “following” has nothing to do with your local server.

    But if you want federated behavior, where a user connects to your server and has their account there tell the local Mastodon server to pull down posts from another users somewhere out on another Mastodon server, you might need to have a certificate on your server that other servers recognize as valid, which in practice would mean one signed by a public CA.

    I don’t know for certain whether this is actually necessary, but I could believe that it is.





  • tal@lemmy.todaytoSelfhosted@lemmy.world•DC UPS for router?
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    20 days ago

    Same way existing systems work. The charger just moves the voltage somewhat up above 12V. Under normal use, the battery drops slightly below 12V. You have the things that draw on the battery wired in parallel with the charger. That’s why I’m saying that the power supply on the device would need to be tolerant enough to handle a bit of a range.

    An inverter’s power supply will be able to handle that range, but you’re saying that you don’t want the overhead from that. A DC power supply that’s tolerant of that range will also work.

    EDIT: There are also gonna be 12V regulated DC input power supplies that you could externally insert.

    searches

    https://www.amazon.com/Stabilizer-DROK-Waterproof-Transformer-Television/dp/B081RG8XP5

    DROK DC-DC converter input voltage range is DC 9~36V (12V); output voltage is DC 12V; output current is 5A; output power is 60W.

    Conversion Efficiency: >90%

    Would have to compare to the existing efficiency of your inverter and AC-to-DC power supply.



  • tal@lemmy.todaytoSelfhosted@lemmy.world•DC UPS for router?
    link
    fedilink
    English
    arrow-up
    3
    ·
    20 days ago

    I mean, there are 12V native battery systems out there, stuff like vehicle systems.

    Assuming that the 12V power supply on the router is permissive enough to take a certain amount of variation, I imagine that you can probably just put a 12V deep-cycle battery on the thing on the thing and directly hook up a 12V charge controller in parallel.

    I dunno whether there’s some sort of voltmeter that you can connect NUT up to.

    Personally, my position is that if NextCloud or whatever can’t handle power loss without corrupting data, that’s a bug with NextCloud. I mean, sure, it might not be able to complete an operation if there’s power loss while it’s running, but that shouldn’t result in corrupt data.




  • tal@lemmy.todaytoSelfhosted@lemmy.world•*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    The big concern with filesystems becoming corrupt is that all of the data can be lost on a filesystem. Most of the time, this doesn’t show up, but if you lose power at just the wrong time, it can happen. With FAT, HFS, ext2, and similar filesystems that were vulnerable to corruption on power loss, that was a real risk.

    So having some kind of power source to make an unclean shutdown unlikely avoids the risk of a really, really bad scenario.

    The general shift away from reliance on those filesystems has mitigated the really-bad-case that drove a lot of UPS use.

    Databases are probably the most-critical case where applications update a file on disk constantly, and where corruption would be bad. As long as they live on a filesystem that itself can’t become corrupt on power loss, they’re normally structured with a carefully-ordered series of writes and use of write barriers so that they cannot become corrupt.

    An individual file can be partially written out. Like, say I’m saving a file in Photoshop, and I have only written half of that file. What winds up on the disk is the first half of of a Photoshop file. That’s an invalid Photoshop file. For some applications, that can matter. Like, say (a) I chose to overwrite an old file and (b) the application doesn’t atomically store the new file (like, write it out, fsync(), and then rename the new file over the old) and © there’s no backup or other system in place.

    Or, even aside from partially writing out a file, I can entirely lose work that isn’t saved at all, if I’m not using a software package that makes use of some sort of autosave system. If I haven’t saved all day, then, well, all of that unsaved work is going to go away if there’s a power loss.

    That’s a much smaller potential data loss, but, sure…power loss can cause data loss, even if it doesn’t produce that “everything is lost” filesystem corruption.

    I’m not asserting that there’s no utility to a UPS; quite the contrary, as my comment was explaining to OP why there is use some people have for having NUT even if he personally doesn’t care much about it for his use case. I’m just pointing out that some of the major reasons for having a UPS+host-side-software combination that existed in, say, the 1990s aren’t really much of a thing in 2026. That was that you really did not want machines using filesystems normally used then to perform an unclean shutdown. Even with a UPS and host-side software like NUT, you can have data loss, as NUT cannot force all software to save unsaved data; there’s no standardized mechanism for forcing applications to save. If the PC is attended, you might get a warning and have a chance to manually save, but that’ll be the best that’ll happen, and if the PC is unattended, well, that save isn’t going to happen. But what NUT and similar software can do is to, when the UPS battery level gets low, trigger a clean shutdown. That ensures that the OS has time to perform a clean shutdown, and on filesystems that have a risk of filesystem corruption if the power is cut—FAT, HFS, ext2, and similar—a UPS with host-side software would avoid that case from arising.

    If someone wants to have a UPS in 2026 on filesystems that don’t have those limitations, that’s fine. They may want to have, say, a five minute window to save their work if they are at the PC when power loss occurs. It may help avoid problems that arise from software that cannot cleanly handle power loss—I that Steam can, if power loss occurs while it is updating itself, wind up in a broken state from which it cannot automatically recover when restarted, as I’ve done that myself.

    But generally, if you lose power on a system in 2026, you aren’t facing a “I might lose the contents of my hard drive” scenario.


  • tal@lemmy.todaytoSelfhosted@lemmy.world•*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 months ago

    ext4 is merely journaled, which means that there are rare instances where it can be corrupted, but recovery is fast.

    None of these things mean that the filesystem becomes corrupted; the filesystem will be in a filesystem consistent state when remounted. You can have a write that is partially performed on a file, but that does not cause the filesystem to become corrupt when it does not complete being written. The journal can contain that write, but it can not yet be committed, and won’t yet be visible to a user. But that doesn’t make the filesystem corrupt; the commit itself is atomic.



  • tal@lemmy.todaytoSelfhosted@lemmy.world•*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    Modern filesystems can corrupt as well with unclean shutdown. They are just less likely to do so.

    It shouldn’t be possible for them to become corrupt on an unclean shutdown, at all. Not at the filesystem level. It isn’t just a question of probability.

    It’s possible that there is some bug in the implementation of a filesystem that causes it to violate its guarantees.

    There could be, oh…hardware bugs, say, where hardware violates guarantees.

    Files can be partially-written. Software might not handle that, though properly-written software designed like a DBMS will be set up so that a partially-written file will not become corrupt at the file level.

    Some filesystems permit disabling features that guard against filesystem corruption.

    But absent something like that, it should not be possible for one of the filesystems to become corrupt on an unclean shutdown, at all.