Atemu

joined 4 years ago
MODERATOR OF
[–] Atemu@lemmy.ml 2 points 6 hours ago* (last edited 6 hours ago) (1 children)

Sure :)

I knew about bit rot but thought the only solution was something like a zfs pool.

Right. There are other ways of doing this but a checksumming filesystem such as ZFS, btrfs (or bcachefs if you're feeling adventurous) are the best way to do that generically and can also be used in combination with other methods.

What you generally need in order to detect corruption on ab abstract level is some sort of "integrity record" which can determine whether some set of data is in an expected state or an unexpected state. The difficulty here is to keep that record up to date with the actually expected changes to the data.
The filesystem sits at a very good place to implement this because it handles all such "expected changes" as executing those on behalf of the running processes is its purpose.

Filesystems like ZFS and btrfs implement this integrity record in the form of hashes of smaller portions of each file's data ("extents"). The hash for each extent is stored in the filesystem metadata. When any part of a file is read, the extents that make up that part of the file are each hashed and the results are compared with the hashes stored in the metadata. If the hash is the same, all is good and the read succeeds but if it doesn't match, the read fails and the application reading that portion of the file gets an IO error that it needs to handle.

Note how there was never any second disk involved in this. You can do all of this on a single disk.

Now to your next question:

How do I go about manually detecting bit rot?

In order to detect whether any given file is corrupted, you simply read back that file's content. If you get an error due to a hash mismatch, it's bad, if you don't, it's good. It's quite simple really.

You can then simply expand that process to all the files in your filesystem to see whether any of them have gotten corrupted. You could do this manually by just reading every file in your filesystem once and reporting errors but those filesystems usually provide a ready-made tool for that with tighter integrations in the filesystem code. The conventional name for this process is to "scrub".

How do I go about manually detecting bit rot? Assuming I had perfect backups to replace the rotted files.

You let the filesystem-specific scrub run and it will report every file that contains corrupted data.

Now that you know which files are corrupted, you simply replace those files from your backup.

Done; no more corrupted files.

Is a zfs pool really that inefficient space wise?

Not a ZFS pool per-se but redundant RAID in general. And by "incredibly costly" I mean costly for the purpose of immediately restoring data rather than doing it manually.

There actually are use-cases for automatic immediate repair but, in a home lab setting, it's usually totally acceptable for e.g. a service to be down for a few hours until you e.g. get back from work to restore some file from backup.

It should also be noted that corruption is exceedingly rare. You will encounter it at some point which is why you should protect yourself against it but it's not like this will happen every few months; this will happen closer to on the order of every few decades.

To answer your original question directly: No, ZFS pools themselves are not inefficient as they can also be used on a single disk or in a non-redundant striping manner (similar to RAID0). They're just the abstraction layer at which you have the choice of whether to make use of redundancy or not and it's redundancy that can be wasteful depending on your purpose.

[–] Atemu@lemmy.ml 1 points 6 hours ago

if it’s a 1:1 full disk image, then there’s almost no difference with the costs of raid1

The problem with that statement is that you're likening a redundant but dependant copy to a backup which is a redundant independent copy. RAID is not a backup.

As an easy example to illustrate this point: if you delete all of your files, they will still be present in a backup while RAID will happily delete the data on all drives at the same time.

Additionally, backup tools such as restic offer compression and deduplication which saves quite a bit of space; allowing you to store multiple revisions of your data while requiring less space than the original data in most cases.

In this case he’s talking about restic, which can restore data but very hard to do a full bootable linux system - stuff needs to be reinstalled

It's totally possible to make a backup of the root filesystem tree and restore a full system from that if you know what you're doing. It's not even that hard: Format disks, extract backup, adjust fstab, reinstall bootloader, kernels and initrd into the boot/ESP partition(s).

There's also the wasteful but dead simple method to backing up your whole system with all its configuration which is full-disk backups. The only thing this will not back up are EFI vars but those are easy to simply set again or would just remain set as long as you don't switch motherboards.

I'm used to Borgbackup which fulfils a very similar purpose to restic, so I didn't know this but restic doesn't appear to have first-class support for backing up whole block devices but it appears this can be made to work too: https://github.com/restic/restic/issues/949

I must admit that I also didn't think of this as a huge issue because declarative system configuration is a thing. If you're used to it, you have a very different view on the importance of system configuration state.
If my server died, it'd be a few minutes of setting up the disk format and then waiting for a ~3.5GiB download after which everything would work exactly as it did before modulo user data. (The disk format step could also be automatic but I didn't bother implementing that yet because of https://xkcd.com/1205/.)

[–] Atemu@lemmy.ml 1 points 7 hours ago

I was thinking whether I should elaborate on this when I wrote the previous reply.

At the scale of most home users (~dozens of TiBs), corruption is actually quite unlikely to happen. It'll happen maybe a handful of times in your lifetime if you're unlucky.

Disk failure is actually also not all that likely (maybe once every decade or so, maybe) but still quite a bit more likely than corruption.

Just because it's rare doesn't mean it never happens or that you shouldn't protect yourself against it though. You don't want to be caught with your pants down when it does actually happen.

My primary point is however that backups are sufficient to protect against this hazard and also protect you against quite a few other hazards. There are many other such hazards and a hard drive failing isn't even the most likely among them (that'd be user error).
If you care about data security first and foremost, you should therefore prioritise more backups over downtime mitigation technologies such as RAID.

