view the rest of the comments
Linux
Welcome to c/linux!
Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!
Rules:
-
Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.
-
Be respectful: Treat fellow community members with respect and courtesy.
-
Quality over quantity: Share informative and thought-provoking content.
-
No spam or self-promotion: Avoid excessive self-promotion or spamming.
-
No NSFW adult content
-
Follow general lemmy guidelines.
They almost undoubtedly would. That wasn't the problematic statement.
Let's go over some fundamentals here.
fsck
is a utility for checking and repairing filesystem errors. Some filesystems do not support doing so when they are mounted.Why? At a high level, because:
The utility needs the filesystem to be in a consistent state on disk. If the filesystem is mounted and in-use, that will not be so: The utility might come across data affected by an in-flight operation. In its state at that exact moment, the utility might think there is corruption and might attempt to repair it.
But in doing so, it might actually cause corruption once the in-flight operation is complete. That is because the mounted filesystem also expects the disks to be in a consistent state.
Some filesystems are designed to support online
fsck
. But for OP's purposes, I assume that the ones they are using are not so (hence the reason for the post)."I know!" said the other commenter. "RAID uses mirroring! So why not just take the mirror offline and do it there?"
Well, for the exact same reasons as above, and then some additional ones.
Offlining a mirror like that while the filesystem is in use is still going to result in the data on the drive being in an inconsistent state. And then, as a bonus, if you tried to online it again, that puts the mirrors in an inconsistent state from each other too.
Even if you wanted to offline a mirror to check for errors, and even if you were doing a read-only check (thus not actually repairing any errors, thus not actually changing anything on that particular drive), and even if you didn't have to worry about the data on disk being inconsistent... The filesystem is in use. So data on the still-online drive has undoubtedly changed, meaning you can't just online the other one again (since they are now inconsistent from each other).
So they swap the drives like i said? I never mentioned them correcting them online or checking them online or any of that mess. I just said they run 1+0 so they can pull a drive and pop a new one in without shutting down. I have two different statements in my comment. I'll add a paragraph break to make it clearer that they aren't related.
Nearly all systems have some sort of background error checking which periodically reads all data and validates it hasn't changed. They also watch for SMART errors and pre-fail disks before they die entirely.
They use all forms of RAID (Netapp is a weird dual stripe RAID 4, for example) and Erasure coding primarily.
How does that invalidate anything I said?
Dude I think this is a more you ain't smart enough to know that youre not smart... just take the L