Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can I have parity checking without a raid? I would like to have parity checking but I want to maintain separate and independent drives so that if one day I decide I want to bring one of my drives to Bob's house I can do so. I Do understand that when I bring the drive to Bob's house it would at that point mess up the parity checking.
I think you are talking about having a mirrored drive, as in RAID1.
If so, then RAID style parity doesn't make sense; the parity would just be another mirror of the data (since the data is not striped at all).
I suspect that you are actually after block checksums, rather than parity. Some of the newer filesystems such as ZFS and BTRFS implement this. So the way to achieve your aim would be to have a BTRFS file system on a RAID1 pair.
I'm definitely after parity checking. I understand the theory of it and such, I'm just not quite sure how to implement it... if I can in the way that I would like.
But these checksums sound interesting.
Basically... if I can have one driver in order to back up several drives provided that only one fails at a time... That would be pretty awesome.
At one point this would have sounded magical, and seems like it's unreal, but after learning the theory of parity checking... it seems within reach.
I don't plan on mirroring my drives. I have too many of them, and the data isn't important enough.
I guess my question is in response to this
Quote:
The cheapest way to do it would be to make yourself a RAID 5 using mdadm. It comes with Linux and is a form of software RAID. With that you only use up the equivalent of one disk for parity checking (parity and data are striped across all the disks so that if you lose a single disk you don't lose both the data and its parity bit so continue running). You can replace the failed disk and it will rebuild it for you to restore your redundancy.
Any method that involves striping means that all the disks have to be present; the complete data is not on any single drive (it is interleaved across them all). The reason for having parity checks on a RAID5 is to mitigate the effect of a drive failure; the parity allows any drive that fails to be replaced and the contents rebuilt.
Now if you can only afford 2 drives, the obvious method is RAID1, which simply mirrors the data onto both drives. It doesn't need parity, because a single drive failure still leaves you with all the data intact. Moreover, you can remove a drive and take it to another location.
RAID1 is more reliable than RAID5. The failure mode is when two drives die at once (making the data unrecoverable). Because RAID5 involves more drives, this failure mode is more likely. However, RAID5 is more space efficient, because the redundancy only uses the equivalent of a single drive (out of three or more).
RAID5 is popular because it is a good tradeoff; the speed of striping, not too much space wasted for redundancy, and reasonable reliability.
Last edited by neonsignal; 02-22-2010 at 02:40 AM.
ah, so, the only way to have parity checking is to also have striping? Hmmm, I'll will have to think about then. I wanted the parity checking without striping essentially.
Parity has different implementations depending on the context. For memory, you have a single parity bit on a set of bits, which means you can detect (but not correct) a single bit error.
On a RAID setup, parity is typically done on the bytes across the drives. Again, you only have a single parity bit for a set of bits. However, because it is known which drive has failed, the parity bits can be used to reconstruct that drive.
You sound like you want to have a pair of drives, with each having a copy of the data. RAID style parity does not achieve anything, because if a drive fails, it can be reconstructed from the other drive anyway.
If your reason for having parity is to be able to correct single bit errors (rather than recovering from a total drive failure), then you are really looking for error correction, typically using Hamming codes which are just a multi-bit form of parity. Most hard drives already implement this internally.
Last edited by neonsignal; 02-22-2010 at 05:28 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.