[–] Atemu@lemmy.ml 1 points 7 hours ago

ZFS and BTRFS' integrity checks are entirely independent of whether you have redundancy or not. You don't need any sort of RAID to get that; it also works on a single disk.
The only thing that redundancy provides you here is immediate automatic repair if corruption is found. I've written about why that isn't as great as it sounds in another reply already.

Most other software RAID can not and does not protect integrity. It couldn't; there's no hashing. Data verification is extremely annoying to implement on the block level and has massive performance gotchas, so you wouldn't want that even if you could have it.

[–] Atemu@lemmy.ml 1 points 7 hours ago (1 children)

RAID 1 can absolutely be faster than a single disk for read perf, and on Linux it is tuned to be faster.

You're missing the point entirely. I never said to use a single disk, I explicitly compared it to RAID0.

As far as data security is concerned, JBOD/linear combination and RAID0 are the same, so you'd obviously use RAID0 if you didn't need redundancy.

[–] Atemu@lemmy.ml 16 points 1 day ago

staging rebuild cycles only happen every two weeks or so.

The reason is always that something changed and causes all dependent packages to change, requiring a rebuild of those too.

[–] Atemu@lemmy.ml 7 points 1 day ago* (last edited 1 day ago)

It depends on your uptime requirements.

According to Backblaze stats on similarly modern drives, you can expect about a 9% probability that at least one of those drives has died after 6 years. Assuming 1 week recovery time if any one of them dies, that'd be a 99.997% uptime.

If that's too high of a probability for needing to run a (in case of AWS potentially very costly) restore, you should invest in RAID. Otherwise, that money is better spent on more backups.

[–] Atemu@lemmy.ml 2 points 1 day ago (5 children)

Note that you do not need any sort of redundancy to detect corruption.

Redundancy only gains you the ability to have that corruption immediately and automatically repaired.

While this sounds nice in theory, you have no use for such auto repair if you have backups handy because you can simply restore that data manually using your backups in the 2 times in your lifetime that such corruption actually occurs.
(If you do not have backups handy, you should fix that before even thinking about RAID.)

It's incredibly costly to have such redundancy at a disk level and you're almost always better off using those resources on more backups instead if data security is your primary concern.
Downtime mitigation is another story but IMHO it's hardly relevant for most home users.

[–] Atemu@lemmy.ml 1 points 1 day ago (2 children)

If you needed to spend any time "setting everything back as before", you didn't have a full backup.

[–] Atemu@lemmy.ml 2 points 1 day ago* (last edited 8 hours ago) (2 children)

RAID does not protect your data, it protects data uptime.

RAID cannot ensure integrity (i.e bitrot protection). Its one and only purpose it to mitigate downtime.

[–] Atemu@lemmy.ml 2 points 1 day ago (3 children)

Read perf would be the same or better if you didn't add redundancy as you'd obviously use RAID0.

RAID is never in any way something that can replace a backup. If the backup cannot be restored, you didn't have a backup in the first place. Test your backups.
If you don't trust 1 backup, you should make a second backup rather than using RAID.

The one and only thing RAID has going for it is minimising downtime. For most home use-cases though, the 3rd 9 which this would provide is hardly relevant IMHO.

[–] Atemu@lemmy.ml 1 points 3 days ago

Magnet seems to be a window management shortcut thingy like rectangle but probably worse, costs money and likely to enshittify.

It cannot influence how the macOS window manager works internally, it can only ask it to e.g. place a window in a certain location.

 

@brjsp thanks again for submitting the concern here. We have made some adjustments to how the SDK code is organized and packaged to allow you to build and run the app with only GPL/OSI licenses included. The sdk-internal package references in the clients now come from a new sdk-internal repository, which follows the licensing model we have historically used for all of our clients (see LICENSE_FAQ.md for more info). The sdk-internal reference only uses GPL licenses at this time. If the reference were to include Bitwarden License code in the future, we will provide a way to produce multiple build variants of the client, similar to what we do with web vault client builds.

The original sdk repository will be renamed to sdk-secrets, and retains its existing Bitwarden SDK License structure for our Secrets Manager business products. The sdk-secrets repository and packages will no longer be referenced from the client apps, since that code is not used there.

This appears at least okay on the surface. The clients' dependency on sdk-internal didn't change but that's okay now because they have licensed sdk-internal as GPL.

The sdk-secrets will remain proprietary but that's a separate product (Secrets Manager) and will apparently not be used in the regular clients. Who knows for how long though because, if you read carefully, they didn't promise that it will not be used in the future.

The fact that they had ever intended to make parts of the client proprietary without telling anyone and attempted to subvert the GPL while doing so still remains utterly unacceptable. They didn't even attempt to apologise for that.

Bitwarden has now landed itself in the category of software that I would rather move away from and cannot wholeheartedly recommend anymore. That's pretty sad.

 

cross-posted from: https://lemmy.ml/post/21519137

I recently switched from a MBP to a Framework 16 as my primary laptop and one thing I immediately noticed was that I was unable to stop kinetic scrolls in Firefox by laying my fingers onto the touchpad. It'd just slide by unimpeded. You could work around this by counter-scrolling a little rather than holding still which is how I've been coping with it but it's suboptimal to say the least.
(As are many things in the Linux touchpad experience. Linux desktop developers really ought to use a macbook for a little to get a sense for how to do this properly.)

This was caused by Firefox' use of GDK3 to implement its windowing and input needs which does not support hold gestures.

GDK4 does support them but, as I understand it, a port of Firefox to GDK4 would be a ton of work and there isn't really much desire for it as GDK4 doesn't offer many real advantages over GDK3 as Firefox doesn't use classical GTK widgets or anything and only really uses it for basic input/output primitives.

A backport to handle hold gestures in GDK3 too was attempted but, in classic GNOME fashion, it was rejected.

The implementation now somehow gets events from the touchpad directly via wayland somehow from what I could gather but if it works, it works.

You can try this out in the latest nightly builds.

 

I recently switched from a MBP to a Framework 16 as my primary laptop and one thing I immediately noticed was that I was unable to stop kinetic scrolls in Firefox by laying my fingers onto the touchpad. It'd just slide by unimpeded. You could work around this by counter-scrolling a little rather than holding still which is how I've been coping with it but it's suboptimal to say the least.
(As are many things in the Linux touchpad experience. Linux desktop developers really ought to use a macbook for a little to get a sense for how to do this properly.)

This was caused by Firefox' use of GDK3 to implement its windowing and input needs which does not support hold gestures.

GDK4 does support them but, as I understand it, a port of Firefox to GDK4 would be a ton of work and there isn't really much desire for it as GDK4 doesn't offer many real advantages over GDK3 as Firefox doesn't use classical GTK widgets or anything and only really uses it for basic input/output primitives.

A backport to handle hold gestures in GDK3 too was attempted but, in classic GNOME fashion, it was rejected.

The implementation now somehow gets events from the touchpad directly via wayland somehow from what I could gather but if it works, it works.

You can try this out in the latest nightly builds.

 

Write is a handwriting app that works on a lot of platforms including Linux which cannot be said about most handwritten note-taking applications.

More information and demo: https://github.com/styluslabs/Write/

I've used it for uni on a Linux tablet/convertible and it worked really quite well and has some nice convenient features for note-taking.

The UI looks like it's from android 4.something though ^^'

What I really appreciate about it is that its storage format are plain SVG(Z) which are extremely compatible. All you need to view your scribbles is an SVG viewer (i.e. a web browser) which basically every computer with a GUI has. Their website is in fact mostly just the output of their own app.

 

Features

  • We continue enhancing our search experience with bangs. Check the shield menu to see if a website has a corresponding bang. #3410 @frereit

  • We've upgraded the FastGPT, and Research Assistant (Fast+Expert) with the latest models to enhance performance:

    • FastGPT -> Claude 3 Haiku
    • Research Assistant, Fast -> Claude 3 Haiku
    • Research Assistant, Expert -> Claude 3 Sonnet
  • These are also available in Chat mode which allows full access to a range of models like Claude 3 Opus, GPT-4 and Mistral Large [Please note, Kagi Assistant is currently in closed beta and is exclusively accessible to subscribers of the Ultimate plan]

  • We now allow the community to see and translate the trigger phrases for widgets that utilize them, such as the weather and calculator widgets. Learn more about how to contribute translations in our help page. #2506 @cempack

Improvements and bug fixes

  • Show colour picker when searching for "colour picker" or "color picker" #3370 @httpjames
  • Clock Widget (ie, checking time in another time zone) initially shows PM instead of AM #3533 @mackid1993
  • Ultimate-exclusive bangs not working on starter plan #3551 @emarforio
  • Timer doesn't count time correctly #3436 @__rej__
  • The enter key ignores the character selection state when using Chinese IME #3606 @morningdip
  • Unable to upload items between 8mb and 16mb #3593 @cakeboss
  • Search results have no title Firefox Android #3586 @ray
  • Discussion cards #3519 @Dumb
  • News Snippet cuts off menu #3542 @xrendan
  • Show that a bang is available in the info field of a result #3410 @frereit
  • Search ignoring pre-set date filter #3417 @travior
  • Check Listen Notes API integration #3163 @matteoscopel
  • Quick answer does not display footnotes correctly #3637 @bebowilson
  • Add bang country for Indonesia #3515 @rourguic
  • Make stats subpages shareable #3452 @Value7609
  • Updating a lens' bang causes the server to crash with 502 Server Error #3601 @httpjames
  • Assistant is still capping characters to 7k #3547 @httpjames
  • AI Assistant regenerates answer on tab restore/reopen when called from bang #3569 @emarforio
  • Quick answer button slightly misaligned on mobile #3429 @sefidel
  • Stop overriding the browser’s scroll bars with custom CSS #3420 @David
  • Using the bang !fast on Firefox iOS just gives me an emtpy window #3597 @lou
  • Reddit and Hackernews backlinks only (?) work on us-central #3277 @nilsherzig
  • Bangs in Image / Video / News / Podcast / Maps Search do not redirect. #2929 @Syx
  • Lenses are not activated for research #3317 @tkataja
  • Quick answer breaks when the query contains html tags #3614 @ys256
  • Research Expert Mode "forgets" Citations #3612 @tschoesi
  • Research Assistant cannot summarize GitHub issues URLs correctly (but it can as a PDF) #3581 @yokoffing
  • Missing citations in fastgpt / quickanswer again #3625 @truethomas
  • Quick answer words end with numbers (without links to sources) #3628 @bert
  • Blocked sites showing up in "Quick Peek" results #3477 @n6h6
  • "Sorry, a problem occurred while processing your request." when using the bang "!expert" #3306 @lou
 

Announcements

Starting from March 26th, we will begin including localized sales tax for all new customers who subscribe on or after this date.

Starting from April 9th, all existing customers who qualify for sales tax/VAT will see localized sales tax/VAT added to their monthly invoice in USD, on top of their current subscription fee. This adjustment will appear on your next invoice on or after April 9th, with no immediate extra charge.

If you are paying with an alternative method via Paypal, OpenNode, or any other non-Stripe provider: You will be prompted to pick a sales tax region the next time you go to purchase credit.

If you have any questions about this change, please feel free to contact our team through Discord or at support@kagi.com. We will be building an F.A.Q. page to answer any questions about the migration process.

To clarify, it means an end-price increase for affected members (sales tax/VAT will be automatically added on top of Kagi price, if applicable in your country/state) and this is mandated by Kagi becoming large enough to have legal sales tax/VAT obligation. In addition, Kagi will have to retroactively pay for all sales tax/VAT that we did not collect in the last almost two years. We have chosen to absorb this on behalf of our customers.

Improvements and bug fixes

  • We made some changes to Kagi-specific bangs: you can access FastGPT through !fgpt and Discuss doc with !discussdoc
  • LaTeX is not displaying properly #3514 @rourguic
  • Claude 3 Opus injects random mathematical formulae #3564 @tiltowait
  • Expert research assistant fails to process request #3566 @frin
  • Research assistant messes up character spacing unpredictably #3184 @httpjames
  • Duplicate bang search suggestion #3379 @Value7609
  • Kagi Quick Answer Mismatch Between Document Number and Source Number #3549 @benoit
  • UI Bug: Chat Assistant models card has a clipboard icon #3485 @Chris
  • Maps keeps trying to get a location on every keystroke #3405 @tinkling6961
  • POST /login returns HTTP 500 Internal Server Error #3526 @pdm
  • Non-ASCII Wikipedia URL incorrectly encoded #3459 @ThreePointsShort
  • Kagi Assistant - Text Parsing Issue #3390 @martafolf
view more: next ›